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

Blocking queue writes from the MINA event loop causing delayed sends, missing heartbeats, spurious disconnects

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.4
    • Fix Version/s: 2.1.0
    • Component/s: Networking
    • Labels:
      None
    • Environment:
      any, reproduced on x86_64 Windows, Linux, Mac OS X, Oracle JVM 1.8

      Description

      AbstractPollingIoProcessor read buffer drain loop may block for substantial time.
      This is because the QuickFIXj/MINA read filter chain eventually ends up in one of EventHandlingStrategy implementations (thread-per-session or shared), which in turn write messages into a fixed capacity blocking queue.

      Reproduction - set up a NewOrderSingle generator and a simple Acceptor with delay of 20ms between subsequent ack ExecutionReport responses and a queue size of 1000. Pumping of 2000 NewOrderSingle messages into such Acceptor should be enough to see that execution reports are blocked at the Acceptor end until the sender stops sending new messages and the read queue of the Acceptor unblocks.

      General idea of the fix - use watermarks-based queue instead of blocking queue. I'll do a github pull request shortly.

        Attachments

          Activity

            People

            • Assignee:
              mrbald Mr. Bald
              Reporter:
              mrbald Mr. Bald
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: