hard-crash when proxy activated but unable to connect #1430

issue Diapolo opened this issue on June 7, 2012
  1. Diapolo commented at 10:58 PM on June 7, 2012: none

    I have no proxy setup on my local machine, so setting one will for sure not work and is intended to reproduce this.

    Steps to reproduce:

    1. start Bitcoin-Qt (compiled from current master)
    2. enable proxy and use default settings
    3. exit
    4. restart Bitcoin-Qt
    5. exit
    6. crash

    debug.log shows in the end: socket select error 10022 ERROR: GetMyExternalIP() : connection to 216.146.39.70:80 failed Bitcoin exited select() for connection failed: 10038 ERROR: GetMyExternalIP() : connection to 212.117.175.194:80 failed ThreadOpenConnections exited

    So I guess it has to do with ThreadOpenConnections not cleanly exiting, perhaps because we don't detect or handle such connection problems. This needs a deep look by @sipa I think.

    Btw. the proxy setting in the Qt GUI needs a re-start, right? It's not changed on the fly?

  2. sipa commented at 2:09 PM on June 8, 2012: member

    Hmm, I cannot reproduce, but I suppose this is related to an attemped socks connection that takes a long time to timeout, longer than the shutdown code waits for lingering threads.

    The solution is either implementing limited timeout for proxy connections, which should be done anyway, I believe, or reworking the threading model to use boost threads and interruption points instead of the current code that continuously needs to check fShutdown.

  3. Diapolo commented at 2:33 PM on August 18, 2012: none

    This seems fixed with current master (I can't reproduce on main- or testnet), so closing this.

  4. Diapolo closed this on Aug 18, 2012

  5. lateminer referenced this in commit d63fee097d on Jan 22, 2019
  6. lateminer referenced this in commit 1907a80938 on May 6, 2020
  7. MarcoFalke 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-21 18:16 UTC

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