Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-894

java.io.IOException: Broken Pipe infinite loop

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.5
    • Component/s: Core
    • Labels:
      None

      Description

      An infinite java.io.IOException can occurs in when a session.close(false) is called in a IoFilter.exceptionCaught().

      Indeed:

      AbstractPollingIoProcessor.flush(time) (line 777):
      This method flush all sessions contained in flushingSession. It does that until there is no more flushingSession

      AbstractPollingIoProcessor.flushNow(session,time) (line 832):
      Process write request.
      If an exception occurs during the write, IoFilter.exceptionCaught() is called ;

      IoFilter.exceptionCaught() (user code):
      call session.close(false);

      AbstractIoSession.close(false): (line 286) call closeOnFlush()

      AbstractIoSession.closeOnFlush() :
      add a CLOSE_REQUEST into the WriteQueue and flush() the session.
      this session is then appended to the flushingSessions.

      Since the exception handling code in flushNow() doesn't reset the session.getCurrentWriteRequest(), the writeRequestQueue is never polled and the processor will try to process the same write request infinitly.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ylecaillez Yannick Lecaillez
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: