Qpid
  1. Qpid
  2. QPID-3899

Grouped messages with expired TTL will cause the broker to crash.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.16
    • Fix Version/s: 0.16
    • Component/s: C++ Broker
    • Labels:
      None

      Description

      If a message on a grouped message queue has an expired TTL, the broker will crash when de-queuing it.

      lt-qpidd: ../../../qpid/cpp/src/qpid/broker/MessageGroupManager.cpp:156: virtual void qpid::broker::MessageGroupManager::dequeued(const qpid::broker::QueuedMessage&): Assertion `state.acquired != 0' failed.
      Aborted (core dumped)

        Activity

        Hide
        Justin Ross added a comment -

        Reviewed by Andrew. Approved for 0.16.

        Show
        Justin Ross added a comment - Reviewed by Andrew. Approved for 0.16.
        Hide
        Andrew Stitcher added a comment -

        This looks good to go to the 0.16 branch (just remember to cherry pick all of the changes!

        Show
        Andrew Stitcher added a comment - This looks good to go to the 0.16 branch (just remember to cherry pick all of the changes!
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4362/
        -----------------------------------------------------------

        Review request for qpid and Gordon Sim.

        Summary
        -------

        The current implementation of message groups incorrectly assumed that a message being dequeued had previously been acquired. In the case of TTL expiration, this is not the case - the expired message is not acquired, it is simply dequeued.

        This fix adds a flag that tracks the acquired state of each message in the group. When a message is dequeued, the total acquired count for the group is decremented ONLY IF the message being dequeued has its acquired flag set.

        This addresses bug qpid-3899.
        https://issues.apache.org/jira/browse/qpid-3899

        Diffs


        /trunk/qpid/cpp/src/qpid/broker/MessageGroupManager.h 1300156
        /trunk/qpid/cpp/src/qpid/broker/MessageGroupManager.cpp 1300156
        /trunk/qpid/tests/src/py/qpid_tests/broker_0_10/msg_groups.py 1300156

        Diff: https://reviews.apache.org/r/4362/diff

        Testing
        -------

        unit tests, + new testcase.

        Thanks,

        Kenneth

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4362/ ----------------------------------------------------------- Review request for qpid and Gordon Sim. Summary ------- The current implementation of message groups incorrectly assumed that a message being dequeued had previously been acquired. In the case of TTL expiration, this is not the case - the expired message is not acquired, it is simply dequeued. This fix adds a flag that tracks the acquired state of each message in the group. When a message is dequeued, the total acquired count for the group is decremented ONLY IF the message being dequeued has its acquired flag set. This addresses bug qpid-3899. https://issues.apache.org/jira/browse/qpid-3899 Diffs /trunk/qpid/cpp/src/qpid/broker/MessageGroupManager.h 1300156 /trunk/qpid/cpp/src/qpid/broker/MessageGroupManager.cpp 1300156 /trunk/qpid/tests/src/py/qpid_tests/broker_0_10/msg_groups.py 1300156 Diff: https://reviews.apache.org/r/4362/diff Testing ------- unit tests, + new testcase. Thanks, Kenneth

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development