wallet: Unify wallet directory lock error message #20094

pull hebasto wants to merge 2 commits into bitcoin:master from hebasto:201006-name changing 6 files +9 −13
  1. hebasto commented at 5:52 PM on October 6, 2020: member

    On master (875e1ccc9fe01e026e564dfd39a64d9a4b332a89) a redundant log message is printed, and it uses "bitcoin" instead of PACKAGE_NAME:

    2020-10-06T17:36:44Z Using wallet directory /home/hebasto/walletdir
    2020-10-06T17:36:44Z init message: Verifying wallet(s)...
    2020-10-06T17:36:44Z Using BerkeleyDB version Berkeley DB 5.3.28: (September  9, 2013)
    2020-10-06T17:36:44Z Using wallet /home/hebasto/walletdir/wr-201006/wallet.dat
    2020-10-06T17:36:44Z ERROR: Error while attempting to lock directory /home/hebasto/walletdir/wr-201006: Resource temporarily unavailable
    2020-10-06T17:36:44Z Cannot obtain a lock on wallet directory /home/hebasto/walletdir/wr-201006. Another instance of bitcoin may be using it.
    2020-10-06T17:36:44Z Error: Error initializing wallet database environment "/home/hebasto/walletdir/wr-201006"!
    Error: Error initializing wallet database environment "/home/hebasto/walletdir/wr-201006"!
    2020-10-06T17:36:44Z Shutdown: In progress...
    2020-10-06T17:36:44Z scheduler thread exit
    2020-10-06T17:36:44Z Shutdown: done
    

    This PR removes redundant LogPrintf call, and unifies error message wording with the similar datadir lock error message:

    2020-10-06T17:34:21Z Using wallet directory /home/hebasto/walletdir
    2020-10-06T17:34:21Z init message: Verifying wallet(s)...
    2020-10-06T17:34:21Z Using BerkeleyDB version Berkeley DB 5.3.28: (September  9, 2013)
    2020-10-06T17:34:21Z Using wallet /home/hebasto/walletdir/wr-201006/wallet.dat
    2020-10-06T17:34:21Z ERROR: Error while attempting to lock directory /home/hebasto/walletdir/wr-201006: Resource temporarily unavailable
    2020-10-06T17:34:21Z Error: Cannot obtain a lock on wallet directory /home/hebasto/walletdir/wr-201006. Bitcoin Core is probably already running.
    Error: Cannot obtain a lock on wallet directory /home/hebasto/walletdir/wr-201006. Bitcoin Core is probably already running.
    2020-10-06T17:34:21Z Shutdown: In progress...
    2020-10-06T17:34:21Z scheduler thread exit
    2020-10-06T17:34:21Z Shutdown: done
    
  2. DrahtBot added the label Wallet on Oct 6, 2020
  3. hebasto force-pushed on Oct 6, 2020
  4. hebasto force-pushed on Oct 6, 2020
  5. hebasto marked this as a draft on Oct 7, 2020
  6. hebasto force-pushed on Oct 7, 2020
  7. hebasto marked this as ready for review on Oct 7, 2020
  8. MarcoFalke renamed this:
    wallet, log, qa: Unify wallet directory lock error message
    wallet: Unify wallet directory lock error message
    on Oct 7, 2020
  9. MarcoFalke commented at 7:06 AM on October 7, 2020: member

    Concept ACK. Though, this changes a translation string.

  10. MarcoFalke added this to the milestone 0.22.0 on Oct 7, 2020
  11. hebasto force-pushed on Oct 7, 2020
  12. in test/functional/wallet_multiwallet.py:155 in ef9a28fac1 outdated
     150 | @@ -151,8 +151,8 @@ def wallet_file(name):
     151 |          competing_wallet_dir = os.path.join(self.options.tmpdir, 'competing_walletdir')
     152 |          os.mkdir(competing_wallet_dir)
     153 |          self.restart_node(0, ['-walletdir=' + competing_wallet_dir])
     154 | -        exp_stderr = r"Error: Error initializing wallet database environment \"\S+competing_walletdir\"!"
     155 | -        self.nodes[1].assert_start_raises_init_error(['-walletdir=' + competing_wallet_dir], exp_stderr, match=ErrorMatch.PARTIAL_REGEX)
     156 | +        exp_stderr = "Error: Cannot obtain a lock on wallet directory {0}. {1} is probably already running.".format(competing_wallet_dir, self.config['environment']['PACKAGE_NAME'])
     157 | +        self.nodes[1].assert_start_raises_init_error(['-walletdir=' + competing_wallet_dir], exp_stderr)
    


    MarcoFalke commented at 8:30 AM on October 7, 2020:

    Would also be good to temporarily enable the functional tests on appveyor again to see if the full path works on windows as well


    hebasto commented at 10:01 AM on October 7, 2020:

    MarcoFalke commented at 2:02 PM on October 7, 2020:
                                       AssertionError: [node 1] Expected message 
    "Error: Cannot obtain a lock on wallet directory C:\Users\appveyor\AppData\Local\Temp\1\test_runner_₿_🏃_20201007_132949\wallet_multiwallet_117\competing_walletdir. Bitcoin Core is probably already running." does not fully match stderr:
                                       
    "Error: Cannot obtain a lock on wallet directory C:/Users\appveyor\AppData\Local\Temp\1\test_runner_₿_🏃_20201007_132949\wallet_multiwallet_117\competing_walletdir. Bitcoin Core is probably already running."
    

    meshcollider commented at 10:44 AM on October 8, 2020:

    Lol that's fun ^


    hebasto commented at 2:48 PM on October 10, 2020:

    Fixed.

    https://ci.appveyor.com/project/DrahtBot/bitcoin/builds/35676234: wallet_multiwallet.py and feature_filelock.py passed. @MarcoFalke Could the "[DO NOT MERGE] ci: Temporarily enable the functional tests on AppVeyor" commit be dropped?

  13. hebasto marked this as a draft on Oct 7, 2020
  14. DrahtBot commented at 7:32 PM on October 7, 2020: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #20267 (Disable and fix tests for when BDB is not compiled by achow101)
    • #18788 (tests: Update more tests to work with descriptor wallets by achow101)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  15. DrahtBot cross-referenced this on Oct 7, 2020 from issue wallet: Add sqlite as an alternative wallet database and use it for new descriptor wallets by achow101
  16. meshcollider commented at 10:45 AM on October 8, 2020: contributor

    Approach ACK

  17. hebasto force-pushed on Oct 10, 2020
  18. hebasto force-pushed on Oct 10, 2020
  19. hebasto marked this as ready for review on Oct 10, 2020
  20. hebasto commented at 2:47 PM on October 10, 2020: member

    Fixed Windows paths.

  21. DrahtBot cross-referenced this on Oct 12, 2020 from issue rpc, wallet: Expose database format in getwalletinfo by promag
  22. DrahtBot added the label Needs rebase on Oct 15, 2020
  23. hebasto force-pushed on Oct 15, 2020
  24. hebasto commented at 12:46 PM on October 15, 2020: member

    Rebased 33d49d717fad2d11bbc1e8476cb1bcd488a83a43 -> 76ab0e76a91c833754b460f9137c061726db779c (pr20094.06 -> pr20094.07) due to the conflict with #19077.

  25. DrahtBot removed the label Needs rebase on Oct 15, 2020
  26. DrahtBot cross-referenced this on Oct 16, 2020 from issue tests: Update more tests to work with descriptor wallets by achow101
  27. DrahtBot cross-referenced this on Oct 19, 2020 from issue wallet: Make -wallet setting not create wallets by ryanofsky
  28. DrahtBot cross-referenced this on Oct 29, 2020 from issue wallet: Create named SQLite wallet files instead of wallet directories by achow101
  29. DrahtBot added the label Needs rebase on Oct 29, 2020
  30. wallet, log, qa: Unify wallet directory lock error message
    This change removes redundant LogPrintf call, and unifies error message
    wording with the similar datadir lock error message.
    729b5775bc
  31. [DO NOT MERGE] ci: Temporarily enable the functional tests on AppVeyor 7504cac0a2
  32. hebasto force-pushed on Oct 29, 2020
  33. hebasto commented at 3:22 PM on October 29, 2020: member

    Rebased 76ab0e76a91c833754b460f9137c061726db779c -> 7504cac0a2975d91cea55211e804c4a32e1f1328 (pr20094.07 -> pr20094.08) due to the conflict with #20186.

  34. DrahtBot removed the label Needs rebase on Oct 29, 2020
  35. DrahtBot cross-referenced this on Oct 30, 2020 from issue Disable and fix tests for when BDB is not compiled by achow101
  36. hebasto marked this as a draft on Oct 30, 2020
  37. hebasto commented at 8:30 PM on May 29, 2021: member

    This does not make sense with SQLite wallets.

  38. hebasto closed this on May 29, 2021

  39. bitcoin locked this on Aug 18, 2022
Labels

Milestone
22.0


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-20 06:54 UTC