Issue with `wallet_importdescriptors.py --descriptors` under valgrind #27229

issue fanquake opened this issue on March 8, 2023
  1. fanquake commented at 9:03 PM on March 8, 2023: member

    This was running #27226 rebased on master (at the time 8d12127a9c19cb218d661a88ab9b6871c9d853b9).

    256/256 - wallet_importdescriptors.py --descriptors failed, Duration: 3065 s 
    
    stdout:
    2023-03-08T19:51:27.647000Z TestFramework (INFO): PRNG seed is: 266766692547859291
    2023-03-08T19:51:27.648000Z TestFramework (INFO): Initializing test directory /home/ubuntu/ci_scratch/ci/scratch/test_runner/test_runner_₿_🏃_20230308_165259/wallet_importdescriptors_86
    2023-03-08T19:51:44.422000Z TestFramework (INFO): Setting up wallets
    2023-03-08T19:51:48.643000Z TestFramework (INFO): Mining coins
    2023-03-08T19:52:01.196000Z TestFramework (INFO): Import should fail if a descriptor is not provided
    2023-03-08T19:52:01.232000Z TestFramework (INFO): Should import a p2pkh descriptor
    2023-03-08T19:52:02.257000Z TestFramework (INFO): Test can import same descriptor with public key twice
    2023-03-08T19:52:02.481000Z TestFramework (INFO): Test can update descriptor label
    2023-03-08T19:52:02.732000Z TestFramework (INFO): Internal addresses cannot have labels
    2023-03-08T19:52:02.746000Z TestFramework (INFO): Internal addresses should be detected as such
    2023-03-08T19:52:02.987000Z TestFramework (INFO): Should not import a p2sh-p2wpkh descriptor without checksum
    2023-03-08T19:52:03.000000Z TestFramework (INFO): Should not import a p2sh-p2wpkh descriptor that has range specified
    2023-03-08T19:52:03.049000Z TestFramework (INFO): Should not import a p2sh-p2wpkh descriptor and have it set to active
    2023-03-08T19:52:03.065000Z TestFramework (INFO): Should import a (non-active) p2sh-p2wpkh descriptor
    2023-03-08T19:52:03.976000Z TestFramework (INFO): Should import a 1-of-2 bare multisig from descriptor
    2023-03-08T19:52:04.260000Z TestFramework (INFO): Should not treat individual keys from the imported bare multisig as watchonly
    2023-03-08T19:52:04.284000Z TestFramework (INFO): Ranged descriptors cannot have labels
    2023-03-08T19:52:04.346000Z TestFramework (INFO): Private keys required for private keys enabled wallet
    2023-03-08T19:52:04.407000Z TestFramework (INFO): Ranged descriptor import should warn without a specified range
    2023-03-08T19:52:04.902000Z TestFramework (INFO): Should not import a ranged descriptor that includes xpriv into a watch-only wallet
    2023-03-08T19:52:04.959000Z TestFramework (INFO): Should not import a descriptor with hardened derivations when private keys are disabled
    2023-03-08T19:52:05.233000Z TestFramework (INFO): Verify we can only extend descriptor's range
    2023-03-08T19:52:07.965000Z TestFramework (INFO): Check we can change descriptor internal flag
    2023-03-08T19:52:09.524000Z TestFramework (INFO): Key ranges should be imported in order
    2023-03-08T19:52:13.027000Z TestFramework (INFO): Check we can change next_index
    2023-03-08T19:52:16.359000Z TestFramework (INFO): Check imported descriptors are not active by default
    2023-03-08T19:52:16.960000Z TestFramework (INFO): Check can activate inactive descriptor
    2023-03-08T19:52:17.750000Z TestFramework (INFO): Check can deactivate active descriptor
    2023-03-08T19:52:18.480000Z TestFramework (INFO): Verify activation state is persistent
    2023-03-08T19:52:19.073000Z TestFramework (INFO): Should import a descriptor with a WIF private key as spendable
    2023-03-08T19:52:19.323000Z TestFramework (INFO): Test can import same descriptor with private key twice
    2023-03-08T19:52:25.121000Z TestFramework (INFO): Test that multisigs can be imported, signed for, and getnewaddress'd
    2023-03-08T19:53:23.322000Z TestFramework (INFO): Multisig with distributed keys
    2023-03-08T19:53:58.924000Z TestFramework (INFO): We can create and use a huge multisig under P2WSH
    2023-03-08T19:55:33.870000Z TestFramework (INFO): Under P2SH, multisig are standard with up to 15 compressed keys
    2023-03-08T19:56:49.926000Z TestFramework (INFO): Amending multisig with new private keys
    2023-03-08T19:57:09.705000Z TestFramework (INFO): Combo descriptors cannot be active
    2023-03-08T19:57:09.748000Z TestFramework (INFO): Descriptors with no type cannot be active
    2023-03-08T19:57:10.542000Z TestFramework (INFO): Test importing a descriptor to an encrypted wallet
    2023-03-08T20:02:32.611000Z TestFramework (INFO): Stopping nodes
    2023-03-08T20:42:32.654000Z 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:
    Traceback (most recent call last):
      File "/home/ubuntu/ci_scratch/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/wallet_importdescriptors.py", line 699, in <module>
        ImportDescriptorsTest().main()
      File "/home/ubuntu/ci_scratch/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 157, in main
        exit_code = self.shutdown()
      File "/home/ubuntu/ci_scratch/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 313, in shutdown
        self.stop_nodes()
      File "/home/ubuntu/ci_scratch/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 581, in stop_nodes
        node.wait_until_stopped()
      File "/home/ubuntu/ci_scratch/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/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 "/home/ubuntu/ci_scratch/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/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 2400.0 seconds
    

    See here for combined log: https://gist.github.com/fanquake/b9e9669a2023118908d7a91e9cb117b7

  2. fanquake added the label Bug on Mar 8, 2023
  3. fanquake added the label Tests on Mar 8, 2023
  4. maflcko commented at 9:08 PM on March 8, 2023: member

    Looks like node0 exits the http thread, but forgets to actually shut down?

     node0 2023-03-08T20:02:32.703470Z [http] [httpserver.cpp:307] [ThreadHTTP] [http] Exited http event loop 
     node0 2023-03-08T20:06:42.411033Z [scheduler] [net.cpp:1532] [DumpAddresses] [net] Flushed 0 addresses to peers.dat  14ms 
     node0 2023-03-08T20:21:42.423331Z [scheduler] [net.cpp:1532] [DumpAddresses] [net] Flushed 0 addresses to peers.dat  10ms 
     node0 2023-03-08T20:36:42.434867Z [scheduler] [net.cpp:1532] [DumpAddresses] [net] Flushed 0 addresses to peers.dat  10ms 
    
  5. maflcko commented at 12:50 PM on March 10, 2023: member

    Maybe re-try after #27199 ?

  6. fanquake commented at 1:34 PM on March 10, 2023: member

    Maybe re-try after #27199 ?

    Running that on master at the moment.

  7. maflcko commented at 1:38 PM on March 10, 2023: member

    I don't think it currently works in the current form.

  8. maflcko commented at 9:29 PM on March 16, 2023: member
  9. maflcko closed this on Mar 16, 2023

  10. bitcoin locked this on Mar 15, 2024

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-05-03 15:13 UTC

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