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]]
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).
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.
kazcw
jonasschnelli
sipa
sdaftuar
MarcoFalke
laanwj
Labels
Tests