[Quickfix-developers] Deadlock while stopping SocketInitiator and SocketAcceptor
Brought to you by:
orenmnero
From: Fabio R. <FRe...@1e...> - 2010-12-16 08:17:08
|
Hi together We use QuickFIX in a .NET windows service to reroute messages from different systems to a single end point, similar to a NAT service. We have recently updated from QuickFIX 1.12.4 to the latest release because we where facing major memory issues. The problem we get with the new release is, that we get a deadlock while stopping the initiator (SocketInitiator.stop()) and even get a deadlock while forced stopping the acceptor when the windows service ist stopped via the console. Right now we are using a single acceptor with two SessionIDs to receive messages from two different systems. We found some mail list messages from 2005 addressing this issue, and it seemed solved when forcing the stop, but we're running into the deadlock anyway. Is there anything we can do to have the service stop savely and controlled or would you recommend to abort the threads without trying to stop them? Here is some of the code (implementing the catch block is not necessary, because it never gets there) in our windows service: protected override void OnStop() { try { initiator.stop(true); initiator.Dispose(); initiator = null; acceptor.stop(true); acceptor.Dispose(); acceptor = null; } catch { } } protected override void OnStart(string[] args) { //... create App, Settings, Factories initiator = new SocketInitiator(iApp, iStoreFactory, iSettings, iLogFactory, iMessageFactory); new Thread(initiator.start).Start(); acceptor = new SocketAcceptor(aApp, aStoreFactory, aSetting, aLogFactory, aMessageFactory); new Thread(acceptor.start).Start(); } Mit freundlichen Grüssen / Kind regards 1eEurope (Switzerland) AG Fabio Renggli Technology Consultant --------------------------------- 1eEurope (Switzerland) AG Seestrasse 97 CH-8800 Thalwil Tel. Direkt: +41 (0) 44 722 86 05 Tel. Zentrale: +41 (0) 44 722 75 55 fre...@1e...<mailto:MB...@1e...> www.1eEurope.ch<http://www.1eeurope.ch/> This message may contain confidential information and is intended only for the individual named. If you are not the named addressee, please notify the sender immediately and do not disclose, copy or distribute the content to any other person. E-Mail transmission cannot be guaranteed to be secure or error-free as information can be intercepted, lost, destroyed, arrive late, incomplete or contain any viruses. Any contractual representations contained herein on behalf of this company must not be taken as final, and are entirely subject to contracts signed formally by an authorised representative of this company. |