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

Closed
cgaebel opened this Issue Oct 25, 2012 · 9 comments

Comments

Projects
None yet
4 participants
@cgaebel

cgaebel commented Oct 25, 2012

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.

#!/bin/bash

RPCUSER=1
RPCPASSWORD=2
WALLETPASSWORD=1

set -e

for n in {1..999};
do
    bitcoind -rpcuser=$RPCUSER -rpcpassword=$RPCPASSWORD walletpassphrase $WALLETPASSWORD 99999
    bitcoind -rpcuser=$RPCUSER -rpcpassword=$RPCPASSWORD walletlock
    echo -n "$n "
done

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.

@Diapolo

This comment has been minimized.

Show comment Hide comment
@Diapolo

Diapolo Nov 17, 2012

@wowus Is this related to the problem described in #1960 and the mentioned fix? Can you check if current master fixes this for you.

Diapolo commented Nov 17, 2012

@wowus Is this related to the problem described in #1960 and the mentioned fix? Can you check if current master fixes this for you.

@sipa

This comment has been minimized.

Show comment Hide comment
@sipa

sipa Dec 4, 2012

Owner

@Diapolo It's unrelated.

Owner

sipa commented Dec 4, 2012

@Diapolo It's unrelated.

@sipa

This comment has been minimized.

Show comment Hide comment
@sipa

sipa Apr 23, 2013

Owner

I think we should have a look at this before 0.8.2.

Owner

sipa commented Apr 23, 2013

I think we should have a look at this before 0.8.2.

@Diapolo

This comment has been minimized.

Show comment Hide comment
@Diapolo

Diapolo May 2, 2013

walletpassphrase starts 2 threads, ThreadTopUpKeyPool() and ThreadCleanWalletPassphrase() I guess there is something wrong here when calling walletlock, while the ThreadCleanWalletPassphrase() is still running?

Diapolo commented May 2, 2013

walletpassphrase starts 2 threads, ThreadTopUpKeyPool() and ThreadCleanWalletPassphrase() I guess there is something wrong here when calling walletlock, while the ThreadCleanWalletPassphrase() is still running?

@gavinandresen

This comment has been minimized.

Show comment Hide comment
@gavinandresen

gavinandresen 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).

Contributor

gavinandresen commented May 2, 2013

The wallet passphrase logic should be rewritten, preferably using a boost::asio timer (we're using boost::asio for RPC anyway).

@gavinandresen

This comment has been minimized.

Show comment Hide comment
@gavinandresen

gavinandresen May 7, 2013

Contributor

Should be fixed by #2625

Contributor

gavinandresen commented May 7, 2013

Should be fixed by #2625

@gavinandresen

This comment has been minimized.

Show comment Hide comment
@gavinandresen

gavinandresen 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?

Contributor

gavinandresen commented May 9, 2013

@wowus : I cannot reproduce this either, even on my wimpy 32-bit OSX 10.6 laptop. What OS/machine configuration are you running on?

@cgaebel

This comment has been minimized.

Show comment Hide comment
@cgaebel

cgaebel May 9, 2013

Arch Linux Intel x86_64

cgaebel commented May 9, 2013

Arch Linux Intel x86_64

@gavinandresen

This comment has been minimized.

Show comment Hide comment
@gavinandresen

gavinandresen Aug 16, 2013

Contributor

Closing as "we can't reproduce"

Contributor

gavinandresen commented Aug 16, 2013

Closing as "we can't reproduce"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment