"Frame size too small 0" error received in qpid broker

Solution Verified - Updated -

Environment

Red Hat Enterprise MRG Messaging

Issue

Qpid broker logged "Frame size too small 0" error.

Is this KCS solution applicable? How to prevent the error?

Resolution

Mentioned solution is not applicable, that is relevant to encoding frames while exception in qpid/framing/AMQFrame.cpp:101 is about decoding them.

The error is triggered by processing / decoding a malformed AMQP frame received from a client. It is desired to check the client behaviour for particular root cause.

Root Cause

Checking source code:

bool AMQFrame::decode(Buffer& buffer)
{
    if(buffer.available() < frameOverhead())
        return false;
    uint32_t pos = buffer.getPosition();

    uint8_t  flags = buffer.getOctet();
    uint8_t framing_version = (flags & 0xc0) >> 6;
    if (framing_version != 0)
        throw FramingErrorException(QPID_MSG("Framing version unsupported"));
    bof = flags & 0x08;
    eof = flags & 0x04;
    bos = flags & 0x02;
    eos = flags & 0x01;
    uint8_t  type = buffer.getOctet();
    uint16_t frame_size =  buffer.getShort();                                           <------ getting frame_size from incoming buffer
    if (frame_size < frameOverhead())
        throw FramingErrorException(QPID_MSG("Frame size too small " << frame_size));   <------ line 101

That means, the broker is attempting to decode a frame with zero frame size, what is against specification.

Diagnostic Steps

2013-09-26 06:08:04 [HA] error cluster(1.2.3.4:21070 READY) aborting connection 1.2.3.4:21385-4901: framing-error: Frame size too small 0 (qpid/framing/AMQFrame.cpp:101)

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.