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):
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)
2. sometimes need to run several times or wait for a bit...
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.
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).
See bug 693407
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.
Created attachment 912417 [details]
Adds "fullName" field and trucates existing "name" field in needed
Patch was reviewed and accepted
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.
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.
Created attachment 918411 [details]
Fixed previous patch. managemnet-schema.xml is in the correct location now and patch was generated cleanly and not edited.
Patch applied upstream: http://svn.apache.org/r1611016
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:
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.