rpc tests: increase http timeout #8052

pull kazcw wants to merge 1 commits into bitcoin:master from kazcw:rpcwallet-test-timeout changing 1 files +1 −1
  1. kazcw commented at 5:15 pm on May 13, 2016: contributor

    30s is not enough. An importwallet test case can take up to about 40s my test machine.

    Fixes #8051.

  2. rpc tests: increase http timeout
    30s is not enough. An importwallet test case can take up to about 40s my test
    machine.
    
    Fixes #8051.
    53bcca971b
  3. jonasschnelli added the label Tests on May 13, 2016
  4. jonasschnelli commented at 5:18 pm on May 13, 2016: contributor

    Ah. This makes sense! Fixes #8045 not #8051. I could not reproduce #8045 but looks good.

    utACK 53bcca971b807b25f219f0aeea25071e38ccea7d

  5. sipa commented at 7:11 pm on May 13, 2016: member
    This does not fix #8045 for me.
  6. kazcw commented at 7:41 pm on May 13, 2016: contributor

    Hm. I can’t reliably reproduce the test failure; I got it to happen once by looping walletbackup.py until it failed, but the problem’s too intermittent here for me to test a solution effectively.

    In the error case, packet capture showed: t+0s: importwallet request to server t+30.5s: FIN+ACK from client t+38.5s: reply from server, followed by FIN+ACK from server

    So it looks like it involves a 30 second timeout somewhere on the client end, but since 53bcca9 didn’t fix it apparently the problem timeout’s value is not originating with HTTP_TIMEOUT

    [[I should probably modify this to extend the timeout only for the test case in question, but let’s figure out why it isn’t working first]]

  7. sipa commented at 7:54 pm on May 13, 2016: member
    I tried with HTTP_TIMEOUT=600, and walletbackup.py still fails reliably. #8051 fixes it.
  8. sdaftuar commented at 7:57 pm on May 13, 2016: member
    Hmm, I think this might be related: #6695 @sipa Does it fix it for you if you start bitcoind with a bigger -rpcservertimeout?
  9. kazcw commented at 8:03 pm on May 13, 2016: contributor
    Oh, the bug in #8051 occurs during send. This fixes a bug in receiving…
  10. sipa commented at 9:36 pm on May 13, 2016: member
    @sdaftuar That works!
  11. MarcoFalke commented at 6:31 am on May 15, 2016: member
    I tried with HTTP_TIMEOUT=1, and walletbackup.py still works fine.
  12. kazcw commented at 3:17 pm on May 15, 2016: contributor

    This is the error (after INFO: Restoring using dumped wallet):

     0Unexpected exception caught during testing: timeout('timed out',)
     1  File "/bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 138, in main
     2    self.run_test()
     3  File "./walletbackup.py", line 188, in run_test
     4    self.nodes[0].importwallet(tmpdir + "/node0/wallet.dump")
     5  File "/bitcoin/qa/rpc-tests/test_framework/coverage.py", line 49, in __call__
     6    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
     7  File "/bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 137, in __call__
     8    response = self._request('POST', self.__url.path, postdata)
     9  File "/bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 119, in _request
    10    return self._get_response()
    11  File "/bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 152, in _get_response
    12    http_response = self.__conn.getresponse()
    13  File "/usr/lib64/python3.4/http/client.py", line 1171, in getresponse
    14    response.begin()
    15  File "/usr/lib64/python3.4/http/client.py", line 351, in begin
    16    version, status, reason = self._read_status()
    17  File "/usr/lib64/python3.4/http/client.py", line 313, in _read_status
    18    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
    19  File "/usr/lib64/python3.4/socket.py", line 374, in readinto
    20    return self._sock.recv_into(b)
    21Stopping nodes
    22WARN: Unable to stop node: CannotSendRequest('Request-sent',)
    

    It doesn’t happen often when my machine is otherwise idle; I looped the test for several hours (originally trying to reproduce the other bug) and got two failures. With the machine under heavy load it happens consistently (all failures look just like the above backtrace).

    When I set HTTP_TIMEOUT=1 it fails in an earlier recv_into (in various rpc calls).

  13. laanwj commented at 1:49 pm on May 31, 2016: member

    As this doesn’t fix the issue, we should probably close it?

    If we need this I’d prefer to not change the default value in authproxy.py but supply a different timeout where the object is created instead.

  14. kazcw commented at 5:40 pm on June 1, 2016: contributor
    Yeah, this is too intermittent to worry about; it only came up because I was grinding the test to look for that other bug.
  15. kazcw closed this on Jun 1, 2016

  16. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-19 06:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me