Uploaded image for project: 'QuickFIX/J'
  1. QuickFIX/J
  2. QFJ-229

FIX engine stuck in unrecoverable state when trying to connect under poor network conditions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Linux and Solaris

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                admin Steve Bate
                Reporter:
                qiyan@oanda.com Qiyan Li
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: