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

IoSession.write not thread-safe? Loosing messages under heavy multi-threaded write on same session.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M4
    • Fix Version/s: 2.0.0-M5
    • Component/s: Core, Filter
    • Labels:
      None
    • Environment:
      Windows Vista 64-bit

      Description

      I am writing a stress-test that tests multi-thread safetyness of our stateless encoder / decoder under heavy load and I am observing that messages are silently lost during session.write(Object), (the lost messages do not seem to reach the underlying socket buffer at all).

      I am using one encoder / decoder that is stateless. No executor filter, only the filter codec and a basic io handler.

      Synchronizing on the session.write makes the problem go away;

      synchronized (session)
      {
      future = session.write(message);
      }

      Do I really have to synchronize on the session to solve this issue?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mauritz Mauritz Lovgren
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: