[jira] [Commented] (DISPATCH-825) Corrupted data on larger (>100Kb) messages

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (DISPATCH-825) Corrupted data on larger (>100Kb) messages

JIRA jira@apache.org

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

ASF GitHub Bot commented on DISPATCH-825:
-----------------------------------------

GitHub user ChugR opened a pull request:

    https://github.com/apache/qpid-dispatch/pull/194

    DISPATCH-825: Fix interlocking between message send and receive

    Don't allow a buffer on the message buffer chain that might be removed.
    Use a content-based pending buffer instead.
    Don't release message lock between adding final buffer and setting
    receive_complete flag.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ChugR/qpid-dispatch DISPATCH-825

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/qpid-dispatch/pull/194.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #194
   
----
commit b6e10668a59fc3953698ce1fcc27f45b307276c3
Author: Chuck Rolke <[hidden email]>
Date:   2017-09-13T15:49:30Z

    DISPATCH-825: Fix interlocking between message send and receive
   
    Don't allow a buffer on the message buffer chain that might be removed.
    Use a content-based pending buffer instead.
    Don't release message lock between adding final buffer and setting
    receive_complete flag.

----


> Corrupted data on larger (>100Kb) messages
> ------------------------------------------
>
>                 Key: DISPATCH-825
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-825
>             Project: Qpid Dispatch
>          Issue Type: Bug
>         Environment: Fedora 25. Master branch qpid-dispatch and qpid-cpp tools: qpid-send, qpid-receive
>            Reporter: Chuck Rolke
>
> h1. Setup
> h3. Start a dispatch router with this conf file:
> {noformat}
> # Router to run qpid-interop-test
> router {
>     mode: interior
>     id: Router.A
>     workerThreads: 4
>     allowUnsettledMulticast: yes
> }
> listener {
>     host: 0.0.0.0
>     port: 5672
>     authenticatePeer: no
>     saslMechanisms: ANONYMOUS
> }
> listener {
>     host: localhost
>     port: 5672
>     authenticatePeer: no
>     saslMechanisms: ANONYMOUS
> }
> address {
>     prefix: jms.queue.qpid-interop.#
>     distribution: balanced
> }
> log {
>     module: DEFAULT
>     enable: debug+
> }
> ({noformat}
> h3. Start a receiver to receive 1000 messages:
> {noformat}
> qpid-receive -a jms.queue.qpid-interop.test --connection-options "{protocol:amqp1.0}" -m 1000 -f --print-content no --print-headers yes --ack-frequency 1
> {noformat}
> h3. Start 1000 senders each with a different length message
> {noformat}
> #!/bin/bash
> for i in `seq 100512 101511`;
>         do
>             qpid-send -a jms.queue.qpid-interop.test --connection-options "{protocol:amqp1.0}" -m 1 --content-size $i
>         done    
> {noformat}
> h1. Result
> Eventually the receive program will exit with an error:
> {noformat}
> qpid-receive: Out of Bounds:
>   requested advance of 100552 at 42 but only 100444 available
>   (/home/chug/git/qpid-cpp/src/qpid/amqp/Decoder.cpp:307)
> {noformat}
> h2. Observations
> * Putting qd_log statements in the qd_message_send path, one at each pn_link_send() invocation, allows the setup to run the 1000 messages repeatedly. Probably it would fail eventually but in this condition it is harder to debug.
> * I suspect a interlock issue between sending and receiving a single message but adding a dozen or so assert has not revealed anything yet.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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