Unloading a wallet with in timeframe that is unlocked for crashes RPC server without any log/trace #14452

issue furqansiddiqui opened this issue on October 9, 2018
  1. furqansiddiqui commented at 10:31 PM on October 9, 2018: none

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

    Describe the issue

    For example, you unlock a wallet with "walletpassphrase" command for next 10 seconds, but for some reason unload wallet command is called before the wallet is locked again, it causes RPC server to crash and I didn't find any relevant help from debug.log file

    This is important because whole idea of dynamically loading/unloading wallet is to help build applications that can work with multiple wallets more effectively, while its easy for an application to load all and every wallet but in our case we want to unload wallet right after necessary commands have passed (i.e. in PHP OOP I have registered a shutdown function for all wallets instances to automatically unload)

    What behavior did you expect?

    unload command to return an error message in such circumstances

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    How reliably can you reproduce the issue, what are the steps to do so?

    1. Call "walletpassphrase" to unlock wallet for next N seconds
    2. Issue "unloadwallet" command before those N seconds have passed

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

  2. promag commented at 10:39 PM on October 9, 2018: member

    @furqansiddiqui thanks for the report, fix on it's way.

  3. fanquake added the label RPC/REST/ZMQ on Oct 10, 2018
  4. laanwj closed this on Oct 24, 2018

  5. laanwj referenced this in commit a74ed3a05b on Oct 24, 2018
  6. PastaPastaPasta referenced this in commit 3466bf7071 on Jun 27, 2021
  7. PastaPastaPasta referenced this in commit 1e38d4c633 on Jun 28, 2021
  8. PastaPastaPasta referenced this in commit aeae2b5caa on Jun 29, 2021
  9. PastaPastaPasta referenced this in commit ea211c80a3 on Jul 1, 2021
  10. PastaPastaPasta referenced this in commit 1576f3b470 on Jul 1, 2021
  11. PastaPastaPasta referenced this in commit 52eb9183b1 on Jul 1, 2021
  12. PastaPastaPasta referenced this in commit 631020a6e8 on Jul 3, 2021
  13. DrahtBot locked this on Sep 8, 2021
  14. gades referenced this in commit 6fd757febb on May 31, 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: 2026-04-13 15:15 UTC

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