otbutz opened a new issue, #2645:
URL: https://github.com/apache/activemq/issues/2645

   We found this while troubleshooting a message driven bean getting stuck. 
Notice that the `activeSessions` list contains the same ServerSessionImpl 
object twice:
   
   <img width="1647" height="786" alt="Image" 
src="https://github.com/user-attachments/assets/305830f8-4abe-4178-a348-c802e135ddf7";
 />
   
   The culprit is most likely that the manipulation of the running flag and the 
`returnToPool()` invocation are prone to a race condition:
   
   
https://github.com/apache/activemq/blob/69ecc88f8c01547ddebf2346193036252059f074/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java#L201-L202
   
   The pool might reuse the session before `returnToPool()` is invoked:
   
   
https://github.com/apache/activemq/blob/69ecc88f8c01547ddebf2346193036252059f074/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionPoolImpl.java#L181-L189
   
   The duplicate idle entries are than eventually carried over as duplicate 
active entries.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to