I'm running Debian 11, all updates installed. 12gb RAM, massive internal SSD for storage.

$ /usr/local/bin/bitcoin-25.0/bin/bitcoin-cli stop has worked well shutting down bitcoind on my computer until today, when it seems to have hanged half way through the usual process.

$ tail .bitcoin/debug.log shows:

2023-11-27T13:51:11Z tor: Thread interrupt
2023-11-27T13:51:11Z torcontrol thread exit
2023-11-27T13:51:11Z Shutdown: In progress...
2023-11-27T13:51:11Z addcon thread exit
2023-11-27T13:51:11Z opencon thread exit
2023-11-27T13:51:11Z net thread exit
2023-11-27T13:51:11Z msghand thread exit
2023-11-27T14:20:38Z Potential stale tip [snipped]
2023-11-27T14:31:08Z Potential stale tip [snipped]
2023-11-27T14:41:38Z Potential stale tip [snipped]

... $ ps ax | fgrep bitcoind shows:

  1399 ?        SLl  171:06 /usr/local/bin/bitcoin-25.0/bin/bitcoind
  10818 pts/0    S+     0:00 grep -F bitcoind

... and $ top reveals:

 1399 [username] 20 0 4218920 1.0g 184480 S 0.3 8.5 171:06.03 b-shutoff

... so only 0.3% CPU used; mostly, b-shutoff doesn't show up at all in $ top's output, so b-shutoff is definitely not working hard.

Contents of .bitcoin/ are:


... so no "lock" file visible there.

So, did I do anything unusual before I entered bitcoin-cli stop? Yes, two things I don't usually do:

  1. Some hours before the attempted stop, I ran rescan, which seems to have worked perfectly well.

  2. I was running bisq when I entered bitcoin-cli stop. I have now closed bisq ("A bit late now!" you might say...) but the b-shutoff is still hung.

Would be grateful for any suggestions, or questions you might have that could help me out closing the daemon gracefully.

Edit, some hours later. Needed to press on, tried to quit the bitcoind/b-shutoff PID from $ top command, but that didn't work so I rebooted the machine. Back up now, quick look around in the .bitcoin dir and oh, looky here--the lock file was a hidden file, no wonder I didn't see it earlier! Doh. So, $ rm the .lock file, and now bitcoind is running fine again, nothing untoward to report.

Further edit, I tried to give a "b-shutoff" tag to this post, but no such tag exists, and I see "Creating the new tag 'b-shutoff' requires at least 150 reputation." I think it would be a useful tag, so if I may suggest it, if anybody with 150 reputation agrees, please make one :)

  • It's possible to run multiple bitcoind instances on a single machine. The command bitcoind --testnet will run bitcoind on testnet. To stop your testnet bitcoind you should run bitcoind --testnet stop. Is it possible you have a bitcoind instance running on another bitcoindir
    – Erik
    Nov 30, 2023 at 8:48


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.