GetMyExternalIP hangs shutdown when waiting for response #4502

issue dgenr8 opened this issue on July 10, 2014
  1. dgenr8 commented at 4:48 AM on July 10, 2014: contributor

    If the GetMyExternalIP provider hasn't answered, bitcoind can't be stopped gracefully.

    It looks like #3372 did not fix this, because boost interrupt() doesn't actually interrupt recv(), it just causes an exception at the next boost interruption point.

    Thread in bitcoind that won't die:

    (gdb) thread 6
    [Switching to thread 6 (Thread 0x7f5818b7a700 (LWP 5569))]
    [#0](/bitcoin-bitcoin/0/)  0x00007f581db6814c in recv () from /lib/x86_64-linux-gnu/libpthread.so.0
    (gdb) bt
    [#0](/bitcoin-bitcoin/0/)  0x00007f581db6814c in recv () from /lib/x86_64-linux-gnu/libpthread.so.0
    [#1](/bitcoin-bitcoin/1/)  0x00007f581eccd213 in recv (__flags=0, __n=1, __buf=0x7f5818b79a56, __fd=23)
        at /usr/include/x86_64-linux-gnu/bits/socket2.h:45
    [#2](/bitcoin-bitcoin/2/)  RecvLine (hSocket=23, strLine=...) at net.cpp:153
    [#3](/bitcoin-bitcoin/3/)  0x00007f581eccd541 in GetMyExternalIP2 (addrConnect=..., 
        pszGet=0x7f581ee9dcd8 "GET / HTTP/1.1\r\nHost: checkip.dyndns.org\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\nConnection: close\r\n\r\n", pszKeyword=0x7f581ee9d976 "Address:", ipRet=...) at net.cpp:318
    [#4](/bitcoin-bitcoin/4/)  0x00007f581eccdb14 in GetMyExternalIP (ipRet=...) at net.cpp:407
    [#5](/bitcoin-bitcoin/5/)  0x00007f581eccdeb8 in ThreadGetMyExternalIP () at net.cpp:417
    [#6](/bitcoin-bitcoin/6/)  0x00007f581ece128a in TraceThread<void (*)()> (name=0x7f581ee9dada "ext-ip", 
        func=0x7f581eccde90 <ThreadGetMyExternalIP()>) at util.h:544
    [#7](/bitcoin-bitcoin/7/)  0x00007f581e111ce9 in thread_proxy () from /usr/lib/libboost_thread.so.1.46.1
    [#8](/bitcoin-bitcoin/8/)  0x00007f581db60e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
    [#9](/bitcoin-bitcoin/9/)  0x00007f581ca423fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
    [#10](/bitcoin-bitcoin/10/) 0x0000000000000000 in ?? ()
    
  2. dgenr8 referenced this in commit 009f75d738 on Jul 10, 2014
  3. laanwj commented at 6:03 AM on July 10, 2014: member

    Indeed, there are various things that can hang the shutdown, for example connecting through a proxy that is very slow (also while getting the external IP).

  4. laanwj added the label Priority Low on Jul 10, 2014
  5. laanwj commented at 8:33 AM on May 18, 2015: member

    GetMyExternalIP does no longer exist, closing

  6. laanwj closed this on May 18, 2015

  7. 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: 2026-04-13 18:15 UTC

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