A series of RPC calls can lead to a crash #1961

issue cgaebel openend this issue on October 25, 2012
  1. cgaebel commented at 4:45 pm on October 25, 2012: none

    I have found the following series of RPC calls that can make bitcoind crash. You need to know the rpc username and password, as well as the wallet password.

     0#!/bin/bash
     1
     2RPCUSER=1
     3RPCPASSWORD=2
     4WALLETPASSWORD=1
     5
     6set -e
     7
     8for n in {1..999};
     9do
    10    bitcoind -rpcuser=$RPCUSER -rpcpassword=$RPCPASSWORD walletpassphrase $WALLETPASSWORD 99999
    11    bitcoind -rpcuser=$RPCUSER -rpcpassword=$RPCPASSWORD walletlock
    12    echo -n "$n "
    13done
    

    This is due to the re-locking not killing the previous re-locking thread before starting itself. This has a negative impact on my application, which does frequent locks and unlocks.

  2. Diapolo commented at 12:43 pm on November 17, 2012: none
    @wowus Is this related to the problem described in #1960 and the mentioned fix? Can you check if current master fixes this for you.
  3. sipa commented at 11:05 pm on December 4, 2012: member
    @Diapolo It’s unrelated.
  4. sipa commented at 11:21 pm on April 23, 2013: member
    I think we should have a look at this before 0.8.2.
  5. Diapolo commented at 9:21 pm on May 2, 2013: none
    walletpassphrase starts 2 threads, ThreadTopUpKeyPool() and ThreadCleanWalletPassphrase() I guess there is something wrong here when calling walletlock, while the ThreadCleanWalletPassphrase() is still running?
  6. gavinandresen commented at 9:41 pm on May 2, 2013: contributor
    The wallet passphrase logic should be rewritten, preferably using a boost::asio timer (we’re using boost::asio for RPC anyway).
  7. gavinandresen commented at 3:38 pm on May 7, 2013: contributor
    Should be fixed by #2625
  8. gavinandresen commented at 1:52 pm on May 9, 2013: contributor
    @wowus : I cannot reproduce this either, even on my wimpy 32-bit OSX 10.6 laptop. What OS/machine configuration are you running on?
  9. cgaebel commented at 10:13 pm on May 9, 2013: none
    Arch Linux Intel x86_64
  10. gavinandresen commented at 3:27 am on August 16, 2013: contributor
    Closing as “we can’t reproduce”
  11. gavinandresen closed this on Aug 16, 2013

  12. KolbyML referenced this in commit 740f958bea on Dec 5, 2020
  13. KolbyML referenced this in commit a0afd9f625 on Dec 5, 2020
  14. MarcoFalke locked this on Sep 8, 2021

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-09-29 04:12 UTC

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