activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Valeri (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMQ-4073) Cannot shut down broker under certain conditions with schedule delivery and producer flow control
Date Mon, 24 Sep 2012 23:14:07 GMT
David Valeri created AMQ-4073:
---------------------------------

             Summary: 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
            Priority: Minor
         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

Mime
View raw message