Details
Description
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:
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
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.