Bug 1025771 - [AMQP 1.0] "Expecting map key; got {}" log error after accepting any 1.0 connection
Summary: [AMQP 1.0] "Expecting map key; got {}" log error after accepting any 1.0 conn...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 3.0
Hardware: All
OS: Linux
medium
low
Target Milestone: 3.0
: ---
Assignee: Gordon Sim
QA Contact: Petr Matousek
URL:
Whiteboard:
Depends On:
Blocks: 1010399
TreeView+ depends on / blocked
 
Reported: 2013-11-01 14:10 UTC by Pavel Moravec
Modified: 2015-01-21 12:55 UTC (History)
6 users (show)

Fixed In Version: qpid-cpp-0.22-25.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-21 12:55:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Moravec 2013-11-01 14:10:22 UTC
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):
qpid-cpp-server-0.22-23.el6.x86_64


How reproducible:
100%


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);
    setPeerProperties(properties);
}

calls DataReader::read with properties as map with 0 elements.

Comment 1 Gordon Sim 2013-11-01 18:33:27 UTC
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 10:50:51 UTC
This issue has been fixed, verified on rhel6.5 (i386, x86_64).

Packages in test:
qpid-cpp-*-0.22-29

-> Verified


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