wallet_descriptor intermittent error “Please enter the wallet passphrase with walletpassphrase first. (-13)” #18811

issue MarcoFalke openend this issue on April 29, 2020
  1. MarcoFalke added the label Bug on Apr 29, 2020
  2. promag commented at 2:07 am on April 29, 2020: member

    In that run it took more than 10 seconds which is the unlock timeout.

    02020-04-28T17:12:01.196000Z TestFramework (INFO): Test that unlock is needed when deriving only hardened keys in an encrypted wallet
    12020-04-28T17:12:01.345000Z TestFramework (ERROR): JSONRPC error
    

    And on my system it took around 3 seconds.

    So maybe just increase the timeout (if this happens often) in https://github.com/bitcoin/bitcoin/blob/ba348dbc518b8e082a5dc3a225432fdacf859a13/test/functional/wallet_descriptor.py#L114

  3. MarcoFalke commented at 2:16 am on April 29, 2020: member
    No? It took 0.149000 seconds?
  4. promag commented at 2:21 am on April 29, 2020: member
    Oh right!
  5. promag commented at 2:55 am on April 29, 2020: member

    The issue is a race between the 2nd walletpassphrase and the 1st lock callback. This was introduced in #18481.

    From the logs

    02020-04-28T17:11:50.607000Z TestFramework (INFO): Test encryption
    12020-04-28T17:11:51.349000Z TestFramework (INFO): Test that getnewaddress still works after keypool is exhausted in an encrypted wallet
    22020-04-28T17:12:01.196000Z TestFramework (INFO): Test that unlock is needed when deriving only hardened keys in an encrypted wallet
    32020-04-28T17:12:01.345000Z TestFramework (ERROR): JSONRPC error
    

    Little more than 10 seconds passed between the 1st walletpassphrase and the error, so in practice, the 2nd walletpassphrase was canceled by the 1st timeout.

    I’ll submit a possible fix.

  6. fanquake closed this on May 13, 2020

  7. sidhujag referenced this in commit c7204ec263 on May 14, 2020
  8. DrahtBot locked this on Feb 15, 2022


MarcoFalke promag

Labels
Bug


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: 2024-11-17 12:12 UTC

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