You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Robbie Gemmell (JIRA)" <ji...@apache.org> on 2019/03/13 16:03:00 UTC

[jira] [Moved] (QPID-8285) Deadlock during receiveMessage when broker connecton fails

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

Robbie Gemmell moved QPIDJMS-446 to QPID-8285:
----------------------------------------------

    Component/s:     (was: qpid-jms-client)
                 JMS AMQP 0-x
       Workflow: QPid Workflow  (was: classic default workflow)
            Key: QPID-8285  (was: QPIDJMS-446)
        Project: Qpid  (was: Qpid JMS)

> Deadlock during receiveMessage when broker connecton fails
> ----------------------------------------------------------
>
>                 Key: QPID-8285
>                 URL: https://issues.apache.org/jira/browse/QPID-8285
>             Project: Qpid
>          Issue Type: Bug
>          Components: JMS AMQP 0-x
>         Environment: * Java 1.8.0_20, 1.8.0_192, & 1.8.0_172
>  * Linux 4.9.0-4-amd64 & 3.10.0-327.13
>  * qpidd 1.39.0
>            Reporter: Jonathan Beales
>            Priority: Major
>         Attachments: qpid_jms_deaklock.patch
>
>
> When a JMS MessageConsumer calls receiveMessage with a timeout, if no message is received during the timeout, BasicMessageConsumer_0_10.getMessageFromQueue() calls the syncDispatchQueue() method.  As not the dispatcher thread, the consumer waits on a method local CountDownLatch which should be decremented when the AMQSession.Dispatcher thread calls dispatch().
> In the AMQSession.Dispatcher thread, the core loop will stop pulling from the queue to dispatch messages when the connection to the broker is lost (isClosing() becomes true).
> In this scenario, the receiveMessage call is waiting forever because the Dispatcher will never call dispatch.  This also leaves the Dispatcher thread in an infinite loop (using 100% CPU) waiting to be fully closed.
> This can fixed by allowing the AMQSession.Dispatcher to always dispatch remaining queue content to ensure a consumer is not waiting forever (see attached).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org