You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2013/09/05 21:59:52 UTC

[jira] [Resolved] (AMQ-4073) Cannot shut down broker under certain conditions with schedule delivery and producer flow control

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

Timothy Bish resolved AMQ-4073.
-------------------------------

    Resolution: Fixed

Fixed on trunk.  Will appear in the next nightly. 
                
> Cannot shut down broker under certain conditions with schedule delivery and producer flow control
> -------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-4073
>                 URL: https://issues.apache.org/jira/browse/AMQ-4073
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.6.0
>            Reporter: David Valeri
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 5.9.0
>
>         Attachments: JobSchedulerBrokerShutdownTest.java
>
>
> When producer flow control is enabled and the the job scheduler attempts delivery, the job scheduler blocks while attempting delivery.  This blocking holds the lock on the job scheduler and stops all other job scheduler activity.  The holding of the lock on the job scheduler also blocks the delivery of additional scheduled messages and can impact the shutdown of the broker.
> org.apache.activemq.broker.scheduler.JobSchedulerImpl.schedule(String, ByteSequence, String, long, long, int) waits for the lock while the job scheduler is blocked.  Any transport connections attempting to call this method get blocked and are also unable to shutdown.  Connections do log "2012-09-24 12:04:23,661 [main           ] - INFO  TransportConnection            - The connection to 'vm://localhost#0' is taking a long time to shutdown." when attempting shutdown with the job scheduler blocked and a client attempting to schedule a message, but do not log anything when this situation occurs under normal broker operation.  The producer simply stops producing messages.
> The shutdown is blocked by org.apache.activemq.broker.TransportConnection.serviceLock as it is owned by the blocked thread trying to schedule a new message.
> I have attached a unit test that reproduces the issue.  The test will not complete as it hangs on the broker shutdown as described above.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira