Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Addrman crash #1156

Closed
luke-jr opened this Issue · 0 comments

1 participant

@luke-jr
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb178ab70 (LWP 28718)]
0xb7b3f637 in std::_Rb_tree_rotate_left(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&) ()
   from /usr/lib/gcc/i686-pc-linux-gnu/4.4.5/libstdc++.so.6
(gdb) thread apply all bt

Thread 12 (Thread 0xb278cb70 (LWP 28719)):
#0  0xb7fe18d2 in ?? () from /lib/ld-linux.so.2
#1  0xb7be2c86 in nanosleep () from /lib/libpthread.so.0
#2  0xb7f522b3 in boost::this_thread::sleep(boost::posix_time::ptime const&) ()
   from /usr/lib/libboost_thread-mt-1_46.so.1.46.1
#3  0x0809517c in sleep (xt=<optimized out>) at /usr/include/boost/thread/detail/thread.hpp:346
#4  Sleep (n=100000) at util.h:92
#5  0x080d92c8 in ThreadDumpAddress2 (parg=0x0) at net.cpp:1217
#6  0x080d933b in ThreadDumpAddress (parg=0x0) at net.cpp:1228
#7  0xb7bdac82 in start_thread () from /lib/libpthread.so.0
#8  0xb7a10ace in clone () from /lib/libc.so.6

Thread 11 (Thread 0xb178ab70 (LWP 28718)): <-- gdb picked this one by default
#0  0xb7b3f637 in std::_Rb_tree_rotate_left(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&) ()
   from /usr/lib/gcc/i686-pc-linux-gnu/4.4.5/libstdc++.so.6
#1  0xb7b3f9e5 in std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&) ()
   from /usr/lib/gcc/i686-pc-linux-gnu/4.4.5/libstdc++.so.6
#2  0x080614b1 in erase (__position=<optimized out>, this=<optimized out>)
    at /usr/lib/gcc/i686-pc-linux-gnu/4.4.5/include/g++-v4/bits/stl_tree.h:1347
#3  erase (__last=<optimized out>, __first=<optimized out>, this=<optimized out>)
    at /usr/lib/gcc/i686-pc-linux-gnu/4.4.5/include/g++-v4/bits/stl_tree.h:1388
#4  std::_Rb_tree<CNetAddr, std::pair<CNetAddr const, int>, std::_Select1st<std::pair<CNetAddr const, int> >, std::less<CNetAddr>, std::allocator<std::pair<CNetAddr const, int> > >::erase (this=0x81daa40, __x=...)
    at /usr/lib/gcc/i686-pc-linux-gnu/4.4.5/include/g++-v4/bits/stl_tree.h:1374
#5  0x0805fbac in erase (__x=<optimized out>, this=<optimized out>)
    at /usr/lib/gcc/i686-pc-linux-gnu/4.4.5/include/g++-v4/bits/stl_map.h:582
#6  CAddrMan::ShrinkNew (this=0x81daa00, nUBucket=209) at addrman.cpp:181
#7  0x080601b4 in CAddrMan::Add_ (this=0x81daa00, addr=..., source=..., nTimePenalty=7200) at addrman.cpp:346
#8  0x080bc360 in Add (nTimePenalty=<optimized out>, source=<optimized out>, vAddr=<optimized out>, 
    this=<optimized out>) at addrman.h:433
#9  ProcessMessage (pfrom=<optimized out>, strCommand=<optimized out>, vRecv=<optimized out>) at main.cpp:2382
#10 0x080bfa32 in ProcessMessages (pfrom=0xa318220) at main.cpp:2803
#11 0x080d8ed8 in ThreadMessageHandler2 (parg=0x0) at net.cpp:1515
#12 0x080d9012 in ThreadMessageHandler (parg=0x0) at net.cpp:1480
#13 0xb7bdac82 in start_thread () from /lib/libpthread.so.0
#14 0xb7a10ace in clone () from /lib/libc.so.6

Thread 10 (Thread 0xb0f89b70 (LWP 28717)):
#0  0xb7fe18d2 in ?? () from /lib/ld-linux.so.2
#1  0xb7be2c86 in nanosleep () from /lib/libpthread.so.0
#2  0xb7f522b3 in boost::this_thread::sleep(boost::posix_time::ptime const&) ()
   from /usr/lib/libboost_thread-mt-1_46.so.1.46.1
#3  0x0809517c in sleep (xt=<optimized out>) at /usr/include/boost/thread/detail/thread.hpp:346
#4  Sleep (n=2000) at util.h:92
#5  0x080df8b7 in ThreadOpenConnections2 (parg=0x0) at net.cpp:1304
#6  0x080e0312 in ThreadOpenConnections (parg=0x0) at net.cpp:1242
#7  0xb7bdac82 in start_thread () from /lib/libpthread.so.0
#8  0xb7a10ace in clone () from /lib/libc.so.6

Thread 8 (Thread 0xb1f8bb70 (LWP 28715)):
#0  0xb7fe18d2 in ?? () from /lib/ld-linux.so.2
#1  0xb7a09a41 in select () from /lib/libc.so.6
#2  0x080dd0f5 in ThreadSocketHandler2 (parg=0x0) at net.cpp:689
#3  0x080ddea2 in ThreadSocketHandler (parg=0x0) at net.cpp:579
#4  0xb7bdac82 in start_thread () from /lib/libpthread.so.0
#5  0xb7a10ace in clone () from /lib/libc.so.6

