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

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

                Author: ASF GitHub Bot
            Created on: 29/Apr/25 07:52
            Start Date: 29/Apr/25 07:52
    Worklog Time Spent: 10m 
      Work Description: jeanouii commented on PR #1420:
URL: https://github.com/apache/activemq/pull/1420#issuecomment-2837842939

   @jbonofre It should be all green now




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

    Worklog Id:     (was: 967952)
    Time Spent: 1h 10m  (was: 1h)

> DeadLock in RA ServerSessionImpl
> --------------------------------
>
>                 Key: AMQ-9693
>                 URL: https://issues.apache.org/jira/browse/AMQ-9693
>             Project: ActiveMQ Classic
>          Issue Type: Bug
>          Components: RAR
>    Affects Versions: 5.19.0, 6.1.6, 5.18.7
>            Reporter: Jean-Louis Monteiro
>            Priority: Major
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> I am running into a DeadLock issue with ActiveMQ Resource adapter. 
> The start method relies on a synchronized block (based on an instance object, 
> not final btw). At the same time, run() which is executed on another thread. 
> That thread might decide to remove the session from the pool when a session 
> is stale (see around line 190, the finally block). But the removeFromPool may 
> result in start() being called to dispatch unconsumed messages, hence 
> producing such deadlock
>  
> {code:java}
> java.lang.Thread.State: BLOCKED (on object monitor)
> at org.apache.activemq.ra.ServerSessionImpl.start(ServerSessionImpl.java:123)
> - waiting to lock <0x00000005943ea820> (a java.lang.Object)
> at 
> org.apache.activemq.ra.ServerSessionPoolImpl.dispatchToSession(ServerSessionPoolImpl.java:274)
> at 
> org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSessionPoolImpl.java:235)
> at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:190)
> - locked <0x00000005943ea980> (a java.lang.Object)
> at 
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:366)
> at 
> org.apache.geronimo.connector.work.pool.NamedRunnable.run(NamedRunnable.java:32)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@21.0.3/ThreadPoolExecutor.java:1144)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@21.0.3/ThreadPoolExecutor.java:642)
> at java.lang.Thread.runWith(java.base@21.0.3/Thread.java:1596)
> at java.lang.Thread.run(java.base@21.0.3/Thread.java:1583)
>    Locked ownable synchronizers:
>       - <0x00000005a29cc220> (a 
> java.util.concurrent.ThreadPoolExecutor$Worker) {code}
> I will open a PR shortly to provide a simple fix.
>  
>  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@activemq.apache.org
For additional commands, e-mail: issues-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to