opencon thread massively slows down client shutdown? #2954

issue Diapolo opened this issue on August 30, 2013
  1. Diapolo commented at 10:29 AM on August 30, 2013: none

    This is with latest 0.8.4 RC on Win7 x64, I have no idea yet what causes this, but I'm sure shutdown with previous versions was faster. This was with proxy enabled, problem seems to be non existant with proxy disabled. @sipa Any idea for such a behaviour? Any timeout blocking that thread?

    Proxy enabled (opencon takes 1 1/2 minutes to interrupt):

    <pre> 2013-08-30 10:25:25 addcon thread interrupt 2013-08-30 10:25:25 net thread interrupt 2013-08-30 10:25:25 dumpaddr thread stop 2013-08-30 10:25:25 msghand thread interrupt 2013-08-30 10:27:04 opencon thread interrupt 2013-08-30 10:27:04 Flush(false) 2013-08-30 10:27:04 wallet.dat refcount=0 2013-08-30 10:27:04 wallet.dat checkpoint 2013-08-30 10:27:04 wallet.dat detach 2013-08-30 10:27:04 wallet.dat closed 2013-08-30 10:27:04 DBFlush(false) ended 47ms 2013-08-30 10:27:04 StopNode() 2013-08-30 10:27:04 Flushed 14694 addresses to peers.dat 47ms 2013-08-30 10:27:04 Committing 30072 changed transactions to coin database... 2013-08-30 10:27:05 Flush(true) 2013-08-30 10:27:05 wallet.dat refcount=0 2013-08-30 10:27:05 wallet.dat checkpoint 2013-08-30 10:27:05 wallet.dat detach 2013-08-30 10:27:05 wallet.dat closed 2013-08-30 10:27:05 DBFlush(true) ended 16ms </pre>

    Proxy disabled (opencon immediately interrupted): <per> 2013-08-30 10:31:26 addcon thread interrupt 2013-08-30 10:31:26 dumpaddr thread stop 2013-08-30 10:31:26 net thread interrupt 2013-08-30 10:31:26 msghand thread interrupt 2013-08-30 10:31:29 connection timeout 2013-08-30 10:31:29 opencon thread interrupt 2013-08-30 10:31:29 Flush(false) 2013-08-30 10:31:29 wallet.dat refcount=0 2013-08-30 10:31:29 wallet.dat checkpoint 2013-08-30 10:31:29 wallet.dat detach 2013-08-30 10:31:30 wallet.dat closed 2013-08-30 10:31:30 DBFlush(false) ended 42ms 2013-08-30 10:31:30 StopNode() 2013-08-30 10:31:30 Flushed 14542 addresses to peers.dat 68ms 2013-08-30 10:31:30 Committing 542 changed transactions to coin database... 2013-08-30 10:31:30 Flush(true) 2013-08-30 10:31:30 wallet.dat refcount=0 2013-08-30 10:31:30 wallet.dat checkpoint 2013-08-30 10:31:30 wallet.dat detach 2013-08-30 10:31:30 wallet.dat closed 2013-08-30 10:31:30 DBFlush(true) ended 20ms </pre>

  2. Diapolo commented at 1:48 PM on August 31, 2013: none

    Sometimes shutdown time is normal, sometimes it's slow as hell :-/.

  3. ghost commented at 12:29 AM on September 1, 2013: none

    I'm seeing this behaviour with a latent proxy too. Minutes for the threads to terminate.

  4. Diapolo commented at 9:37 PM on September 1, 2013: none

    @63 What OS are you using? Any special configuration?

  5. ghost commented at 11:15 PM on September 1, 2013: none

    @Diapolo Last build from github, OSX, proxying through Tor, not listening.

  6. Diapolo commented at 8:42 AM on September 6, 2013: none

    Can any of the core devs take a look please? @gmaxwell @gavinandresen @jgarzik

  7. Diapolo commented at 6:21 AM on September 18, 2013: none

    Sad that most core-devs seem to currently do fancy things and have no time for such bug reports...

  8. gavinandresen commented at 6:57 AM on September 18, 2013: contributor

    "Shutdown is slow when I'm using a proxy" is not high on the priority list of things to fix.

  9. Diapolo commented at 8:59 AM on September 18, 2013: none

    Sometimes I whish, we would prefer fixing things before inventing new ones... I mean there are quite some unanswered bug reports here, which are old. I will report them in the future, but currently it's not motivating. At least IMHO all bugs should get reviewed and tagged!

  10. theuni commented at 5:11 AM on September 19, 2013: member

    Fwiw, a quick backtrace shows this waiting on the recv() in Socks5().

  11. laanwj commented at 3:29 PM on November 12, 2013: member

    I've recently seen this problem as well. It appears that threads waiting for the proxy to reply can hang shutdown. Next time I encounter this issue I'll investigate further.

  12. Diapolo commented at 4:58 PM on November 12, 2013: none

    I also intent to debug this, when I've built a Qt debug build :).

  13. Diapolo commented at 1:44 PM on June 12, 2014: none

    @laanwj Any progress here? My guess is it is related to our SOCKS5 code (as @theuni said above) or perhaps even it just happens when using Tor. It seems Tor is trying at least 121 secs, before telling our client (Bitcoin Core) it can't get a connection Jun 12 15:41:27.477 [Hinweis] Tried for 121 seconds to get a connection to 83.227.173.83:8333. Giving up.... which could lead to the delay during shutdown.

  14. laanwj referenced this in commit 5df9b09c8f on Sep 8, 2014
  15. laanwj referenced this in commit 062e154ddc on Sep 8, 2014
  16. laanwj referenced this in commit 1e213c8c11 on Sep 8, 2014
  17. laanwj referenced this in commit 6050ab6855 on Sep 10, 2014
  18. laanwj closed this on Sep 15, 2014

  19. Bushstar referenced this in commit d28d318aad on Apr 8, 2020
  20. reddink referenced this in commit 36172c741b on May 27, 2020
  21. MarcoFalke 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: 2026-04-13 21:16 UTC

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