createmultisig --descriptors & wallet_keypool --descriptors tests failing #20183

issue fanquake opened this issue on October 19, 2020
  1. fanquake commented at 3:05 AM on October 19, 2020: member

    I've been seeing consistent failures from both of these tests on my macOS machine:

    rpc_createmultisig.py --descriptors   | ✖ Failed  | 105 s
    wallet_keypool.py --descriptors       | ✖ Failed  | 127 s
    
    ALL                                   | ✖ Failed  | 10130 s (accumulated) 
    

    wallet_keypool.py --descriptors

    92/172 - wallet_keypool.py --descriptors failed, Duration: 127 s
    
    stdout:
    2020-10-19T02:52:36.843000Z TestFramework (INFO): Initializing test directory /var/folders/z2/cn877pxd3czdfh47mfkmbwgm0000gn/T/test_runner_₿_🏃_20201019_104219/wallet_keypool_91
    2020-10-19T02:53:42.984000Z TestFramework (ERROR): JSONRPC error
    Traceback (most recent call last):
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/authproxy.py", line 168, in _get_response
        http_response = self.__conn.getresponse()
      File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/http/client.py", line 1198, in getresponse
        response.begin()
      File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/http/client.py", line 297, in begin
        version, status, reason = self._read_status()
      File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/http/client.py", line 258, in _read_status
        line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
      File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/socket.py", line 576, in readinto
        return self._sock.recv_into(b)
    socket.timeout: timed out
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/test_framework.py", line 126, in main
        self.run_test()
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/wallet_keypool.py", line 132, in run_test
        nodes[0].keypoolrefill(100)
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/coverage.py", line 47, in __call__
        return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/authproxy.py", line 144, in __call__
        response, status = self._request('POST', self.__url.path, postdata.encode('utf-8'))
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/authproxy.py", line 108, in _request
        return self._get_response()
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/authproxy.py", line 175, in _get_response
        self.__conn.timeout)})
    test_framework.authproxy.JSONRPCException: 'keypoolrefill' RPC took longer than 30.000000 seconds. Consider using larger timeout for calls that take longer to return. (-344)
    2020-10-19T02:53:43.103000Z TestFramework (INFO): Stopping nodes
    2020-10-19T02:53:43.136000Z TestFramework.node0 (ERROR): Unable to stop node.
    Traceback (most recent call last):
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/test_node.py", line 319, in stop_node
        self.stop(wait=wait)
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/coverage.py", line 47, in __call__
        return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/authproxy.py", line 144, in __call__
        response, status = self._request('POST', self.__url.path, postdata.encode('utf-8'))
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/authproxy.py", line 107, in _request
        self.__conn.request(method, path, postdata, headers)
      File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/http/client.py", line 1107, in request
        self._send_request(method, url, body, headers)
      File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/http/client.py", line 1142, in _send_request
        self.putrequest(method, url, **skips)
      File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/http/client.py", line 975, in putrequest
        raise CannotSendRequest(self.__state)
    http.client.CannotSendRequest: Request-sent
    2020-10-19T02:54:43.167000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
        def is_node_stopped(self):
            """Checks whether the node has stopped.
    
            Returns True if the node has stopped. False otherwise.
            This method is responsible for freeing resources (self.process)."""
            if not self.running:
                return True
            return_code = self.process.poll()
            if return_code is None:
                return False
    
            # process has stopped. Assert that it didn't return an error code.
            assert return_code == 0, self._node_msg(
                "Node returned non-zero exit code (%d) when stopping" % return_code)
            self.running = False
            self.process = None
            self.rpc_connected = False
            self.rpc = None
            self.log.debug("Node stopped")
            return True
    '''
    [node 0] Cleaning up leftover process
    
    
    stderr:
    Traceback (most recent call last):
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/wallet_keypool.py", line 192, in <module>
        KeyPoolTest().main()
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/test_framework.py", line 149, in main
        exit_code = self.shutdown()
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/test_framework.py", line 273, in shutdown
        self.stop_nodes()
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/test_framework.py", line 521, in stop_nodes
        node.wait_until_stopped()
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/test_node.py", line 362, in wait_until_stopped
        wait_until_helper(self.is_node_stopped, timeout=timeout, timeout_factor=self.timeout_factor)
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/util.py", line 260, in wait_until_helper
        raise AssertionError("Predicate {} not true after {} seconds".format(predicate_source, timeout))
    AssertionError: Predicate ''''
        def is_node_stopped(self):
            """Checks whether the node has stopped.
    
            Returns True if the node has stopped. False otherwise.
            This method is responsible for freeing resources (self.process)."""
            if not self.running:
                return True
            return_code = self.process.poll()
            if return_code is None:
                return False
    
            # process has stopped. Assert that it didn't return an error code.
            assert return_code == 0, self._node_msg(
                "Node returned non-zero exit code (%d) when stopping" % return_code)
            self.running = False
            self.process = None
            self.rpc_connected = False
            self.rpc = None
            self.log.debug("Node stopped")
            return True
    ''' not true after 60.0 seconds
    

    rpc_createmultisig.py --descriptors

    117/172 - rpc_createmultisig.py --descriptors failed, Duration: 105 s
    
    stdout:
    2020-10-19T02:55:06.232000Z TestFramework (INFO): Initializing test directory /var/folders/z2/cn877pxd3czdfh47mfkmbwgm0000gn/T/test_runner_₿_🏃_20201019_104219/rpc_createmultisig_68
    2020-10-19T02:55:21.473000Z TestFramework (INFO): Generating blocks ...
    2020-10-19T02:55:51.511000Z TestFramework (ERROR): JSONRPC error
    Traceback (most recent call last):
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/authproxy.py", line 168, in _get_response
        http_response = self.__conn.getresponse()
      File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/http/client.py", line 1198, in getresponse
        response.begin()
      File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/http/client.py", line 297, in begin
        version, status, reason = self._read_status()
      File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/http/client.py", line 258, in _read_status
        line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
      File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/socket.py", line 576, in readinto
        return self._sock.recv_into(b)
    socket.timeout: timed out
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/test_framework.py", line 126, in main
        self.run_test()
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/rpc_createmultisig.py", line 48, in run_test
        node0.generate(149)
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/test_node.py", line 298, in generate
        return self.generatetoaddress(nblocks=nblocks, address=self.get_deterministic_priv_key().address, maxtries=maxtries)
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/coverage.py", line 47, in __call__
        return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/authproxy.py", line 144, in __call__
        response, status = self._request('POST', self.__url.path, postdata.encode('utf-8'))
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/authproxy.py", line 108, in _request
        return self._get_response()
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/authproxy.py", line 175, in _get_response
        self.__conn.timeout)})
    test_framework.authproxy.JSONRPCException: 'generatetoaddress' RPC took longer than 30.000000 seconds. Consider using larger timeout for calls that take longer to return. (-344)
    2020-10-19T02:55:51.600000Z TestFramework (INFO): Stopping nodes
    2020-10-19T02:55:51.631000Z TestFramework.node0 (ERROR): Unable to stop node.
    Traceback (most recent call last):
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/test_node.py", line 319, in stop_node
        self.stop(wait=wait)
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/coverage.py", line 47, in __call__
        return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/authproxy.py", line 144, in __call__
        response, status = self._request('POST', self.__url.path, postdata.encode('utf-8'))
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/authproxy.py", line 107, in _request
        self.__conn.request(method, path, postdata, headers)
      File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/http/client.py", line 1107, in request
        self._send_request(method, url, body, headers)
      File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/http/client.py", line 1142, in _send_request
        self.putrequest(method, url, **skips)
      File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/http/client.py", line 975, in putrequest
        raise CannotSendRequest(self.__state)
    http.client.CannotSendRequest: Request-sent
    2020-10-19T02:56:51.850000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
        def is_node_stopped(self):
            """Checks whether the node has stopped.
    
            Returns True if the node has stopped. False otherwise.
            This method is responsible for freeing resources (self.process)."""
            if not self.running:
                return True
            return_code = self.process.poll()
            if return_code is None:
                return False
    
            # process has stopped. Assert that it didn't return an error code.
            assert return_code == 0, self._node_msg(
                "Node returned non-zero exit code (%d) when stopping" % return_code)
            self.running = False
            self.process = None
            self.rpc_connected = False
            self.rpc = None
            self.log.debug("Node stopped")
            return True
    '''
    
    
    stderr:
    Traceback (most recent call last):
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/rpc_createmultisig.py", line 221, in <module>
        RpcCreateMultiSigTest().main()
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/test_framework.py", line 149, in main
        exit_code = self.shutdown()
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/test_framework.py", line 273, in shutdown
        self.stop_nodes()
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/test_framework.py", line 521, in stop_nodes
        node.wait_until_stopped()
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/test_node.py", line 362, in wait_until_stopped
        wait_until_helper(self.is_node_stopped, timeout=timeout, timeout_factor=self.timeout_factor)
      File "/Users/michael/github/bitcoin-merge-tree/test/functional/test_framework/util.py", line 260, in wait_until_helper
        raise AssertionError("Predicate {} not true after {} seconds".format(predicate_source, timeout))
    AssertionError: Predicate ''''
        def is_node_stopped(self):
            """Checks whether the node has stopped.
    
            Returns True if the node has stopped. False otherwise.
            This method is responsible for freeing resources (self.process)."""
            if not self.running:
                return True
            return_code = self.process.poll()
            if return_code is None:
                return False
    
            # process has stopped. Assert that it didn't return an error code.
            assert return_code == 0, self._node_msg(
                "Node returned non-zero exit code (%d) when stopping" % return_code)
            self.running = False
            self.process = None
            self.rpc_connected = False
            self.rpc = None
            self.log.debug("Node stopped")
            return True
    ''' not true after 60.0 seconds
    
  2. fanquake added the label Bug on Oct 19, 2020
  3. fanquake added the label Tests on Oct 19, 2020
  4. MarcoFalke added the label macOS on Oct 19, 2020
  5. MarcoFalke commented at 7:26 AM on October 19, 2020: member

    Do they happen with an appropriate --timeout-factor set?

  6. fanquake commented at 10:42 AM on October 19, 2020: member

    Do they happen with an appropriate --timeout-factor set?

    They were only failing when run with the test_runner. It looks like 1.4 is the right value to get them passing:

    test/functional/test_runner.py --jobs=10 --timeout-factor=1.4
    
  7. MarcoFalke commented at 10:59 AM on October 19, 2020: member

    Alternatively you can reduce --jobs=10, probably without degrading the overall run-time

  8. MarcoFalke removed the label Bug on Oct 19, 2020
  9. MarcoFalke added the label Feature on Oct 19, 2020
  10. MarcoFalke added the label Questions and Help on Oct 19, 2020
  11. Sjors commented at 8:54 PM on February 24, 2021: member

    I'm encountering this error about 2/3rd of the time when running a single test, namely test/functional/feature_backwards_compatibility.py --descriptors. At least in the #19013 version of it, which spins up quite a few nodes.

    I've also noticed, as pointed out above, that I have to run the test suite with fewer jobs recently (I used to run with --jobs=100).

    cc @achow101

  12. Purva-Chaudhari commented at 5:20 AM on July 28, 2021: none

    I encountered this issue with --descriptors tests failing on linux. I required a greater --timeout-factor (>2) and the tests passed. (Used --jobs=10 )

  13. fanquake closed this on Jan 21, 2022

  14. Sjors commented at 2:08 PM on January 21, 2022: member

    (I haven't seen this error in ages fwiw)

  15. givanse commented at 5:43 AM on February 20, 2022: contributor

    These were ~consistently~ failing for me on macOS 12.2.1 (Monterey)

    ./test/functional/test_runner.py -j 12
    
    feature_bip68_sequence.py                          | ✖ Failed  | 397 s
    p2p_segwit.py                                      | ✖ Failed  | 202 s
    rpc_createmultisig.py --legacy-wallet              | ✖ Failed  | 205 s
    wallet_create_tx.py --descriptors                  | ✖ Failed  | 186 s
    wallet_create_tx.py --legacy-wallet                | ✖ Failed  | 187 s
    

    After looking at the CI log, I figured I would disable the legacy wallet. I was able to get a successful run by:

    • uninstalling BDB
    • tweaking the arguments per the comments above
    ./test/functional/test_runner.py -j 6 --timeout-factor=2
    
    ALL                                                | ✓ Passed  | 2507 s (accumulated) 
    Runtime: 443 s
    

    The symptoms described in this PR #21410 seem related.


    Edit:

    I can run all the tests, including legacy wallet:

    ./test/functional/test_runner.py -j 2 --timeout-factor=2
    
    ALL                                                | ✓ Passed  | 8113 s (accumulated) 
    Runtime: 4112 s
    

    But it took about 68 minutes on a 2.6 GHz 6-Core Intel Core i7

  16. DrahtBot locked this on Feb 20, 2023

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: 2026-04-13 15:14 UTC

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