1. Qpid
  2. QPID-4421

C++ Broker Issue with reusing link channel Id number too soon


    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.18
    • Fix Version/s: 0.19
    • Component/s: C++ Broker
    • Labels:


      Following on to QPID-4392

      As you add and remove replicated queues within an HA broker, bridges are opened and closed for each queue. Closing a bridge immediately re-adds the associated channel number into an available pool. As a result, when the old bridge (channel X) is closed it sends a "detach" command to the broker and the new bridge (assigned the same channel X) sends an "attach" command. The broker will eventually respond with a "detached" command which was meant for the original bridge on channel X. Unfortunately, the new bridge on channel X handles this detached command from the broker and flags the bridge as detached. This process can then repeat for several cycles until it break out of the detach/attach/detached race.

      In addition to the detach/attach/detached race, the immediate re-use of channel numbers appears to create other issues like the following:

      Nov 2 11:26:40 itcm31 qpidd[12122]: 2012-11-02 11:26:40 [Protocol] error Execution exception: invalid-argument: anonymous.qpid.bridge_session_qpid.replicator-Queue1.b64c23e6-cb01-4297-8935-c12b40
      804ae2_84209514-2e58-4fb9-8d37-7c2440f5f144: confirmed < (2+0) but only sent < (0+0) (qpid/SessionState.cpp:154)

      This issue may be worked around by assigning channel Id numbers from the pool in increasing serial order and not immediately reusing a deallocated Id. Although this does not fix the problem of the race condition it will provide relief.


        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        99d 1h 36m 1 Chuck Rolke 12/Feb/13 22:15
        Resolved Resolved Closed Closed
        166d 20h 38m 1 Justin Ross 29/Jul/13 19:53
        Justin Ross made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Chuck Rolke made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 0.19 [ 12322452 ]
        Resolution Fixed [ 1 ]
        Chuck Rolke added a comment -

        Workaround submitted by r1405946

        Chuck Rolke added a comment - Workaround submitted by r1405946
        Chuck Rolke created issue -


          • Assignee:
            Chuck Rolke
          • Votes:
            0 Vote for this issue
            1 Start watching this issue


            • Created: