[ 
https://issues.apache.org/jira/browse/AMQ-9448?focusedWorklogId=910667&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-910667
 ]

ASF GitHub Bot logged work on AMQ-9448:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 20/Mar/24 06:25
            Start Date: 20/Mar/24 06:25
    Worklog Time Spent: 10m 
      Work Description: thezbyg commented on PR #1177:
URL: https://github.com/apache/activemq/pull/1177#issuecomment-2008727676

   I have now added a new unit test. Does existing JmsSchedulerTest#testCron 
unit test run successfully for you before this change?




Issue Time Tracking
-------------------

    Worklog Id:     (was: 910667)
    Time Spent: 0.5h  (was: 20m)

> RedeliveryPolicy causing lock in dispatcher
> -------------------------------------------
>
>                 Key: AMQ-9448
>                 URL: https://issues.apache.org/jira/browse/AMQ-9448
>             Project: ActiveMQ Classic
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.18.3
>         Environment: ubuntu-22.04
> corretto-17
>            Reporter: Oliver Holzmann
>            Priority: Critical
>         Attachments: doNotFireJobsWhileStoreLockIsHeld.patch, jstack1.out
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> We are using ActiveMQ with redeliveryPolicy enabled:
> {code:java}
> <defaultEntry>
> <redeliveryPolicy maximumRedeliveries="60" initialRedeliveryDelay="1000" 
> redeliveryDelay="1000" />
> </defaultEntry>{code}
> When a message exceeds maximumRedeliveries the queue is "frozen". This means 
> the consumers can't read any messages and qrowing the queue in web console 
> causes error 504. 
> A thread dump shows a blocked JobScheduler:JMS thread:
> {code:java}
> priority : 5
> thread Id : x00007fb985664960
> native Id : xae
> state : BLOCKED
> StackTrace:
> "JobScheduler:JMS" #75 daemon prio=5 os_prio=0 cpu=478.63ms elapsed=757.29s 
> tid=0x00007fb985664960 nid=0xae waiting for monitor entry [0x00007fb80def1000]
> java.lang.Thread.State: BLOCKED (on object monitor)
> at 
> org.apache.activemq.broker.region.PrefetchSubscription.dispatchPending(PrefetchSubscription.java:647)
> waiting to lock <0x000000077ebc62a0> (a java.lang.Object) locked 
> <0x000000077ebc6290> (a java.lang.Object)
> at 
> org.apache.activemq.broker.region.PrefetchSubscription.add(PrefetchSubscription.java:159)
> at org.apache.activemq.broker.region.Queue.doActualDispatch(Queue.java:2208)
> at org.apache.activemq.broker.region.Queue.doDispatch(Queue.java:2156)
> at org.apache.activemq.broker.region.Queue.pageInMessages(Queue.java:2307)
> at org.apache.activemq.broker.region.Queue.iterate(Queue.java:1728) locked 
> <0x000000077ebc5178> (a java.lang.Object)
> at org.apache.activemq.broker.region.Queue.wakeup(Queue.java:1977)
> at org.apache.activemq.broker.region.Queue.messageSent(Queue.java:1971)
> at 
> org.apache.activemq.broker.region.Queue.doPendingCursorAdditions(Queue.java:832)
> at org.apache.activemq.broker.region.Queue.tryOrderedCursorAdd(Queue.java:927)
> at org.apache.activemq.broker.region.Queue.doMessageSend(Queue.java:906)
> at org.apache.activemq.broker.region.Queue.send(Queue.java:756)
> at 
> org.apache.activemq.broker.region.DestinationFilter.send(DestinationFilter.java:138)
> at 
> org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:511)
> at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:477)
> at 
> org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:343)
> at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:154)
> at 
> org.apache.activemq.broker.scheduler.SchedulerBroker.scheduledJob(SchedulerBroker.java:429)
> at 
> org.apache.activemq.store.kahadb.scheduler.JobSchedulerImpl.fireJob(JobSchedulerImpl.java:823)
> at 
> org.apache.activemq.store.kahadb.scheduler.JobSchedulerImpl.mainLoop(JobSchedulerImpl.java:753)
> at 
> org.apache.activemq.store.kahadb.scheduler.JobSchedulerImpl.run(JobSchedulerImpl.java:699)
> at java.lang.Thread.run(java.base@17.0.10/Thread.java:840)
> Locked ownable synchronizers: <0x000000077ebc3ed0> (a 
> java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to