[Quickfix-users] ThreadedSocketInitiator hangs during shutdown
Brought to you by:
orenmnero
From: xiaofeng c. <xia...@ya...> - 2007-10-24 20:59:31
|
We have been encountering a fairly reproducible issue when unloading the quickfix library when there are several initiator threads. The stack info for the relevant threads is included below. When our engine tries to shut down the ThreadedSocketInitiator, the engine hangs on thread_join for thread 147418032. Thread 147418032 is hanging because it is waiting to acquire a lock; Simultaneously, thread -1210057808 is waiting to acquire the same lock. Both Threads 147418032 and -1210057808 work on (this=0x93c6340, s=2). The fact both threads are trying to remove the same connection thread makes us to think that there is some synchronization failure. We are running on the 2.4 Redhat Linux kernel. Can anyone shed some light on this issue? Thanks in advance. -Jeff Backtrace from GDB (gdb) thread apply all bt Thread 5 (Thread 147418032 (LWP 6937)): #0 0x0092c7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x00b871ce in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0 #2 0x00b83e2b in _L_mutex_lock_35 () from /lib/tls/libpthread.so.0 #3 0x08c962c4 in ?? () #4 0x00543764 in ?? () from /usr/local/lib/libquickfix.so.10 #5 0xb7f768e0 in ?? () #6 0x093c6340 in ?? () #7 0x08c962e8 in ?? () #8 0x004a14bc in FIX::ThreadedSocketInitiator::removeThread (this=0x93c6340, s=2) at Mutex.h:64 #9 0x004a14bc in FIX::ThreadedSocketInitiator::removeThread (this=0x93c61a0, s=13) at Mutex.h:64 #10 0x004a59b5 in FIX::ThreadedSocketInitiator::socketThread (p=0x92a1b50) at ThreadedSocketInitiator.cpp:222 #11 0x00b82371 in start_thread () from /lib/tls/libpthread.so.0 #12 0x00c569be in clone () from /lib/tls/libc.so.6 Thread 4 (Thread -1210057808 (LWP 6938)): #0 0x0092c7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x00b871ce in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0 ---Type <return> to continue, or q <return> to quit--- #2 0x00b83e2b in _L_mutex_lock_35 () from /lib/tls/libpthread.so.0 #3 0xb7dff2c4 in ?? () #4 0x00543764 in ?? () from /usr/local/lib/libquickfix.so.10 #5 0xb7f768e0 in ?? () #6 0x093c6340 in ?? () #7 0xb7dff2e8 in ?? () #8 0x004a14bc in FIX::ThreadedSocketInitiator::removeThread (this=0x93c6340, s=2) at Mutex.h:64 #9 0x004a14bc in FIX::ThreadedSocketInitiator::removeThread (this=0x93c61a0, s=14) at Mutex.h:64 #10 0x004a59b5 in FIX::ThreadedSocketInitiator::socketThread (p=0x93c14c0) at ThreadedSocketInitiator.cpp:222 #11 0x00b82371 in start_thread () from /lib/tls/libpthread.so.0 #12 0x00c569be in clone () from /lib/tls/libc.so.6 Thread 1 (Thread -1208522528 (LWP 6421)): #0 0x0092c7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x00b830fd in pthread_join () from /lib/tls/libpthread.so.0 #2 0x00513993 in FIX::thread_join (thread=147418032) at Utility.cpp:489 #3 0x004a16cb in FIX::ThreadedSocketInitiator::onStop (this=0x93c61a0) at ThreadedSocketInitiator.cpp:128 #4 0x0048a011 in FIX::Initiator::stop (this=0x93c61a0, force=false) at Initiator.cpp:274 #5 0x080acdf7 in FIXEngineT::Stop (this=0x9216b58) at fixeng.cpp:1087 #6 0x0808498e in FIXDT::Term (this=0xbff0fae0) at fixd.cpp:231 #7 0x080864b9 in FIXDT::OnEndOfDay (this=0xbff0fae0) at fixd.cpp:652 #8 0x080891b9 in FIXDT::ProcessMsg (this=0xbff0fae0, bxmsg=@0xbff0f8d8) at fixd.cpp:466 #9 0x080899db in FIXDT::QueueCheck (this=0xbff0fae0) at fixd.cpp:501 #10 0x0808b26d in FIXDT::RunApp (this=0xbff0fae0) at fixd.cpp:176 #11 0x0808c2a8 in main (argc=5, argv=0xbff10484) at fixd.cpp:79 (gdb) __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |