Qpid
  1. Qpid
  2. QPID-4489

[Java broker] ensure the IoSender is stopped when a connection closes before receiving a protocol initiation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.14, 0.15, 0.16, 0.17, 0.18, 0.19
    • Fix Version/s: 0.20
    • Component/s: Java Broker
    • Labels:
      None

      Description

      If the IoReceiver exits (due to the TCP connection closing) before a protocol version initiation is received (successfully or otherwise), the IoSender will fail to be closed.

      In this case the IoReceiver signals closed() to the receiver it was created with, a MultiVersionProtocolEngine with an initial SelfDelegateProtocolEngine delegate, but this delegate fails to close the IoSender. The IoSender is currently only closed when a received version initiation fails and the broker replies with a valid protocol version (for negotiation purposes) before closing the network connection, or if the closed() signal occurs after a protocol version initiation succeeds and the MVPE delegate is replaced with the relevant versions delegate.

      The SelfDelegateProtocolEngine should be updated to close the associated network connection (and thus the IoSender) if its closed() method is called.

        Activity

        Robbie Gemmell created issue -
        Robbie Gemmell made changes -
        Field Original Value New Value
        Assignee Robbie Gemmell [ gemmellr ]
        Robbie Gemmell made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Robbie Gemmell made changes -
        Description If the IoReceiver exits (due to the TCP connection closing) before a protocol version initiation is received (successfully or otherwise), the IoSender will fail to be closed.

        In this case the IoReceiver signals closed() to the receiver it was created with, a MultiVersionProtocolEngine with an initial SelfDelegateProtocolEngine delegate, but this delegate fails to close the IoSender. The IoSender is currently only closed when a received version initiation fails and the broker replies with a valid protocol version (for negotiation purposes) before closing the network connection, or if the closed() signal occurs after a protocol version initiation succeeds and the MVPE delegate is replaced with the relevant versions delegate.

        The SelfDelegateProtocolEngine should be updated to close the associated network connection if its closed() method is called.
        If the IoReceiver exits (due to the TCP connection closing) before a protocol version initiation is received (successfully or otherwise), the IoSender will fail to be closed.

        In this case the IoReceiver signals closed() to the receiver it was created with, a MultiVersionProtocolEngine with an initial SelfDelegateProtocolEngine delegate, but this delegate fails to close the IoSender. The IoSender is currently only closed when a received version initiation fails and the broker replies with a valid protocol version (for negotiation purposes) before closing the network connection, or if the closed() signal occurs after a protocol version initiation succeeds and the MVPE delegate is replaced with the relevant versions delegate.

        The SelfDelegateProtocolEngine should be updated to close the associated network connection (and thus the IoSender) if its closed() method is called.
        Robbie Gemmell made changes -
        Summary [Java broker] ensure the IoSender is stopped when a connection closes before recieving a protocol initiation [Java broker] ensure the IoSender is stopped when a connection closes before receiving a protocol initiation
        Hide
        Robbie Gemmell added a comment -
        Show
        Robbie Gemmell added a comment - Change made in http://svn.apache.org/viewvc?rev=1416716&view=rev
        Robbie Gemmell made changes -
        Status In Progress [ 3 ] Ready To Review [ 10006 ]
        Hide
        Robbie Gemmell added a comment -

        Rob, can you review this please?

        Thanks,
        Robbie

        Show
        Robbie Gemmell added a comment - Rob, can you review this please? Thanks, Robbie
        Robbie Gemmell made changes -
        Assignee Robbie Gemmell [ gemmellr ] Rob Godfrey [ rgodfrey ]
        Hide
        Rob Godfrey added a comment - - edited

        Change looks good. Effect obviously isolated to people opening and then immediately closing connections before establishing AMQP protocol. As such I would be happy with this going into 0.20.

        Show
        Rob Godfrey added a comment - - edited Change looks good. Effect obviously isolated to people opening and then immediately closing connections before establishing AMQP protocol. As such I would be happy with this going into 0.20.
        Rob Godfrey made changes -
        Status Ready To Review [ 10006 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Justin Ross added a comment -

        Reviewed by Rob. Approved for 0.20.

        Show
        Justin Ross added a comment - Reviewed by Rob. Approved for 0.20.
        Hide
        Robbie Gemmell added a comment -

        Change now merged to the 0.20 release branch.

        Show
        Robbie Gemmell added a comment - Change now merged to the 0.20 release branch.
        Robbie Gemmell made changes -
        Fix Version/s 0.20 [ 12323548 ]
        Fix Version/s 0.21 [ 12323549 ]
        Robbie Gemmell made changes -
        Affects Version/s 0.20 [ 12323548 ]
        Rob Godfrey made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        4m 38s 1 Robbie Gemmell 03/Dec/12 22:35
        In Progress In Progress Reviewable Reviewable
        15m 48s 1 Robbie Gemmell 03/Dec/12 22:50
        Reviewable Reviewable Resolved Resolved
        10h 32m 1 Rob Godfrey 04/Dec/12 09:23
        Resolved Resolved Closed Closed
        799d 10h 42m 1 Rob Godfrey 11/Feb/15 20:06

          People

          • Assignee:
            Rob Godfrey
            Reporter:
            Robbie Gemmell
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development