30s is not enough. An importwallet test case can take up to about 40s my test machine.
Fixes #8051.
30s is not enough. An importwallet test case can take up to about 40s my test
machine.
Fixes #8051.
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]]
I tried with HTTP_TIMEOUT=1, and walletbackup.py still works fine.
This is the error (after INFO: Restoring using dumped wallet):
Unexpected exception caught during testing: timeout('timed out',)
File "/bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 138, in main
self.run_test()
File "./walletbackup.py", line 188, in run_test
self.nodes[0].importwallet(tmpdir + "/node0/wallet.dump")
File "/bitcoin/qa/rpc-tests/test_framework/coverage.py", line 49, in __call__
return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
File "/bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 137, in __call__
response = self._request('POST', self.__url.path, postdata)
File "/bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 119, in _request
return self._get_response()
File "/bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 152, in _get_response
http_response = self.__conn.getresponse()
File "/usr/lib64/python3.4/http/client.py", line 1171, in getresponse
response.begin()
File "/usr/lib64/python3.4/http/client.py", line 351, in begin
version, status, reason = self._read_status()
File "/usr/lib64/python3.4/http/client.py", line 313, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib64/python3.4/socket.py", line 374, in readinto
return self._sock.recv_into(b)
Stopping nodes
WARN: 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).
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.
Yeah, this is too intermittent to worry about; it only came up because I was grinding the test to look for that other bug.