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-7769) [AMQP 0-8..0-91] Support decoding of type codes u (unsigned short) and B (unsigned byte) to maximise compatibility with other AMQP implementations
Date Wed, 10 May 2017 08:23:04 GMT

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

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

Commit 66a15452ae1da2d2a3460db93505ac02764e6f5d in qpid-broker-j's branch refs/heads/master
from [~k-wall]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-broker-j.git;h=66a1545 ]

QPID-7769: [AMQP0-8..0-91] Avoid possibility of the QBB going undisposed if field table decoding
fails

Made QBB's autoclosable so they may be used from try-with-resources.


> [AMQP 0-8..0-91] Support decoding of type codes u (unsigned short) and B (unsigned byte)
to maximise compatibility with other AMQP implementations
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-7769
>                 URL: https://issues.apache.org/jira/browse/QPID-7769
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker
>            Reporter: Keith Wall
>             Fix For: qpid-java-broker-7.0.0
>
>
> Currently the Broker fails on some paths if it tries to decode message headers using
type codes u (unsigned short) and B (unsigned byte). It should understand these too.
> Flow to disk path fails like so:
> {noformat}
> 2017-05-02 20:21:34,515 ERROR [IO-/127.0.0.1:35664] (o.a.q.s.Main) - Uncaught exception,
shutting down.
> java.lang.IllegalArgumentException: no such type code: 42
>         at org.apache.qpid.server.protocol.v0_8.AMQTypeMap.getType(AMQTypeMap.java:47)
>         at org.apache.qpid.server.protocol.v0_8.AMQTypedValue.readFromBuffer(AMQTypedValue.java:201)
>         at org.apache.qpid.server.protocol.v0_8.FieldTable.setFromBuffer(FieldTable.java:1163)
>         at org.apache.qpid.server.protocol.v0_8.FieldTable.populateFromBuffer(FieldTable.java:128)
>         at org.apache.qpid.server.protocol.v0_8.FieldTable.clearEncodedForm(FieldTable.java:933)
>         at org.apache.qpid.server.protocol.v0_8.transport.BasicContentHeaderProperties.clearEncodedForm(BasicContentHeaderProperties.java:959)
>         at org.apache.qpid.server.protocol.v0_8.transport.ContentHeaderBody.clearEncodedForm(ContentHeaderBody.java:195)
>         at org.apache.qpid.server.protocol.v0_8.MessageMetaData.clearEncodedForm(MessageMetaData.java:140)
>         at org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$MessageDataSoftRef.clear(AbstractBDBMessageStore.java:986)
>         at org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$StoredBDBMessage.flowToDisk(AbstractBDBMessageStore.java:1263)
>         at org.apache.qpid.server.queue.AbstractQueue$FlowToDiskChecker.flowToDiskIfNecessary(AbstractQueue.java:3342)
>         at org.apache.qpid.server.queue.AbstractQueue$FlowToDiskChecker.flowToDiskAndReportIfNecessary(AbstractQueue.java:3350)
>         at org.apache.qpid.server.queue.AbstractQueue.enqueue(AbstractQueue.java:1105)
>         at org.apache.qpid.server.message.RoutingResult$1.postCommit(RoutingResult.java:136)
>         at org.apache.qpid.server.txn.LocalTransaction$4.postCommit(LocalTransaction.java:304)
>         at org.apache.qpid.server.txn.LocalTransaction.doPostTransactionActions(LocalTransaction.java:433)
>         at org.apache.qpid.server.txn.LocalTransaction.commitAsync(LocalTransaction.java:417)
>         at org.apache.qpid.server.protocol.v0_8.AMQChannel.commit(AMQChannel.java:1132)
>         at org.apache.qpid.server.protocol.v0_8.AMQChannel.receiveTxCommit(AMQChannel.java:3407)
>         at org.apache.qpid.server.protocol.v0_8.ServerDecoder.processMethod(ServerDecoder.java:229)
>         at org.apache.qpid.server.protocol.v0_8.AMQDecoder.processFrame(AMQDecoder.java:203)
>         at org.apache.qpid.server.protocol.v0_8.BrokerDecoder.doProcessFrame(BrokerDecoder.java:141)
>         at org.apache.qpid.server.protocol.v0_8.BrokerDecoder.processFrame(BrokerDecoder.java:65)
>         at org.apache.qpid.server.protocol.v0_8.AMQDecoder.processInput(AMQDecoder.java:185)
>         at org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:104)
>         at org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:97)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at org.apache.qpid.server.protocol.v0_8.BrokerDecoder.processAMQPFrames(BrokerDecoder.java:96)
>         at org.apache.qpid.server.protocol.v0_8.AMQDecoder.decode(AMQDecoder.java:118)
>         at org.apache.qpid.server.protocol.v0_8.ServerDecoder.decodeBuffer(ServerDecoder.java:44)
>         at org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8Impl$1.run(AMQPConnection_0_8Impl.java:247)
>         at org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8Impl$1.run(AMQPConnection_0_8Impl.java:239)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8Impl.received(AMQPConnection_0_8Impl.java:238)
>         at org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:130)
>         at org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:593)
>         at org.apache.qpid.server.transport.NonBlockingConnectionPlainDelegate.processData(NonBlockingConnectionPlainDelegate.java:58)
>         at org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:483)
>         at org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>         at org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:124)
>         at org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>         at org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
>         at org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
>         at org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> {noformat}
> If a consumer is using a different protocol (i.e. 0-10 and 1.0), the attempt to convert
the message headers fails and this cause the Broker to crash.  If a consumer is using a selector,
the message headers need to be decoded to evaluate the header.  This too causes the Broker
to crash.
> If the message is observed from Management (AMQP or HTTP), the exception is caught and
an error returned to the caller.  The Broker does not crash. However, internally the FieldTable
object's 'map' backing view is left in an incomplete state and a QBB slice is left undisposed.
 Any properties that followed the property with the unknown type in the encoded form will
be absent from the backing map.  This will mean that any future observation made by Management
will apparently succeed but  give incomplete results. Furthermore once the Management observation
is made, the message could be delivered to a 0-10/1.0 consuming client but with incomplete
headers. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message