Red Hat Bugzilla – Bug 505287
Messages with no content that 'flow to disk' result in protocol errors on delivery
Last modified: 2010-10-14 12:07:08 EDT
Description of problem: If 'flow to disk' is triggered for messages that have no content (i.e. if the content is released from memory because the queue onto which they are placed has reached a specified limit), then on delivery the broker sends an empty content frame after a header frame that marks the frameset as ended. This is a protcol violation and causes the connection to be terminated. Version-Release number of selected component (if applicable): Since 1.0 How reproducible: 100% Steps to Reproduce: 1. create durable queue with fixed depth 2. send messages to exceed depth 3. send an empty message 4. consume messages E.g. 1. qpid-config add queue test-queue --durable --max-queue-count 5 2. for m in one two three four five six seven "" eight nine ten; do echo $m; done | ./src/tests/sender --send-eos 1 3. ./src/tests/receiver Actual results: Client closes connection due to protocol violation; broker logs error of the form: Connection closed by error: Unexpected command continuation frame. Expected results: All messages received without error.
Fixed on qpid trunk by r783721.
Created attachment 396555 [details] Verification script [root@rhel5x bz505827]# ./runtest redhat-release-5Server-5.4.0.3 x86_64 qpid-cpp-server-store-0.7.908272-1.el5 qpid-cpp-client-devel-0.7.908272-1.el5 python-qpid-0.5.904641-1.el5 Compiling... done Configuring queue... ok Running sender, logging to sender.log... ---------- reciever's output follows one two three four five == receiver exited with 0 ---------- sender.log follows 2010-02-26 16:07:00 warning Exception received from broker: resource-limit-exceeded: resource-limit-exceeded: Policy exceeded on test-queue, policy: size: max=104857600, current=19; count: max=5, current=5; type=reject (qpid/broker/QueuePolicy.cpp:83) [caused by 5 \x00:\x00] Failed: resource-limit-exceeded: resource-limit-exceeded: Policy exceeded on test-queue, policy: size: max=104857600, current=19; count: max=5, current=5; type=reject (qpid/broker/QueuePolicy.cpp:83) ./runtest: line 37: 2999 Done for m in one two three four five six seven "" eight nine ten; do echo $m; done 3000 Segmentation fault (core dumped) | ./sender --send-eos 1 ================================================== Core file dumped. Core analyzation part started. ================================================== gdb-6.8-37.el5 qpid-cpp-mrg-debuginfo-0.7.908272-1.el5 elfutils-devel-0.137-3.el5 Output files: core.3000.txt
Created attachment 396556 [details] gdb corefile output
According to previous comments, I do not think this bug is fixed. Should I try on that old qpid packages (closer to r783721) just to make sure that it worked then?
Verified, see bug 568788.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: When a message queue reaches a specified limit, its content is released from the memory. Previously, triggering this operation with an empty message caused the broker to send an empty content frame after a header frame that marks the frameset as ended, causing the connection to be terminated. With this update, this error has been fixed, and the connection is no longer accidentally terminated.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2010-0773.html