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

Alex Rudyy updated QPID-6963:
-----------------------------
    Description: 
ArrayIndexOutOfBoundsException is thrown instead of AMQFrameDecodingException  
on decoding of partially written frames in some circumstances.

0-9 frame decoding functionally should be improved to prevent that from 
happening or re-throw ArrayIndexOutOfBoundsException  as 
AMQFrameDecodingException.
 
{noformat}
2015-12-29 23:28:23,198 ERROR 
[IoRcvr-/XXX.XXX.XXX.XXX:5677-/YYY.YYY.YYY.YYY:34735] v0_8.AMQProtocolEngine 
(AMQProtocolEngine.java:1216) - Exception caught in 
/YYY.YYY.YYY.YYY:34735(nrsdev), closing connection explicitly: 
java.lang.ArrayIndexOutOfBoundsException: 347
java.lang.ArrayIndexOutOfBoundsException: 347
        at 
org.apache.qpid.framing.ByteArrayDataInput.readByte(ByteArrayDataInput.java:71)
        at 
org.apache.qpid.framing.EncodingUtils.readLongAsShortString(EncodingUtils.java:992)
        at 
org.apache.qpid.framing.BasicContentHeaderProperties.decode(BasicContentHeaderProperties.java:382)
        at 
org.apache.qpid.framing.BasicContentHeaderProperties.populatePropertiesFromBuffer(BasicContentHeaderProperties.java:331)
        at 
org.apache.qpid.framing.ContentHeaderBody.process(ContentHeaderBody.java:175)
        at org.apache.qpid.codec.AMQDecoder.processFrame(AMQDecoder.java:391)
        at 
org.apache.qpid.server.protocol.v0_8.BrokerDecoder.doProcessFrame(BrokerDecoder.java:113)
        at 
org.apache.qpid.server.protocol.v0_8.BrokerDecoder.access$000(BrokerDecoder.java:36)
        at 
org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:79)
        at 
org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:75)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at 
org.apache.qpid.server.protocol.v0_8.BrokerDecoder.processFrame(BrokerDecoder.java:74)
        at org.apache.qpid.codec.AMQDecoder.processInput(AMQDecoder.java:370)
        at org.apache.qpid.codec.AMQDecoder.decodeBuffer(AMQDecoder.java:259)
        at 
org.apache.qpid.server.protocol.v0_8.AMQProtocolEngine$2.run(AMQProtocolEngine.java:334)
        at 
org.apache.qpid.server.protocol.v0_8.AMQProtocolEngine$2.run(AMQProtocolEngine.java:311)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:356)
        at 
org.apache.qpid.server.protocol.v0_8.AMQProtocolEngine.received(AMQProtocolEngine.java:310)
        at 
org.apache.qpid.server.protocol.v0_8.AMQProtocolEngine.received(AMQProtocolEngine.java:95)
        at 
org.apache.qpid.server.protocol.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:153)
        at 
org.apache.qpid.server.protocol.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:51)
        at 
org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:163)
        at java.lang.Thread.run(Thread.java:724)

{noformat}

  was:
ArrayIndexOutOfBoundsException is thrown instead of AMQFrameDecodingException  
on decoding of partially written frames in some circumstances.

0-9 frame decoding functionally should be improved to prevent that from 
happening or re-throw ArrayIndexOutOfBoundsException  as 
AMQFrameDecodingException.
 
I do not have a stack trace at the moment. As soon as I have the stack trace 
I'll attach it to this JIRA


> [Java Broker] ArrayIndexOutOfBoundsException is thrown on some cases when 
> decoding partially written frames
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-6963
>                 URL: https://issues.apache.org/jira/browse/QPID-6963
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.26, 0.28, 0.30, 0.32, qpid-java-6.0
>            Reporter: Alex Rudyy
>
> ArrayIndexOutOfBoundsException is thrown instead of AMQFrameDecodingException 
>  on decoding of partially written frames in some circumstances.
> 0-9 frame decoding functionally should be improved to prevent that from 
> happening or re-throw ArrayIndexOutOfBoundsException  as 
> AMQFrameDecodingException.
>  
> {noformat}
> 2015-12-29 23:28:23,198 ERROR 
> [IoRcvr-/XXX.XXX.XXX.XXX:5677-/YYY.YYY.YYY.YYY:34735] v0_8.AMQProtocolEngine 
> (AMQProtocolEngine.java:1216) - Exception caught in 
> /YYY.YYY.YYY.YYY:34735(nrsdev), closing connection explicitly: 
> java.lang.ArrayIndexOutOfBoundsException: 347
> java.lang.ArrayIndexOutOfBoundsException: 347
>         at 
> org.apache.qpid.framing.ByteArrayDataInput.readByte(ByteArrayDataInput.java:71)
>         at 
> org.apache.qpid.framing.EncodingUtils.readLongAsShortString(EncodingUtils.java:992)
>         at 
> org.apache.qpid.framing.BasicContentHeaderProperties.decode(BasicContentHeaderProperties.java:382)
>         at 
> org.apache.qpid.framing.BasicContentHeaderProperties.populatePropertiesFromBuffer(BasicContentHeaderProperties.java:331)
>         at 
> org.apache.qpid.framing.ContentHeaderBody.process(ContentHeaderBody.java:175)
>         at org.apache.qpid.codec.AMQDecoder.processFrame(AMQDecoder.java:391)
>         at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.doProcessFrame(BrokerDecoder.java:113)
>         at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.access$000(BrokerDecoder.java:36)
>         at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:79)
>         at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:75)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAs(Subject.java:415)
>         at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.processFrame(BrokerDecoder.java:74)
>         at org.apache.qpid.codec.AMQDecoder.processInput(AMQDecoder.java:370)
>         at org.apache.qpid.codec.AMQDecoder.decodeBuffer(AMQDecoder.java:259)
>         at 
> org.apache.qpid.server.protocol.v0_8.AMQProtocolEngine$2.run(AMQProtocolEngine.java:334)
>         at 
> org.apache.qpid.server.protocol.v0_8.AMQProtocolEngine$2.run(AMQProtocolEngine.java:311)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAs(Subject.java:356)
>         at 
> org.apache.qpid.server.protocol.v0_8.AMQProtocolEngine.received(AMQProtocolEngine.java:310)
>         at 
> org.apache.qpid.server.protocol.v0_8.AMQProtocolEngine.received(AMQProtocolEngine.java:95)
>         at 
> org.apache.qpid.server.protocol.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:153)
>         at 
> org.apache.qpid.server.protocol.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:51)
>         at 
> org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:163)
>         at java.lang.Thread.run(Thread.java:724)
> {noformat}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to