You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Keith Wall (JIRA)" <ji...@apache.org> on 2014/10/31 18:19:33 UTC

[jira] [Commented] (QPID-6206) [JMS 0-9 client] AMQDecoder uses buffered data from previous connection to decode broker frames

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

Keith Wall commented on QPID-6206:
----------------------------------

Defect report from Alex Rudyy,.

> [JMS 0-9 client] AMQDecoder uses buffered data from previous connection to decode broker frames
> -----------------------------------------------------------------------------------------------
>
>                 Key: QPID-6206
>                 URL: https://issues.apache.org/jira/browse/QPID-6206
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.18, 0.22, 0.30
>            Reporter: Keith Wall
>
> On failover client AMQDecoder might use buffered data from previous connection to decode broker ProtocolInitaiation frame response and fail.
> {noformat}
> 13:11:24.215 [IoReceiver - myhostname/192.168.0.1:9677] ERROR o.a.q.c.p.AMQProtocolHandler - Exception processing frame
> org.apache.qpid.framing.AMQFrameDecodingException: End of frame marker not found. Read 65 length=2052 type=3
> 	at org.apache.qpid.framing.AMQDataBlockDecoder.createAndPopulateFrame(AMQDataBlockDecoder.java:104)
> 	at org.apache.qpid.codec.AMQDecoder.decodeBuffer(AMQDecoder.java:250)
> 	at org.apache.qpid.client.protocol.AMQProtocolHandler.received(AMQProtocolHandler.java:447)
> 	at org.apache.qpid.client.protocol.AMQProtocolHandler.received(AMQProtocolHandler.java:122)
> 	at org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:152) 
> 	at java.lang.Thread.run(Thread.java:619)
> {noformat}
> The exception reported indicates that client was not able to decode the response( End of frame marker not found. Read 65 length=2052 type=3).
> It appears that response was not parsed by the client due to presense of the data from previous connection in AMQDecoder.
> AMQDecoder buffers the received bytes in _remainingBufs. On connectivity lost some data remained in the buffer. AMQDecoder is reused between connections and
> on receiving ProtocolInitaiation AMQDecoder was decoding response with buffereed data from previous connection
> In fact 2 issues are found in AMQDecoder:
> 1) ProtocolInitialisation should be decoded with ProtocolInitiation.Decoder but AMQDataBlockDecoder was used to decode ProtocolInitialisation on non-first connection
> 2) Buffered data in AMQDecoder._remainingBufs from previous connection were used and AMQDataBlockDecoder was using those to decode ProtocolInitiation frame.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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