[QFJ-229] FIX engine stuck in unrecoverable state when trying to connect under poor network conditions Created: 24/Aug/07  Updated: 15/Nov/12  Resolved: 24/Aug/07

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.2.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Qiyan Li Assignee: Steve Bate
Resolution: Duplicate Votes: 0
Labels: None
Environment:

Linux and Solaris


Issue Links:
Duplicate
duplicates QFJ-150 Calling toString() on an empty Messag... Closed

 Description   

If the FIX engine tries to connect to a remote engine under little or no network connectivity, it tends to be stuck in a unrecoverable state and cannot reconnect automatically when the connectivity restores. This appears to be caused by a NPE in the quickfix.mina.initiator.IoSessionInitiator$ConnectTask.connect() line: 136

quickfixSession.getLog().onEvent(e.getMessage());

where e.getMessage() is a null pointer, which causes quickfix.FileLog.writeMessage(java.io.FileOutputStream, java.lang.String, boolean) line: 104

stream.write(message.getBytes(CharsetSupport.getCharset()));

to throw a null pointer exception, which in turn puts the engine into an unrecoverable state. The event log looks something like this:

20070820-08:59:02: Sent test request TEST
20070820-08:59:06: Timed out waiting for heartbeat
20070820-08:59:06: Disconnecting
20070820-09:00:08: <------- stuck here

The implication is that if the network connectivity is poor enough to force the engine to disconnect, and if the condition lasts during the first reconnect attempt, the engine will be stuck and never recover even if the network condition gets better.

All line numbers are from 1.2.1 version of the source code. Java 1.5 was used.



 Comments   
Comment by Toli Kuznets [ 24/Aug/07 ]

If i'm not mistaken, this is a dupe of QFJ-223 and was fixed in http://quickfixj.svn.sourceforge.net/viewvc/quickfixj/trunk/core/src/main/java/quickfix/mina/initiator/IoSessionInitiator.java?r1=721&r2=720&pathrev=721

Qiyan, would it be possible for you to verify this fix with the latest code from SVN?

Comment by Steve Bate [ 25/Aug/07 ]

I think this is a duplicate of another recent bug report. If so, it's been fixed in the trunk and will be released soon in 1.3.0. Can you verify if this is actually a duplicate? Thanks.

Comment by Qiyan Li [ 26/Oct/07 ]

Just tried out the 1.3.0 release, and the problem has gone away.

Generated at Sun May 19 11:42:49 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.