Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-530

MessengerImpl.processActive() does not rethrow IOException


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: proton-0.6
    • Fix Version/s: None
    • Component/s: proton-j
    • Labels:
    • Environment:
      JDK 7


      Test case :
      A connection has been established successfully from Messenger in Proton-j, and the client is waiting (possibly with a timeout) on recv().
      Then the peer resets this connection.

      Effect :
      In MessengerImpl.processActive(), a IOException("Connection reset by peer") is raised and catched. Until now everything is fine.
      A log is emitted, but the exception is not re-thrown, not registered, and the method continues to process other connections.

      From the client point of view :

      • if recv() has a positive timeout, a TimeoutException is raised, but the client cannot discriminate it from a timeout when nothing is received on a well established session. My client, for example, re-do a recv() , exits immediately with a TimeoutException, and then consumes 100% of the CPU of the JVM.
      • if recv() is blocking (negative timeout), an infinite loop is happening inside waitUntil(), then consuming 100% of CPU.

      I would suggest to throw a new RuntimeException(IOException) after having done the log in the catch clause.

      This problem may be linked to PROTON-525 and PROTON-214.




            • Assignee:
              Olivier Letellier Olivier Letellier
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: