Log shutdown signals #1994

issue cinderblock opened this issue on November 9, 2012
  1. cinderblock commented at 5:23 AM on November 9, 2012: none

    bitcoind should write to debug.log when it receives a shutdown signal so operator knows signal was sent while debugging/setup and for general logging.

    Story

    As a new bitcoind operator, it was not evident to me why bitcoind was running so slow. This manifested in several ways:

    • RPC calls from localhost took 1-2 mins
    • uptime went through the roof
    • shutdown also took 1-2 mins

    I have since realized the obvious (now that I understand bitcoin better) that I'm still verifying my own block chain. (This is taking freaking forever! I know I could use a lightweight...)

    Rational

    What I've proposed is a simple change that would significantly help new users and ensure proper logging of significant events.

    If debug.log had printed a trivial message that it had started it's shutdown process, I wouldn't have been pulling my hair out trying to figure out why killing it was doing nothing. (I was watching tail -f debug.log)

    Related note

    Adding to debug.log that the local blockchain is behind by more than ~2 blocks and that some time may be required to catch up would also be very useful, especially for people unfamiliar with bitcoin[d].

  2. Diapolo commented at 1:09 PM on October 24, 2013: none

    @cinderblock I recently added a commit, that logs start and end of our Shutdown() function, does that help you? Look for Shutdown : In progress... and Shutdown : done messages in your debug.log (running with latest master).

    If this helps, please close the ticket for yourself.

  3. laanwj closed this on Sep 25, 2014

  4. KolbyML referenced this in commit 78726e46f3 on Dec 5, 2020
  5. DrahtBot locked this on Sep 8, 2021
Contributors

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-22 06:16 UTC

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