Indefinite “Bitcoin Core is shutting down…” #27848

issue Giszmo openend this issue on June 10, 2023
  1. Giszmo commented at 5:18 am on June 10, 2023: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    After shutting down Bitcoin Core Qt, the window “Bitcoin Core is shutting down… Do not shut down the computer until this window disappears.” remains open indefinitely (or at least 24h).

    Expected behaviour

    Quick shutdown.

    Steps to reproduce

    Try to stop Bitcoin-Qt

    Relevant log output

    2023-06-09T01:32:58Z UPnP Port Mapping successful. 2023-06-09T01:37:38Z tor: Thread interrupt 2023-06-09T01:37:38Z Shutdown: In progress… 2023-06-09T01:37:38Z addcon thread exit 2023-06-09T01:37:38Z torcontrol thread exit 2023-06-09T01:37:38Z opencon thread exit 2023-06-09T01:37:38Z net thread exit 2023-06-09T01:37:38Z UPNP_DeletePortMapping() returned: 0 2023-06-09T01:37:38Z mapport thread exit 2023-06-09T01:37:38Z msghand thread exit 2023-06-09T01:48:37Z Potential stale tip detected, will try using extra outbound peer (last tip update: 1804 seconds ago) 2023-06-09T01:59:07Z Potential stale tip detected, will try using extra outbound peer (last tip update: 2434 seconds ago) 2023-06-09T02:09:37Z Potential stale tip detected, will try using extra outbound peer (last tip update: 3064 seconds ago)

    2023-06-10T05:06:39Z Potential stale tip detected, will try using extra outbound peer (last tip update: 100086 seconds ago)

    How did you obtain Bitcoin Core

    Pre-built binaries

    What version of Bitcoin Core are you using?

    v25.0

    Operating system and version

    debian 5.10.0-22-amd64

    Machine specifications

    24 core 32 GB RAM at times flaky but fast internet secondary 2TB SSD with symlinks under ~/.bitcoin/{blocks,chainstate,indexes}

  2. Giszmo commented at 5:22 am on June 10, 2023: none

    I see #16778 but here I only see one process when I ps -eLl | grep bitcoin.

    I see #25897 but here I see no process using any CPU.

  3. maflcko commented at 10:25 am on June 10, 2023: member
    Looks like it didn’t print “scheduler thread exit”, indicating that this thread is still running.
  4. maflcko added the label Bug on Jun 10, 2023
  5. Giszmo commented at 5:43 pm on June 10, 2023: none
    So … may I kill it or would you want any additional information while it’s still refusing to stop on its own?
  6. maflcko commented at 7:14 am on June 11, 2023: member
    Yeah, it may be good to check where the shutoff thread is waiting exactly. I presume it is in m_service_thread.join()?
  7. Giszmo commented at 4:19 pm on June 11, 2023: none
    If you tell me what to do, I’ll do it here but your last comment only calls vague memories of using gdb 10 years ago.
  8. mbed101 commented at 4:49 pm on June 11, 2023: none
    @Giszmo is it happening like this all the time? or is it random like sometimes only happening?
  9. mbed101 commented at 4:52 pm on June 11, 2023: none
    i think once you requested shutdown, the “CheckForStaleTipAndEvictPeers()” function should not be scheduled to happen because core is shutting down.. so stale tip checking should be stopped immediately after requesting shutdown
  10. Giszmo commented at 8:19 pm on June 11, 2023: none

    So I killed it, started it, waited to catch up and now Exit took some 5 or so seconds.

    I suspect that the issue might have to do with flaky internet.

  11. maflcko commented at 6:58 am on June 19, 2023: member
    Duplicate of #23234?
  12. Crypt-iQ commented at 3:08 pm on June 19, 2023: contributor

    Duplicate of #23234?

    Not a duplicate because in that case the scheduler thread has exited but another thread has called SyncWithValidationInterfaceQueue and is waiting on a promise. Like you pointed out here, the scheduler thread hasn’t exited. Could be related though, just maybe not an exact duplicate

  13. maflcko commented at 10:37 am on June 26, 2023: member
    Makes sense, but then it seems a duplicate of #27965, which also still has the scheduler thread running (and more debug info)?
  14. maflcko commented at 10:58 am on June 26, 2023: member
    Closing as dupe of #27965 for now.
  15. maflcko closed this on Jun 26, 2023

  16. bitcoin locked this on Jun 25, 2024

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-28 22:12 UTC

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