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:

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

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

    02020-10-06T17:34:21Z Using wallet directory /home/hebasto/walletdir
    12020-10-06T17:34:21Z init message: Verifying wallet(s)...
    22020-10-06T17:34:21Z Using BerkeleyDB version Berkeley DB 5.3.28: (September  9, 2013)
    32020-10-06T17:34:21Z Using wallet /home/hebasto/walletdir/wr-201006/wallet.dat
    42020-10-06T17:34:21Z ERROR: Error while attempting to lock directory /home/hebasto/walletdir/wr-201006: Resource temporarily unavailable
    52020-10-06T17:34:21Z Error: Cannot obtain a lock on wallet directory /home/hebasto/walletdir/wr-201006. Bitcoin Core is probably already running.
    6Error: Cannot obtain a lock on wallet directory /home/hebasto/walletdir/wr-201006. Bitcoin Core is probably already running.
    72020-10-06T17:34:21Z Shutdown: In progress...
    82020-10-06T17:34:21Z scheduler thread exit
    92020-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:
    0                                   AssertionError: [node 1] Expected message 
    1"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:
    2                                   
    3"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: member

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

    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. meshcollider commented at 10:45 am on October 8, 2020: contributor
    Approach ACK
  16. hebasto force-pushed on Oct 10, 2020
  17. hebasto force-pushed on Oct 10, 2020
  18. hebasto marked this as ready for review on Oct 10, 2020
  19. hebasto commented at 2:47 pm on October 10, 2020: member
    Fixed Windows paths.
  20. DrahtBot added the label Needs rebase on Oct 15, 2020
  21. hebasto force-pushed on Oct 15, 2020
  22. hebasto commented at 12:46 pm on October 15, 2020: member
    Rebased 33d49d717fad2d11bbc1e8476cb1bcd488a83a43 -> 76ab0e76a91c833754b460f9137c061726db779c (pr20094.06 -> pr20094.07) due to the conflict with #19077.
  23. DrahtBot removed the label Needs rebase on Oct 15, 2020
  24. DrahtBot added the label Needs rebase on Oct 29, 2020
  25. 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
  26. [DO NOT MERGE] ci: Temporarily enable the functional tests on AppVeyor 7504cac0a2
  27. hebasto force-pushed on Oct 29, 2020
  28. hebasto commented at 3:22 pm on October 29, 2020: member
    Rebased 76ab0e76a91c833754b460f9137c061726db779c -> 7504cac0a2975d91cea55211e804c4a32e1f1328 (pr20094.07 -> pr20094.08) due to the conflict with #20186.
  29. DrahtBot removed the label Needs rebase on Oct 29, 2020
  30. hebasto marked this as a draft on Oct 30, 2020
  31. hebasto commented at 8:30 pm on May 29, 2021: member
    This does not make sense with SQLite wallets.
  32. hebasto closed this on May 29, 2021

  33. DrahtBot locked this on Aug 18, 2022

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-12-18 15:12 UTC

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