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

Session+FileStore reset fails indefinitely when stream closed

    Details

    • Type: Bug
    • Status: Open
    • Priority: Default
    • Resolution: Unresolved
    • Affects Version/s: 2.1.1
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
      None

      Description

      If the FileStore stream is closed for any unexpected reason, the reset will fail indefinitely even if the original cause is fixed (or was just a transient error), since it will continue to try and flush/closed the failed stream, instead of truly resetting and opening a new one.

      In our case the error was triggered by the disk being full (space was then freed up), but any reason for closing the stream could get the store stuck in this unrecoverable state. Perhaps the store reset mechanism should be made more robust so that it really tries to reset even in this unexpected state rather than require the application to be restarted manually.

      quickfix.RuntimeError: java.io.IOException: Stream Closed
      at quickfix.SessionState.reset(SessionState.java:384)
      at quickfix.Session.resetState(Session.java:2624)
      at quickfix.Session.nextLogon(Session.java:2116)
      at quickfix.Session.next(Session.java:1026)
      at quickfix.Session.next(Session.java:1204)
      at quickfix.mina.ThreadPerSessionEventHandlingStrategy$MessageDispatchingThread.doRun(ThreadPerSessionEventHandlingStrategy.java:222)
      at quickfix.mina.ThreadPerSessionEventHandlingStrategy$ThreadAdapter.run(ThreadPerSessionEventHandlingStrategy.java:146)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.io.IOException: Stream Closed
      at java.io.FileOutputStream.writeBytes(Native Method)
      at java.io.FileOutputStream.write(FileOutputStream.java:326)
      at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
      at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
      at java.io.DataOutputStream.flush(DataOutputStream.java:123)
      at java.io.FilterOutputStream.close(FilterOutputStream.java:158)
      at quickfix.FileStore.close(FileStore.java:218)
      at quickfix.FileStore.close(FileStore.java:209)
      at quickfix.FileStore.closeAndDeleteFiles(FileStore.java:223)
      at quickfix.FileStore.initialize(FileStore.java:101)
      at quickfix.FileStore.reset(FileStore.java:405)
      at quickfix.SessionState.reset(SessionState.java:382)
      ... 7 more Suppressed: java.io.IOException: Stream Closed
      at java.io.FileOutputStream.writeBytes(Native Method)
      at java.io.FileOutputStream.write(FileOutputStream.java:326)
      at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
      at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
      at java.io.FilterOutputStream.close(FilterOutputStream.java:158)
      at java.io.FilterOutputStream.close(FilterOutputStream.java:159)
      ... 13 more

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              amichair amichair
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: