qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-4429) Java Broker allows frame-size to be negotiated to zero then later fails during message delivery with obscure IllegalArgumentException
Date Mon, 11 Aug 2014 16:28:12 GMT

    [ https://issues.apache.org/jira/browse/QPID-4429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14092947#comment-14092947
] 

ASF subversion and git services commented on QPID-4429:
-------------------------------------------------------

Commit 1617323 from [~godfrer] in branch 'qpid/trunk'
[ https://svn.apache.org/r1617323 ]

QPID-4429 : C++ Broker does not enforce max frame size negotiation rules

> Java Broker allows frame-size to be negotiated to zero then later fails during message
delivery with obscure IllegalArgumentException
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-4429
>                 URL: https://issues.apache.org/jira/browse/QPID-4429
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker, Python Client
>    Affects Versions: 0.19
>            Reporter: Keith Wall
>            Assignee: Rob Godfrey
>            Priority: Minor
>             Fix For: 0.31
>
>
> The Java Broker permits a client to negotiate (connection.tune, connection.tune-ok) the
AMQP frame-size to zero, only to fail later (during message delivery) with the following obscure
exception:
> {noformat}
> 2012-11-06 15:50:51,550 ERROR [IoReceiver - /127.0.0.1:36210] (AMQProtocolEngine.java:248)
- Unexpected exception when processing datablock
> java.lang.IllegalArgumentException
>         at java.nio.Buffer.limit(Buffer.java:249)
>         at org.apache.qpid.server.store.StoredMemoryMessage.getContent(StoredMemoryMessage.java:121)
>         at org.apache.qpid.server.message.AMQMessage.getContent(AMQMessage.java:246)
>         at org.apache.qpid.server.output.ProtocolOutputConverterImpl$MessageContentSourceBody.writePayload(ProtocolOutputConverterImpl.java:165)
>         at org.apache.qpid.framing.AMQFrame.writeFrames(AMQFrame.java:123)
>         at org.apache.qpid.server.output.ProtocolOutputConverterImpl$CompositeAMQBodyBlock.writePayload(ProtocolOutputConverterImpl.java:381)
>         at org.apache.qpid.server.protocol.AMQProtocolEngine.asByteBuffer(AMQProtocolEngine.java:408)
>         at org.apache.qpid.server.protocol.AMQProtocolEngine.writeFrame(AMQProtocolEngine.java:541)
>         at org.apache.qpid.server.output.ProtocolOutputConverterImpl.writeFrame(ProtocolOutputConverterImpl.java:342)
>         at org.apache.qpid.server.output.ProtocolOutputConverterImpl.writeMessageDelivery(ProtocolOutputConverterImpl.java:126)
>         at org.apache.qpid.server.output.ProtocolOutputConverterImpl.writeMessageDelivery(ProtocolOutputConverterImpl.java:96)
>         at org.apache.qpid.server.output.ProtocolOutputConverterImpl.writeDeliver(ProtocolOutputConverterImpl.java:71)
>         at org.apache.qpid.server.protocol.AMQProtocolEngine$WriteDeliverMethod.deliverToClient(AMQProtocolEngine.java:1449)
>         at org.apache.qpid.server.subscription.SubscriptionImpl.sendToClient(SubscriptionImpl.java:666)
>         at org.apache.qpid.server.subscription.SubscriptionImpl$AckSubscription.send(SubscriptionImpl.java:286)
>         at org.apache.qpid.server.queue.SimpleAMQQueue.deliverMessage(SimpleAMQQueue.java:834)
>         at org.apache.qpid.server.queue.SimpleAMQQueue.deliverToSubscription(SimpleAMQQueue.java:753)
>         at org.apache.qpid.server.queue.SimpleAMQQueue.enqueue(SimpleAMQQueue.java:701)
>         at org.apache.qpid.server.AMQChannel$MessageDeliveryAction.postCommit(AMQChannel.java:1203)
>         at org.apache.qpid.server.AMQChannel$AsyncCommand.complete(AMQChannel.java:1623)
>         at org.apache.qpid.server.AMQChannel.sync(AMQChannel.java:1593)
> {noformat}
> It is easy for a user of the Python client to fall foul of this problem as it's API current
requires that the user remembers to pass all tune-parameters (rather than simply those the
user wishes to change).  This in itself is probably a defect.
> However, regardless of any client shortcoming, the underlying problem here is the Java
Broker. The AMQP spec (0-8..0.10) requires that the Broker should reject an attempt to reduce
the frame-size below 4096.
> bq. _0-8..0-9-1_ Until the frame-max has been negotiated, both peers MUST accept frames
of up to frame-min-size octets large, and the minimum negotiated value for frame-max is also
frame-min-size (frame-min-size=4096) [
> bq. _0-10_ Until the max-frame-size has been negotiated, both peers MUST accept frames
of up to MIN-MAX-FRAME-SIZE octets large, and the minimum negotiated value for max-frame-size
is also MIN-MAX-FRAME-SIZE. (MIN-MAX-FRAME-SIZE=4096)
>  



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message