Skip to content

Conversation

@ryanofsky
Copy link
Contributor

Increase wallet-dump RPC timeout from 30 seconds to 15 minutes. 15 minutes was
chosen because it's the same timeout used by the pruning test. This avoids a
timeout error that seemed to happen regularly (around 50% of builds) on a
particular jenkins server during the first getnewaddress RPC call made by the
test.

@sdaftuar
Copy link
Member

sdaftuar commented Nov 4, 2016

(FYI this is my jenkins instance that has been seeing this test fail repeatedly over the last couple months.)

For some additional color, I timed the RPC calls in wallet-dump.py on a single run on the machine in question -- it happened to pass -- and the first getnewaddress() call took 20 seconds, and the encrypt wallet call took just over 29 seconds. So the 30 second default timeout is cutting it pretty close.

@fanquake fanquake added the Tests label Nov 4, 2016
@laanwj
Copy link
Member

laanwj commented Nov 7, 2016

Concept ACK

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole wallet dump test should run in less than 15 seconds. I don't see why a 15 minute timeout is necessary.

From travis (confirmed locally):

wallet-dump.py                 | True   | 12 s

@maflcko
Copy link
Member

maflcko commented Nov 7, 2016

getnewaddress() call took 20 seconds

How large is the keypool set on the jenkins instance?

@maflcko
Copy link
Member

maflcko commented Nov 7, 2016

utACK for just 82199c4

Increase wallet-dump RPC timeout from 30 seconds to 1 minute. This avoids a
timeout error that seemed to happen regularly (around 50% of builds) on a
particular jenkins server during the first getnewaddress RPC call made by the
test.

The failing stack trace looked like:

    Unexpected exception caught during testing: timeout('timed out',)

    File ".../bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 146, in main
      self.run_test()
    File ".../bitcoin/qa/rpc-tests/wallet-dump.py", line 73, in run_test
      addr = self.nodes[0].getnewaddress()
    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 145, in __call__
      response = self._request('POST', self.__url.path, postdata.encode('utf-8'))
    File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 121, in _request
      return self._get_response()
    File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 160, in _get_response
      http_response = self.__conn.getresponse()
    File "/usr/lib/python3.4/http/client.py", line 1171, in getresponse
      response.begin()
    File "/usr/lib/python3.4/http/client.py", line 351, in begin
      version, status, reason = self._read_status()
    File "/usr/lib/python3.4/http/client.py", line 313, in _read_status
      line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
    File "/usr/lib/python3.4/socket.py", line 374, in readinto
      return self._sock.recv_into(b)
Replace previous timeout('timed out',) exception with more detailed error.
@ryanofsky ryanofsky force-pushed the fix-wallet-dump-timeout branch from 82199c4 to e89614b Compare November 7, 2016 17:04
@ryanofsky
Copy link
Contributor Author

Changed timeout from 15 minutes to one minute, as suggested by @MarcoFalke in IRC.

@maflcko maflcko merged commit e89614b into bitcoin:master Nov 7, 2016
maflcko pushed a commit that referenced this pull request Nov 7, 2016
e89614b [qa] Add more helpful RPC timeout message (Russell Yanofsky)
8463aaa [qa] Increase wallet-dump RPC timeout (Russell Yanofsky)
@sdaftuar
Copy link
Member

@MarcoFalke Any interest in backporting this to 0.13? It's minor, but my testing infrastructure would benefit at least.

maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Nov 19, 2016
Increase wallet-dump RPC timeout from 30 seconds to 1 minute. This avoids a
timeout error that seemed to happen regularly (around 50% of builds) on a
particular jenkins server during the first getnewaddress RPC call made by the
test.

The failing stack trace looked like:

    Unexpected exception caught during testing: timeout('timed out',)

    File ".../bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 146, in main
      self.run_test()
    File ".../bitcoin/qa/rpc-tests/wallet-dump.py", line 73, in run_test
      addr = self.nodes[0].getnewaddress()
    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 145, in __call__
      response = self._request('POST', self.__url.path, postdata.encode('utf-8'))
    File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 121, in _request
      return self._get_response()
    File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 160, in _get_response
      http_response = self.__conn.getresponse()
    File "/usr/lib/python3.4/http/client.py", line 1171, in getresponse
      response.begin()
    File "/usr/lib/python3.4/http/client.py", line 351, in begin
      version, status, reason = self._read_status()
    File "/usr/lib/python3.4/http/client.py", line 313, in _read_status
      line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
    File "/usr/lib/python3.4/socket.py", line 374, in readinto
      return self._sock.recv_into(b)

Github-Pull: bitcoin#9077
Rebased-From: 8463aaa
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Nov 19, 2016
Replace previous timeout('timed out',) exception with more detailed error.

Github-Pull: bitcoin#9077
Rebased-From: e89614b
codablock pushed a commit to codablock/dash that referenced this pull request Jan 15, 2018
e89614b [qa] Add more helpful RPC timeout message (Russell Yanofsky)
8463aaa [qa] Increase wallet-dump RPC timeout (Russell Yanofsky)
codablock pushed a commit to codablock/dash that referenced this pull request Feb 1, 2018
e89614b [qa] Add more helpful RPC timeout message (Russell Yanofsky)
8463aaa [qa] Increase wallet-dump RPC timeout (Russell Yanofsky)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
e89614b [qa] Add more helpful RPC timeout message (Russell Yanofsky)
8463aaa [qa] Increase wallet-dump RPC timeout (Russell Yanofsky)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
e89614b [qa] Add more helpful RPC timeout message (Russell Yanofsky)
8463aaa [qa] Increase wallet-dump RPC timeout (Russell Yanofsky)
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 24, 2019
e89614b [qa] Add more helpful RPC timeout message (Russell Yanofsky)
8463aaa [qa] Increase wallet-dump RPC timeout (Russell Yanofsky)
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 28, 2019
e89614b [qa] Add more helpful RPC timeout message (Russell Yanofsky)
8463aaa [qa] Increase wallet-dump RPC timeout (Russell Yanofsky)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants