Re: [Quickfix-developers] i'm seeing deadlocks...
Brought to you by:
orenmnero
From: <or...@qu...> - 2008-04-23 21:29:37
|
<html><body>Interesting. Didn't think about the signal socket blocking into a deadlock. I'll look into that.<BR><BR> <BLOCKQUOTE style="PADDING-LEFT: 8px; MARGIN-LEFT: 8px; BORDER-LEFT: blue 2px solid" webmail="1">-------- Original Message --------<BR>Subject: [Quickfix-developers] i'm seeing deadlocks...<BR>From: "Mark T. Kennedy" <mke...@di...><BR>Date: Wed, April 23, 2008 3:43 pm<BR>To: quickfix developers <<a href="mailto:qui...@li...urceforge">qui...@li...urceforge</a>.net><BR><BR>QuickFIX Documentation: <A href="http://www.quickfixengine.org/quickfix/doc/html/index.html" target=_blank><a href="http://www.quickfixengine.org/quickfix/doc/html/index.html">http://www.quickfixengine.org/quickfix/doc/html/index.html</a></A><BR>QuickFIX Support: <A href="http://www.quickfixengine.org/services.html" target=_blank><a href="http://www.quickfixengine.org/services.html">http://www.quickfixengine.org/services.html</a></A><BR><BR> <HR> <BR>... while writing to the 'signal' socket (pipe) used to implement<BR>non-blocking sends.<BR><BR>i have a test where i send 6,000+ orders in a batch and receive 6,000<BR>acks and 6,000 fills in response. in the middle of it, i shut down<BR>and restart a proxy that sits between the sender and the exchange<BR>simulator. every now and then, this triggers a deadlock in the<BR>exchange simulator (see the attached stack trace).<BR><BR>since a write to the 'signal' socket can block, sendToTarget can<BR>still block, and that restores the oft-discussed deadlock scenario<BR>that the non-blocking send implementation sought to avoid.<BR><BR>thoughts/comments? i'm using the trunk for my tests, not 12.4.<BR><BR>/mark<BR><BR><BR>This communication and any attachments may contain confidential/proprietary information and is intended for information purposes only. It is not an invitation or offer to purchase interests from Diamondback. Any representation to the contrary is unintentional. This communication is intended only for the person(s) to whom it is addressed. If you are not the intended recipient you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message or any attachments is not permitted. If you have received this in error, please notify the sender immediately by e-mail and delete this message. All e-mails sent to or received from this address will be received by Diamondback's company e-mail system and is subject to archival and possible review by someone other than the recipient. This notice is automatically appended to each e-mail message leaving Diamondback. <HR> Thread 3 (Thread 1084229952 (LWP 24498)):<BR>#0 0x0000003a3ffc5882 in __select_nocancel () from /lib64/libc.so.6<BR>#1 0x00002aaaaf78315f in FIX::SocketMonitor::block ()<BR>#2 0x00002aaaaf770f74 in FIX::SocketServer::block ()<BR>#3 0x00002aaaaf7d60ac in FIX::HttpServer::onStart ()<BR>#4 0x00002aaaaf7d612f in FIX::HttpServer::startThread ()<BR>#5 0x0000003a40e06337 in start_thread () from /lib64/libpthread.so.0<BR>#6 0x0000003a3ffcc38d in clone () from /lib64/libc.so.6<BR>#7 0x0000000000000000 in ?? ()<BR>Thread 2 (Thread 1094719808 (LWP 24499)):<BR>#0 0x0000003a40e0bb58 in __lll_mutex_lock_wait () from /lib64/libpthread.so.0<BR>#1 0x0000003a40e0839e in _L_mutex_lock_65 () from /lib64/libpthread.so.0<BR>#2 0x0000003a40e0813b in pthread_mutex_lock () from /lib64/libpthread.so.0<BR>#3 0x00002aaaaf59aac2 in FIX::Mutex::lock ()<BR>#4 0x00002aaaaf59ab11 in FIX::Locker::Locker ()<BR>#5 0x00002aaaaf78678a in FIX::SocketConnection::processQueue ()<BR>#6 0x00002aaaaf77abca in FIX::SocketAcceptor::onWrite ()<BR>#7 0x00002aaaaf771406 in FIX::ServerWrapper::onWrite ()<BR>#8 0x00002aaaaf782b25 in FIX::SocketMonitor::processWriteSet ()<BR>#9 0x00002aaaaf7831c5 in FIX::SocketMonitor::block ()<BR>#10 0x00002aaaaf770f74 in FIX::SocketServer::block ()<BR>#11 0x00002aaaaf77b019 in FIX::SocketAcceptor::onStart ()<BR>#12 0x00002aaaaf773e1c in FIX::Acceptor::startThread ()<BR>#13 0x0000003a40e06337 in start_thread () from /lib64/libpthread.so.0<BR>#14 0x0000003a3ffcc38d in clone () from /lib64/libc.so.6<BR>#15 0x0000000000000000 in ?? ()<BR>Thread 1 (Thread 46912498585648 (LWP 24489)):<BR>#0 0x0000003a3ffcd021 in send () from /lib64/libc.so.6<BR>#1 0x00002aaaaf7d75c3 in FIX::socket_send ()<BR>#2 0x00002aaaaf782bbc in FIX::SocketMonitor::signal ()<BR>#3 0x00002aaaaf788bcf in FIX::SocketConnection::signal ()<BR>#4 0x00002aaaaf786a71 in FIX::SocketConnection::send ()<BR>#5 0x00002aaaaf743375 in FIX::Session::send ()<BR>#6 0x00002aaaaf744978 in FIX::Session::sendRaw ()<BR>#7 0x00002aaaaf74a7ce in FIX::Session::send ()<BR>#8 0x00002aaaaf74a91e in FIX::Session::sendToTarget ()<BR>#9 0x00002aaaaf598698 in quickfix_wrapper::send ()<BR>#10 0x00002aaaaf59885f in stp_quickfix_send ()<BR>#11 0x00002aaaaf488b39 in XS_STP__QuickFIX_stp_quickfix_send ()<BR>#12 0x00002aaaaab30f3a in Perl_pp_entersub ()<BR>#13 0x00002aaaaab2f6ea in Perl_runops_standard ()<BR>#14 0x00002aaaaaadfd5d in Perl_call_sv ()<BR>#15 0x00002aaaae2e8090 in pe_event_invoke ()<BR>#16 0x00002aaaae2e8210 in pe_empty_queue ()<BR>#17 0x00002aaaae2e8df8 in one_event ()<BR>#18 0x00002aaaae2e900d in XS_Event__loop ()<BR>#19 0x00002aaaaab30f3a in Perl_pp_entersub ()<BR>#20 0x00002aaaaab2f6ea in Perl_runops_standard ()<BR>#21 0x00002aaaaaae05ec in perl_run ()<BR>#22 0x000000000040165c in main ()<BR> <HR> -------------------------------------------------------------------------<BR>This <a href="http://SF.net">SF.net</a> email is sponsored by the 2008 JavaOne(SM) Conference <BR>Don't miss this year's exciting event. There's still time to save $100. <BR>Use priority code J8TL2D2. <BR><A href="http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone" target=_blank><a href="http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone">http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone</a></A> <HR> _______________________________________________<BR>Quickfix-developers mailing list<BR><A onclick="Popup.composeWindow('pcompose.php?sendto=Quickfix-developers%40lists.sourceforge.net'); return false;" href="#Compose">Quickfix-developers<B></B>@lists.sourceforge.net</A><BR><A href="https://lists.sourceforge.net/lists/listinfo/quickfix-developers" target=_blank><a href="https://lists.sourceforge.net/lists/listinfo/quickfix-developers">https://lists.sourceforge.net/lists/listinfo/quickfix-developers</a></A> </BLOCKQUOTE></body></html> |