Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 693721 - Session names longer than 256 bytes cause errors when encoding session management objects
Session names longer than 256 bytes cause errors when encoding session manage...
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
1.3
Unspecified Unspecified
medium Severity unspecified
: 3.1
: ---
Assigned To: Ernie
Petra Svobodová
: Patch
Depends On:
Blocks: 825141
  Show dependency treegraph
 
Reported: 2011-04-05 08:21 EDT by Gordon Sim
Modified: 2015-04-14 09:46 EDT (History)
5 users (show)

See Also:
Fixed In Version: qpid-cpp-0.30-2
Doc Type: Bug Fix
Doc Text:
AMQP 0-10 allowed session names to be up to 2^16 bytes long. The QMF management schema for the broker defined the name of a session object as being up to 2^8 bytes long. If a session was created with a name greater than 256 bytes, the broker could not send out management objects for the session, and periodic processing failed. Changes to the QMF management tools now support long-named sessions, which fixes the originally reported issue.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-04-14 09:46:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
jmorgan: needinfo-


Attachments (Terms of Use)
Adds "fullName" field and trucates existing "name" field in needed (2.72 KB, patch)
2014-06-26 09:11 EDT, Ernie
no flags Details | Diff
Fixes problem with qpid-stat -u (2.79 KB, patch)
2014-07-11 15:15 EDT, Ernie
no flags Details | Diff
Makes new field optional and fixes qpid-tool display (3.73 KB, patch)
2014-07-11 17:18 EDT, Ernie
no flags Details | Diff
Fixed patch (3.72 KB, patch)
2014-07-16 09:37 EDT, Ernie
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Apache JIRA QPID-5850 None None None Never
Red Hat Product Errata RHEA-2015:0805 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging 3.1 Release 2015-04-14 13:45:54 EDT

  None (edit)
Description Gordon Sim 2011-04-05 08:21:36 EDT
Description of problem:

AMQP 0-10 allows session names to be up to 2^16 bytes long; the QMF management schema for the broker however defines the name of a session object as being up to 2^8 bytes long. If a session is created with a name greater than 256 bytes, the broker cannot send out management objects for it i.e. periodic processing fails.

Version-Release number of selected component (if applicable):

1.3

How reproducible:

Readily

Steps to Reproduce:
1. run the following python code against a broker:

  from qpid.messaging import *

  session = Connection.establish("localhost:5672").session(name="a"*1024)
  session.sync()

2. sometimes need to run several times or wait for a bit...
  
Actual results:

Broker crashes (before fix for bug 693407) or logs error in which case management stats for such sessions are not sent out and there may be other failures in sending/processing management data.

Expected results:

No error. Either the management object supports the full length of session name or it accurately truncates it (or the broker rejects such names to begin with).

Additional info:

See bug 693407
Comment 4 Ernie 2014-06-11 14:42:19 EDT
A two part solution is proposed:
1. Truncate the session name when it is stored in the management object.
   A uuid would be prepended to the supplied session name to guarantee uniqueness. 

2. Add a new field in the management schema that handles the full length name. Management tools will need to be updated to use the new field.
Comment 5 Ernie 2014-06-26 09:11:00 EDT
Created attachment 912417 [details]
Adds "fullName" field and trucates existing "name" field in needed

Patch was reviewed and accepted
Comment 8 Ernie 2014-07-11 15:15:23 EDT
Created attachment 917427 [details]
Fixes problem with qpid-stat -u

Modified management schema to name new "fullName" field optional and RO. This allows then new schema to work with existing brokers. 
Modified the SessionState and ManagedSession code to set the new field.
Comment 9 Ernie 2014-07-11 17:18:31 EDT
Created attachment 917432 [details]
Makes new field optional and fixes qpid-tool display

Changes the new "fullName" field to optional. Addresses the qpid-tool formatting by truncating the table header separator to 256 characters.
Comment 12 Ernie 2014-07-16 09:37:29 EDT
Created attachment 918411 [details]
Fixed patch

Fixed previous patch. managemnet-schema.xml is in the correct location now and patch was generated cleanly and not edited.
Comment 14 Gordon Sim 2014-07-16 10:16:07 EDT
Patch applied upstream: http://svn.apache.org/r1611016
Comment 16 Petra Svobodová 2015-01-05 11:13:18 EST
The long named session are fully supported by QMF management tools now, no exception is raised on the broker side.

Verified on Rhel6-i686 and x86_64 with packages:
qpid-proton-c-devel-0.7-4
qpid-cpp-debuginfo-0.30-4
qpid-cpp-server-devel-0.30-4
qpid-cpp-server-xml-0.30-4
qpid-jca-0.22-2
qpid-java-client-0.30-3
python-qpid-qmf-0.30-2
ruby-qpid-qmf-0.30-2
qpid-java-example-0.30-3
qpid-cpp-client-0.30-4
qpid-cpp-client-devel-0.30-4
qpid-tests-0.30-1
qpid-cpp-server-linearstore-0.30-4
qpid-proton-debuginfo-0.7-4
qpid-proton-c-0.7-4
python-qpid-0.30-2
qpid-qmf-debuginfo-0.30-2
qpid-cpp-server-0.30-4
qpid-cpp-client-rdma-0.30-4
qpid-tools-0.30-3
qpid-cpp-server-ha-0.30-4
ruby-qpid-0.7.946106-2
qpid-jca-zip-0.22-2
qpid-java-common-0.30-3
qpid-qmf-0.30-2
qpid-cpp-server-rdma-0.30-4
qpid-jca-xarecovery-0.22-2
qpid-cpp-client-devel-docs-0.30-4
qpid-qmf-devel-0.30-2

--> VERIFIED
Comment 20 errata-xmlrpc 2015-04-14 09:46:01 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2015-0805.html

Note You need to log in before you can comment on or make changes to this bug.