Qpid Proton
  1. Qpid Proton
  2. PROTON-350

Messenger - pn_messenger_recv( -1 ) does not flow control senders

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.4
    • Fix Version/s: 0.5
    • Component/s: proton-c
    • Labels:
      None

      Description

      When using pn_messenger_recv( -1 ), remote senders are not back-pressured, and the number of messages received can grow without bounds. It appears that messenger is unconditionally granting credit as messages arrive.

      Messenger should instead only replenish credit when received messages are actually consumed by the application (maybe after they are settled?).

      1. test-recv.py
        1 kB
        Ken Giusti

        Activity

        Ken Giusti created issue -
        Hide
        Ken Giusti added a comment -

        Run test-recv.py and send messages to it. The number of messages queued internally by test-recv.py will grow indefinitely. Stop the test, and modify test-recv.py to call messenger.rcv( 10 ), and re-run: the number of queued messages will block at 10.

        Show
        Ken Giusti added a comment - Run test-recv.py and send messages to it. The number of messages queued internally by test-recv.py will grow indefinitely. Stop the test, and modify test-recv.py to call messenger.rcv( 10 ), and re-run: the number of queued messages will block at 10.
        Ken Giusti made changes -
        Field Original Value New Value
        Attachment test-recv.py [ 12591904 ]
        Hide
        ASF subversion and git services added a comment -

        Commit 1504407 from rhs@apache.org in branch 'proton/trunk'
        [ https://svn.apache.org/r1504407 ]

        Bounded messenger's credit allocation when an unlimited value is passed to recv; added tests for pushback at both messenger and engine level; fixed proton-j engine to respect credit window; fixed java messenger to properly report if work has been done. This addresses PROTON-350 and PROTON-351.

        Show
        ASF subversion and git services added a comment - Commit 1504407 from rhs@apache.org in branch 'proton/trunk' [ https://svn.apache.org/r1504407 ] Bounded messenger's credit allocation when an unlimited value is passed to recv; added tests for pushback at both messenger and engine level; fixed proton-j engine to respect credit window; fixed java messenger to properly report if work has been done. This addresses PROTON-350 and PROTON-351 .
        Hide
        Rafael H. Schloming added a comment -

        I've submitted a fix for this and added a test. Can you verify that this also fixes your reproducer?

        Show
        Rafael H. Schloming added a comment - I've submitted a fix for this and added a test. Can you verify that this also fixes your reproducer?
        Ken Giusti made changes -
        Assignee Ken Giusti [ kgiusti ]
        Rafael H. Schloming made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        24d 22h 21m 1 Rafael H. Schloming 05/Aug/13 19:57

          People

          • Assignee:
            Ken Giusti
            Reporter:
            Ken Giusti
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development