Client keeps updating tip after Shutdown requested #3966

issue laanwj openend this issue on March 27, 2014
  1. laanwj commented at 11:00 am on March 27, 2014: member

    I’ve shut down my client (on testnet) and it keeps running, printing messages like this:

    02014-03-27 10:57:57 Pre-allocating up to position 0x1000000 in blk00006.dat
    12014-03-27 10:58:00 Pre-allocating up to position 0x100000 in rev00006.dat
    22014-03-27 10:58:00 UpdateTip: new best=00000000c92aeb1fbb19c781dea3f28248a8cb0d54c3776e207f1021455b76a6  height=208103  log2_work=58.297563  tx=1325101  date=2014-03-26 13:29:00 progress=0.999795
    

    My guess is that some newly introduced loop is ignoring interruptions.

  2. laanwj added the label Bug on Mar 27, 2014
  3. laanwj added the label Priority Low on Mar 27, 2014
  4. laanwj commented at 11:02 am on March 27, 2014: member

    After a minute it finally really quit:

    02014-03-27 11:01:33 UpdateTip: new best=000000000c540716cb66222d5ed90de88bbddbe812b83d15d7527c835b2a5e14  height=208174  log2_work=58.298491  tx=1333404  date=2014-03-27 11:21:16 progress=1.000003
    12014-03-27 11:01:33 ProcessBlock: ACCEPTED
    22014-03-27 11:01:33 msghand thread interrupt
    32014-03-27 11:01:33 Shutdown : In progress...
    42014-03-27 11:01:33 StopNode()
    52014-03-27 11:01:34 Shutdown : done
    62014-03-27 11:01:34 Shutdown finished
    72014-03-27 11:01:34 Shutdown result: 1
    82014-03-27 11:01:34 Stopping thread
    92014-03-27 11:01:34 Stopped thread
    
  5. laanwj renamed this:
    Client keeps updating tip after Shutdown
    Client keeps updating tip after Shutdown requested
    on Mar 31, 2014
  6. laanwj commented at 4:48 pm on April 1, 2014: member

    My guess is that it was in this loop: https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L2086 Introduced in 75f51f2a63e0ebe34ab290c2b7141dd240b98c3b

    Seemingly, disconnecting and connecting the new blocks can take quite a while. A boost::interruption_point() every so many blocks would solve this issue.

    Just need a way to reproduce this…

  7. sipa commented at 5:12 pm on April 1, 2014: member
    If a large batch of orphans was received, and they just got connected (by receiving their missing parent link), you can end up with a very long (minutes…) lock on cs_main while that batch is being connected. I believe I mentioned that in the PR :)
  8. rebroad commented at 5:08 am on April 6, 2014: contributor
    I’ll have a go at fixing this…
  9. laanwj commented at 11:51 am on September 8, 2014: member
    This hasn’t been a problem for a long time.
  10. laanwj closed this on Sep 8, 2014

  11. DrahtBot 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: 2025-12-13 09:13 UTC

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