Thread: [Quickfix-developers] stopping initiator hangs application
Brought to you by:
orenmnero
|
From: tony w. <ton...@ya...> - 2006-04-06 18:43:23
|
Hello, I've been using quickfix with great success, although I've came across a problem when trying to stop an initiator in VB .Net 2. When I call "stop" my application will frequently hang on this call. I've tried with version 1.11.1 and with using the automated builds for VS 8 under the developers section of the website, both having the same results. I'm also passing a value of "True" when calling the stop method to force close, but it still occasionally hangs. Before calling stop I call logout on my open session. Is there something that I'm doing incorrectly or another way to get around this problem? Thank you, Tony |
|
From: Dale W. <wil...@oc...> - 2006-04-06 21:16:17
|
We're seeing a similar problem in C++ version 1.10.2, but we haven't finished tracking it down. What we're seeing is m_stop in ThreadedSocketInitiator is false, but we're trying to join the thread in ThreadedSocketInitiator::onStop having just set m_stop to true! Still trying to figure out where the race condition is (must be a race condition, right?) Dale tony weston wrote: > Hello, > > I've been using quickfix with great success, although I've came across > a problem when trying to stop an initiator in VB .Net 2. When I call > "stop" my application will frequently hang on this call. I've tried > with version 1.11.1 and with using the automated builds for VS 8 under > the developers section of the website, both having the same results. > I'm also passing a value of "True" when calling the stop method to > force close, but it still occasionally hangs. Before calling stop I > call logout on my open session. Is there something that I'm doing > incorrectly or another way to get around this problem? > > Thank you, > Tony |
|
From: Dave L. <dav...@ma...> - 2006-04-07 07:04:18
|
Hi Tony,
Rather than calling logout and then stop (stop will logout anyway), have
you tried calling stop and then waiting for the logout to complete? e.g:
//stop the initiator
initiator.stop();
//wait for logout
while(initiator.isLoggedOn())
Thread.Sleep(500);
//continue...
Cheers
Dave
-----Original Message-----
From: qui...@li...
[mailto:qui...@li...] On Behalf Of
tony weston
Sent: 06 April 2006 19:43
To: qui...@li...
Subject: [Quickfix-developers] stopping initiator hangs application
Hello,
I've been using quickfix with great success, although I've came across a
problem when trying to stop an initiator in VB .Net 2. When I call
"stop" my application will frequently hang on this call. I've tried
with version 1.11.1 and with using the automated builds for VS 8 under
the developers section of the website, both having the same results.
I'm also passing a value of "True" when calling the stop method to force
close, but it still occasionally hangs. Before calling stop I call
logout on my open session. Is there something that I'm doing
incorrectly or another way to get around this problem?
Thank you,
Tony
|
|
From: Tony W. <ton...@tr...> - 2006-04-07 14:05:34
|
Hi Dave, Unfortunately, it hangs on the stop call so it will never reach the while loop that waits for the logout. I'm not currently waiting for a logout before calling stop, so putting this wait in after I call logout and before I call stop may fix the problem for me. Thank you, Tony Dave Linaker wrote: > Hi Tony, > > Rather than calling logout and then stop (stop will logout anyway), have > you tried calling stop and then waiting for the logout to complete? e.g: > > //stop the initiator > initiator.stop(); > //wait for logout > while(initiator.isLoggedOn()) > Thread.Sleep(500); > //continue... > > Cheers > Dave > > -----Original Message----- > From: qui...@li... > [mailto:qui...@li...] On Behalf Of > tony weston > Sent: 06 April 2006 19:43 > To: qui...@li... > Subject: [Quickfix-developers] stopping initiator hangs application > > > Hello, > > I've been using quickfix with great success, although I've came across a > problem when trying to stop an initiator in VB .Net 2. When I call > "stop" my application will frequently hang on this call. I've tried > with version 1.11.1 and with using the automated builds for VS 8 under > the developers section of the website, both having the same results. > I'm also passing a value of "True" when calling the stop method to force > close, but it still occasionally hangs. Before calling stop I call > logout on my open session. Is there something that I'm doing > incorrectly or another way to get around this problem? > > Thank you, > Tony > > |
|
From: Oren M. <or...@qu...> - 2006-04-07 17:54:02
|
First off, stop will call the logout method on all the sessions, so there is no need to do so yourself (though it wouldn't hurt anything if you did). Also, stop already has the following loop: for( int second = 1; second <= 10 && isLoggedOn(); ++second ) process_sleep( 1 ); The only place I can think where it would block is when it joins on the thread. Can you verify that this is where you the library is freezing? --oren On Apr 7, 2006, at 9:06 AM, Tony Weston wrote: > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/ > html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > Hi Dave, > > Unfortunately, it hangs on the stop call so it will never reach the > while loop that waits for the logout. I'm not currently waiting > for a logout before calling stop, so putting this wait in after I > call logout and before I call stop may fix the problem for me. > > Thank you, > Tony > > Dave Linaker wrote: >> Hi Tony, >> Rather than calling logout and then stop (stop will logout >> anyway), have >> you tried calling stop and then waiting for the logout to >> complete? e.g: >> //stop the initiator >> initiator.stop(); >> //wait for logout >> while(initiator.isLoggedOn()) >> Thread.Sleep(500); >> //continue... >> Cheers >> Dave >> -----Original Message----- >> From: qui...@li... >> [mailto:qui...@li...] On Behalf Of >> tony weston >> Sent: 06 April 2006 19:43 >> To: qui...@li... >> Subject: [Quickfix-developers] stopping initiator hangs application >> Hello, >> I've been using quickfix with great success, although I've came >> across a >> problem when trying to stop an initiator in VB .Net 2. When I call >> "stop" my application will frequently hang on this call. I've tried >> with version 1.11.1 and with using the automated builds for VS 8 >> under >> the developers section of the website, both having the same results. >> I'm also passing a value of "True" when calling the stop method to >> force >> close, but it still occasionally hangs. Before calling stop I call >> logout on my open session. Is there something that I'm doing >> incorrectly or another way to get around this problem? >> Thank you, >> Tony > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the > live webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |
|
From: Tony W. <ton...@tr...> - 2006-04-07 18:07:53
|
Oren, I recently switched to calling logout before stop, thinking this was a cleaner method. I will switch back to just calling stop. Unfortunately I'm using the Express Editions of VS, which doesn't allow me to compile quickfix, due to a atlthunk.lib issue, it seems I need a full copy of VS to compile quickfix. Due to this I can not step into the debugger to find out where exactly it is hanging inside of quickfix. The only thing I can currently see is that it hangs when I call stop. Tony Oren Miller wrote: > First off, stop will call the logout method on all the sessions, so > there is no need to do so yourself (though it wouldn't hurt anything if > you did). Also, stop already has the following loop: > > for( int second = 1; second <= 10 && isLoggedOn(); ++second ) > process_sleep( 1 ); > > The only place I can think where it would block is when it joins on the > thread. Can you verify that this is where you the library is freezing? > > --oren > > On Apr 7, 2006, at 9:06 AM, Tony Weston wrote: > >> QuickFIX Documentation: >> http://www.quickfixengine.org/quickfix/doc/html/index.html >> QuickFIX Support: http://www.quickfixengine.org/services.html >> >> Hi Dave, >> >> Unfortunately, it hangs on the stop call so it will never reach the >> while loop that waits for the logout. I'm not currently waiting for a >> logout before calling stop, so putting this wait in after I call >> logout and before I call stop may fix the problem for me. >> >> Thank you, >> Tony >> >> Dave Linaker wrote: >>> Hi Tony, >>> Rather than calling logout and then stop (stop will logout anyway), have >>> you tried calling stop and then waiting for the logout to complete? e.g: >>> //stop the initiator >>> initiator.stop(); >>> //wait for logout >>> while(initiator.isLoggedOn()) >>> Thread.Sleep(500); >>> //continue... >>> Cheers >>> Dave >>> -----Original Message----- >>> From: qui...@li... >>> [mailto:qui...@li...] On Behalf Of >>> tony weston >>> Sent: 06 April 2006 19:43 >>> To: qui...@li... >>> Subject: [Quickfix-developers] stopping initiator hangs application >>> Hello, >>> I've been using quickfix with great success, although I've came across a >>> problem when trying to stop an initiator in VB .Net 2. When I call >>> "stop" my application will frequently hang on this call. I've tried >>> with version 1.11.1 and with using the automated builds for VS 8 under >>> the developers section of the website, both having the same results. >>> I'm also passing a value of "True" when calling the stop method to force >>> close, but it still occasionally hangs. Before calling stop I call >>> logout on my open session. Is there something that I'm doing >>> incorrectly or another way to get around this problem? >>> Thank you, >>> Tony >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by xPML, a groundbreaking scripting >> language >> that extends applications into web and mobile media. Attend the live >> webcast >> and join the prime developer group breaking into this new coding >> territory! >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >> _______________________________________________ >> Quickfix-developers mailing list >> Qui...@li... >> https://lists.sourceforge.net/lists/listinfo/quickfix-developers >> > > |