Thread 4 (Thread 0xb3f8fb70 (LWP 28711)):
#0  0xb7fe18d2 in ?? () from /lib/ld-linux.so.2
#1  0xb7be26b8 in accept () from /lib/libpthread.so.0
#2  0x08100bd1 in call_accept<socklen_t> (s=<optimized out>, addrlen=<optimized out>, addr=<optimized out>)
    at /usr/include/boost/asio/detail/impl/socket_ops.ipp:75
#3  accept (s=<optimized out>, ec=<optimized out>, addrlen=<optimized out>, addr=<optimized out>)
    at /usr/include/boost/asio/detail/impl/socket_ops.ipp:93
#4  sync_accept (addrlen=<optimized out>, addr=<optimized out>, state=<optimized out>, ec=<optimized out>, 
    s=<optimized out>) at /usr/include/boost/asio/detail/impl/socket_ops.ipp:119
#5  accept<boost::asio::basic_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> > > (this=<optimized out>, ec=<optimized out>, peer_endpoint=<optimized out>, peer=<optimized out>, impl=<optimized out>)
    at /usr/include/boost/asio/detail/reactive_socket_service.hpp:326
#6  accept<boost::asio::stream_socket_service<boost::asio::ip::tcp> > (ec=<optimized out>, 
    peer_endpoint=<optimized out>, peer=<optimized out>, impl=<optimized out>, this=<optimized out>)
    at /usr/include/boost/asio/socket_acceptor_service.hpp:197
#7  accept<boost::asio::stream_socket_service<boost::asio::ip::tcp> > (peer_endpoint=<optimized out>, 
    peer=<optimized out>, this=<optimized out>) at /usr/include/boost/asio/basic_socket_acceptor.hpp:747
#8  ThreadRPCServer2 (parg=0x0) at bitcoinrpc.cpp:2470
#9  0x081049a2 in ThreadRPCServer (parg=0x0) at bitcoinrpc.cpp:2358
#10 0xb7bdac82 in start_thread () from /lib/libpthread.so.0
#11 0xb7a10ace in clone () from /lib/libc.so.6

Thread 2 (Thread 0xb4f91b70 (LWP 28709)):
#0  0xb7fe18d2 in ?? () from /lib/ld-linux.so.2
#1  0xb7be2c86 in nanosleep () from /lib/libpthread.so.0
#2  0xb7f522b3 in boost::this_thread::sleep(boost::posix_time::ptime const&) ()
   from /usr/lib/libboost_thread-mt-1_46.so.1.46.1
#3  0x0806edb1 in sleep (xt=<optimized out>) at /usr/include/boost/thread/detail/thread.hpp:346
#4  Sleep (n=<optimized out>) at util.h:92
#5  ThreadFlushWalletDB (parg=0xa1537cc) at db.cpp:1125
#6  0xb7bdac82 in start_thread () from /lib/libpthread.so.0
#7  0xb7a10ace in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb7934a70 (LWP 27388)):
#0  0xb7fe18d2 in ?? () from /lib/ld-linux.so.2
#1  0xb7be2c86 in nanosleep () from /lib/libpthread.so.0
#2  0xb7f522b3 in boost::this_thread::sleep(boost::posix_time::ptime const&) ()
   from /usr/lib/libboost_thread-mt-1_46.so.1.46.1
#3  0x08090018 in sleep (xt=<optimized out>) at /usr/include/boost/thread/detail/thread.hpp:346
#4  Sleep (n=<optimized out>) at util.h:92
#5  AppInit2 (argc=1, argv=0xbfffef24) at init.cpp:586
#6  0x080927a3 in AppInit (argc=1, argv=0xbfffef24) at init.cpp:113
#7  0x08092857 in main (argc=1, argv=0xbfffef24) at init.cpp:99
@sipa sipa referenced this issue from a commit in sipa/bitcoin
@sipa sipa Fix addrman crashes
A function returned the element to remove from a bucket, instead of its
position in that bucket. This function was only called when a tried
bucket overflowed, which only happens after many outgoing connections
have been made.

Closes: #1065, #1156
56f1e91
@sipa sipa referenced this issue from a commit
@sipa sipa Fix addrman crashes
A function returned the element to remove from a bucket, instead of its
position in that bucket. This function was only called when a tried
bucket overflowed, which only happens after many outgoing connections
have been made.

Closes: #1065, #1156
05ff968
@luke-jr luke-jr referenced this issue from a commit in luke-jr/bitcoin
@sipa sipa Fix addrman crashes
A function returned the element to remove from a bucket, instead of its
position in that bucket. This function was only called when a tried
bucket overflowed, which only happens after many outgoing connections
have been made.

Closes: #1065, #1156
adecb2e
@luke-jr luke-jr closed this
@coblee coblee referenced this issue from a commit in litecoin-project/litecoin
@sipa sipa Fix addrman crashes
A function returned the element to remove from a bucket, instead of its
position in that bucket. This function was only called when a tried
bucket overflowed, which only happens after many outgoing connections
have been made.

Closes: #1065, #1156
d674e0c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.