[
https://issues.apache.org/jira/browse/PROTON-1169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15286378#comment-15286378
]
Gordon Sim commented on PROTON-1169:
------------------------------------
Try changing from pn_messenger_send() to pn_messenger_work(). WIth that change,
your reproducer seems to work for me.
> Deadlock in pn_messenger_send when using more than 2 publishers?
> ----------------------------------------------------------------
>
> Key: PROTON-1169
> URL: https://issues.apache.org/jira/browse/PROTON-1169
> Project: Qpid Proton
> Issue Type: Bug
> Components: proton-c
> Affects Versions: 0.12.0
> Environment: Fedora 23, 64-bit
> Reporter: Frank Quinn
>
> As per
> http://qpid.2158936.n2.nabble.com/Deadlock-in-pn-messenger-send-when-using-more-than-2-publishers-td7641239.html,
> I think I have found an issue with qpid proton when running in point to
> point mode. If running a single recv thread and 3 concurrent messenger links
> are set up with it, it seems to cause a deadlock in the third
> pn_messenger_send. All subsequent attempts to send will also hang (i.e. the
> proton example send.c application).
> We found this behaviour in our own code for OpenMAMA, but I think we have a
> valid recreation in native qpid proton code here too - see
> https://github.com/OpenMAMA/OpenMAMA/files/200901/om-issue-153.zip (attached
> as part of where it was discovered -
> https://github.com/OpenMAMA/OpenMAMA/issues/153).
> If you compile and run that code on latest yum versions for Fedora 23 / qpid
> proton, you'll get:
> {noformat}
> Creating the messengers
> Starting the messengers
> Starting listener thread
> pthread_create successful
> Creating message for sending
> Setting the subject for the message
> Setting the address and sending message to subscriber
> Sending from first publisher
> Sent from first publisher
> Recv got something
> Received message with subject 'First Publisher'
> Sending from second publisher
> Sent from second publisher
> Recv got something
> Received message with subject 'Second Publisher'
> Sending from third publisher
> {noformat}
> Then it hangs - you never get "Sent from third publisher".
> The application sets up one messenger to run on its own recv thread, then on
> the main thread, it fires up 3 distinct messengers and attempts to send a
> single message from each messenger, and the third one hangs.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]