qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Rudyy (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (QPID-6206) [JMS 0-9 client] AMQDecoder uses buffered data from previous connection to decode broker frames
Date Tue, 04 Nov 2014 10:00:49 GMT

     [ https://issues.apache.org/jira/browse/QPID-6206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alex Rudyy resolved QPID-6206.
------------------------------
    Resolution: Fixed

The changes look good to me

> [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
>            Assignee: Rob Godfrey
>             Fix For: 0.31
>
>
> 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


Mime
View raw message