Skip to content

test: wallet_importdescriptors.py --descriptors failure #27282

@fanquake

Description

@fanquake

Seen on a aarch64 Alpine box. Master @ 40e1c4d. Binaries compiled with Clang 15.0.7. Valgrind valgrind-3.21.0.GIT.

We saw some issues with this test recently (#27229), but this looks like a different issue:

261/262 - wallet_importdescriptors.py --descriptors failed, Duration: 411 s

stdout:
2023-03-20T10:39:03.422000Z TestFramework (INFO): PRNG seed is: 4441145092714460381
2023-03-20T10:39:03.423000Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20230320_101936/wallet_importdescriptors_88
2023-03-20T10:39:08.174000Z TestFramework (INFO): Setting up wallets
2023-03-20T10:39:09.056000Z TestFramework (INFO): Mining coins
2023-03-20T10:39:10.636000Z TestFramework (INFO): Import should fail if a descriptor is not provided
2023-03-20T10:39:10.649000Z TestFramework (INFO): Should import a p2pkh descriptor
2023-03-20T10:39:10.799000Z TestFramework (INFO): Test can import same descriptor with public key twice
2023-03-20T10:39:10.835000Z TestFramework (INFO): Test can update descriptor label
2023-03-20T10:39:10.870000Z TestFramework (INFO): Internal addresses cannot have labels
2023-03-20T10:39:10.874000Z TestFramework (INFO): Internal addresses should be detected as such
2023-03-20T10:39:10.915000Z TestFramework (INFO): Should not import a p2sh-p2wpkh descriptor without checksum
2023-03-20T10:39:10.919000Z TestFramework (INFO): Should not import a p2sh-p2wpkh descriptor that has range specified
2023-03-20T10:39:10.926000Z TestFramework (INFO): Should not import a p2sh-p2wpkh descriptor and have it set to active
2023-03-20T10:39:10.930000Z TestFramework (INFO): Should import a (non-active) p2sh-p2wpkh descriptor
2023-03-20T10:39:11.107000Z TestFramework (INFO): Should import a 1-of-2 bare multisig from descriptor
2023-03-20T10:39:11.147000Z TestFramework (INFO): Should not treat individual keys from the imported bare multisig as watchonly
2023-03-20T10:39:11.151000Z TestFramework (INFO): Ranged descriptors cannot have labels
2023-03-20T10:39:11.160000Z TestFramework (INFO): Private keys required for private keys enabled wallet
2023-03-20T10:39:11.177000Z TestFramework (INFO): Ranged descriptor import should warn without a specified range
2023-03-20T10:39:11.234000Z TestFramework (INFO): Should not import a ranged descriptor that includes xpriv into a watch-only wallet
2023-03-20T10:39:11.242000Z TestFramework (INFO): Should not import a descriptor with hardened derivations when private keys are disabled
2023-03-20T10:39:11.281000Z TestFramework (INFO): Verify we can only extend descriptor's range
2023-03-20T10:39:11.765000Z TestFramework (INFO): Check we can change descriptor internal flag
2023-03-20T10:39:12.046000Z TestFramework (INFO): Key ranges should be imported in order
2023-03-20T10:39:12.431000Z TestFramework (INFO): Check we can change next_index
2023-03-20T10:39:12.709000Z TestFramework (INFO): Check imported descriptors are not active by default
2023-03-20T10:39:12.754000Z TestFramework (INFO): Check can activate inactive descriptor
2023-03-20T10:39:12.811000Z TestFramework (INFO): Check can deactivate active descriptor
2023-03-20T10:39:12.862000Z TestFramework (INFO): Verify activation state is persistent
2023-03-20T10:39:12.942000Z TestFramework (INFO): Should import a descriptor with a WIF private key as spendable
2023-03-20T10:39:12.978000Z TestFramework (INFO): Test can import same descriptor with private key twice
2023-03-20T10:39:14.574000Z TestFramework (INFO): Test that multisigs can be imported, signed for, and getnewaddress'd
2023-03-20T10:39:35.707000Z TestFramework (INFO): Multisig with distributed keys
2023-03-20T10:39:46.670000Z TestFramework (INFO): We can create and use a huge multisig under P2WSH
2023-03-20T10:40:19.550000Z TestFramework (INFO): Under P2SH, multisig are standard with up to 15 compressed keys
2023-03-20T10:40:45.496000Z TestFramework (INFO): Amending multisig with new private keys
2023-03-20T10:40:51.063000Z TestFramework (INFO): Combo descriptors cannot be active
2023-03-20T10:40:51.068000Z TestFramework (INFO): Descriptors with no type cannot be active
2023-03-20T10:40:51.127000Z TestFramework (INFO): Test importing a descriptor to an encrypted wallet
2023-03-20T10:41:54.188000Z TestFramework (INFO): Stopping nodes
2023-03-20T10:45:54.240000Z 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 1] Cleaning up leftover process
[node 0] Cleaning up leftover process


stderr:
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/bitcoin/test/functional/test_framework/coverage.py", line 49, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/bitcoin/test/functional/test_framework/authproxy.py", line 149, in __call__
    raise JSONRPCException(response['error'], status)
test_framework.authproxy.JSONRPCException: Error: Please enter the wallet passphrase with walletpassphrase first. (-13)
Traceback (most recent call last):
  File "/bitcoin/test/functional/wallet_importdescriptors.py", line 717, in <module>
    ImportDescriptorsTest().main()
  File "/bitcoin/test/functional/test_framework/test_framework.py", line 155, in main
    exit_code = self.shutdown()
  File "/bitcoin/test/functional/test_framework/test_framework.py", line 314, in shutdown
    self.stop_nodes()
  File "/bitcoin/test/functional/test_framework/test_framework.py", line 582, in stop_nodes
    node.wait_until_stopped()
  File "/bitcoin/test/functional/test_framework/test_node.py", line 388, in wait_until_stopped
    wait_until_helper(self.is_node_stopped, timeout=timeout, timeout_factor=self.timeout_factor)
  File "/bitcoin/test/functional/test_framework/util.py", line 281, 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 240 seconds

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions