qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: framing-error: Frame size too small 0
Date Mon, 17 May 2010 09:36:58 GMT
On 05/14/2010 10:57 PM, Jen Andre wrote:
>
> Let me elaborate on this (Jason and I work together)... By the way, we are
> using the 0.5 c++ broker/client.
>
> I think there is a problem calculating the frame size.  I think in some
> cases, the frame size set is larger than uint16_t, but  the frame size is
> calculated as uint32_t, and so the size is demoted to less than
> frameOverhead() when placed in the message frame.
>
> See this message that happens repeatedly just before the failures (from the
> qpid trace logs)
>
> 	2010-may-13 18:38:54 trace qpid/amqp_0_10/Connection.cpp:88: SENT
> [127.0.0.1:59922]: Frame[Eb; channel=3; 	content (65524 bytes)
> \x00\x01\x87W\x00\x00\x00\x03 $3151c8...]
> 	2010-may-13 18:38:54 debug qpid/sys/AsynchIOHandler.cpp:169: DISCONNECTED
> [127.0.0.1:59922]
>
>
> The body size in this case is 65524 bytes, but the frame size seems to be
> calculated to be greater than this:
>
> uint32_t AMQFrame::frameOverhead() {
>      return 12 /*frame header*/;
> }
> uint32_t AMQFrame::encodedSize() const {
>      if (!encodedSizeCache) {
>          encodedSizeCache = frameOverhead() + body->encodedSize();
>          if (body->getMethod())
>              encodedSizeCache +=  sizeof(ClassId)+sizeof(MethodId);
>      }
>      return encodedSizeCache;
> }
>
> encodedSize() returns a 32 bit unsigned int, which makes the frame size =
> 65524 + 12 (plus the size of ClassID/MethodID), a value which is>  65535.
>
> We are able to reproduce this inserting  similar large messages.
>
> Let us know if you need any other info.

Can I confirm that the issue occurs for messages recovered from disk?

I can reproduce the issue in that case and have raised a Jira[1]. The 
fix is a simple one, I have attached a patch for the 0.5 codebase to the 
Jira and committed the same change to trunk.

Thanks for bringing this to our attention!

--Gordon.

[1] https://issues.apache.org/jira/browse/QPID-2605

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Mime
View raw message