Bug 1025771 - [AMQP 1.0] "Expecting map key; got {}" log error after accepting any 1.0 connection
[AMQP 1.0] "Expecting map key; got {}" log error after accepting any 1.0 conn...
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
All Linux
medium Severity low
: 3.0
: ---
Assigned To: Gordon Sim
Petr Matousek
: TestCaseProvided
Depends On:
Blocks: 1010399
  Show dependency treegraph
Reported: 2013-11-01 10:10 EDT by Pavel Moravec
Modified: 2015-01-21 07:55 EST (History)
6 users (show)

See Also:
Fixed In Version: qpid-cpp-0.22-25.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-01-21 07:55:22 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Pavel Moravec 2013-11-01 10:10:22 EDT
Description of problem:
When broker accepts any AMQP 1.0 connection, it logs error "Expecting map key; got {}". That is just un-harmfull false alarm.

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

How reproducible:

Steps to Reproduce:
1. qpidd --log-enable=error+ 
2. /usr/bin/qpid-send -a "amq.fanout" -m1 --connection-options="{protocol:amqp1.0}"
(any client that connects using AMQP 1.0 connection is supposed to raise the error log)

Actual results:
qpidd logs:
2013-11-01 12:59:06 [Unspecified] error Expecting map key; got {} (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/amqp/DataBuilder.cpp:145)

Expected results:
no error log

Additional info:
relevant backtrace:

(gdb) bt
#0  qpid::amqp::DataBuilder::nest (this=0x7fa2efffbf50, n=...) at /usr/src/debug/qpid-0.22/cpp/src/qpid/amqp/DataBuilder.cpp:142
#1  0x00007fa2fffb7c4a in qpid::amqp::DataBuilder::onStartMap (this=0x7fa2efffbf50)
    at /usr/src/debug/qpid-0.22/cpp/src/qpid/amqp/DataBuilder.cpp:171
#2  0x00007fa2ff7146d6 in qpid::broker::amqp::DataReader::readMap (this=0x7fa2efffbff0, data=0x7fa2e4003330, descriptor=0x0)
    at /usr/src/debug/qpid-0.22/cpp/src/qpid/broker/amqp/DataReader.cpp:177
#3  0x00007fa2ff713f44 in qpid::broker::amqp::DataReader::readOne (this=0x7fa2efffbff0, data=0x7fa2e4003330)
    at /usr/src/debug/qpid-0.22/cpp/src/qpid/broker/amqp/DataReader.cpp:149
#4  0x00007fa2ff71452b in qpid::broker::amqp::DataReader::read (this=0x7fa2efffbff0, data=0x7fa2e4003330)
    at /usr/src/debug/qpid-0.22/cpp/src/qpid/broker/amqp/DataReader.cpp:57
#5  0x00007fa2ff714579 in qpid::broker::amqp::DataReader::read (data=0x7fa2e4003330, out=std::map with 0 elements)
    at /usr/src/debug/qpid-0.22/cpp/src/qpid/broker/amqp/DataReader.cpp:190
#6  0x00007fa2ff70de79 in qpid::broker::amqp::Connection::readPeerProperties (this=0x7fa2e4015e98)
    at /usr/src/debug/qpid-0.22/cpp/src/qpid/broker/amqp/Connection.cpp:186
#7  0x00007fa2ff70ded2 in qpid::broker::amqp::Connection::open (this=0x7fa2e4015e98)
    at /usr/src/debug/qpid-0.22/cpp/src/qpid/broker/amqp/Connection.cpp:174

Root cause:

void Connection::readPeerProperties()
    qpid::types::Variant::Map properties;
    DataReader::read(pn_connection_remote_properties(connection), properties);

calls DataReader::read with properties as map with 0 elements.
Comment 1 Gordon Sim 2013-11-01 14:33:27 EDT
Fixed upstream: http://svn.apache.org/viewvc?view=revision&revision=r1538016

(The map does have elements, the issue is that the assumption behind the error is not valid).
Comment 2 Petr Matousek 2014-01-02 05:50:51 EST
This issue has been fixed, verified on rhel6.5 (i386, x86_64).

Packages in test:

-> Verified

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