Hide Forgot
Created attachment 514237 [details] reproducer Description of problem: After dropping down to a single cluster member, the broker can crash while attempting to force persist messages. Version-Release number of selected component (if applicable): qpid-cpp-server-0.7.946106-32_ptc_hotfix_6_v3.el5 How reproducible: 100% using attached reproducer Steps to Reproduce: 1. Create a broker cluster 2. Create a queue with ring policy, max count of 1, and persist last node policy 3. Enqueue a message in the queue 4. Reduce the cluster to a single member Actual results: Last standing broker crashes Expected results: Last standing broker does not crash Additional info: The logic within Queue::setLastNodeFailure() will iterate over all messages in the queue and attempt to re-enqueue any messages that need to be forced persistent. However, it is possible that the queue policy that is run within Queue::enqueue will dequeue messages within the queue while the calling function is iterating over the message queue. In the example of a queue that only permits a single message, the ring policy will dequeue the message that is being re-enqueued for persistence, invaliding the intrusive pointer.