qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danushka Menikkumbura (JIRA)" <j...@apache.org>
Subject [jira] Commented: (QPID-2902) LargeMessageTest fails on java.0.10 test profiles
Date Thu, 06 Jan 2011 19:09:45 GMT

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

Danushka Menikkumbura commented on QPID-2902:

Initially it looked as if it was an encoding issue but when I had a closer look I could see
that the issue lied in the frame assembler.

Actually the message segments generated in the Assembler.java (lines 158-162) were corrupted
as a result of scrambled frame body content.

Assembler.frame() receives frames of a given message that are stored in a list and assembled
and sent forward as soon as the last frame is received. The frame body content gets corrupted
during this transition. This is due to a flaw in the frame body content formation logic in
the broker transport input handler. 

The InputHandler uses a fixed-length ByteBuffer which gets filled with incoming data stream
and frame content is formed by slicing this buffer. When a ByteBuffer is sliced, the new buffer
is a shared subsequence of the original buffer's content and changes to the original buffer
is visible in the new buffer and vice versa. Because of this reason, frame content stored
in the segment gets corrupted and as a result the content of final AMQP message gets corrupted.


> LargeMessageTest fails on java.0.10 test profiles
> -------------------------------------------------
>                 Key: QPID-2902
>                 URL: https://issues.apache.org/jira/browse/QPID-2902
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker, Java Client
>            Reporter: Robbie Gemmell
>            Assignee: Danushka Menikkumbura
> LargeMessageTest sporadically fails on the java.0.10 test profiles. It is currently excluded.
> eg:
>         FAILED
> Excpetion occured:java.nio.charset.MalformedInputException: Input length = 1
> junit.framework.AssertionFailedError: Excpetion occured:java.nio.charset.MalformedInputException:
Input length = 1
>         at org.apache.qpid.test.unit.basic.LargeMessageTest.checkLargeMessage(LargeMessageTest.java:159)
>         at org.apache.qpid.test.unit.basic.LargeMessageTest.test1024k(LargeMessageTest.java:133)
>         at org.apache.qpid.test.utils.QpidBrokerTestCase.runBare(QpidBrokerTestCase.java:232)
>         at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:120)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org

View raw message