You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "otbutz (via GitHub)" <gi...@apache.org> on 2026/10/12 12:02:38 UTC

[I] ServerSessionPoolImpl duplicates active/idle session entries [activemq]

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: gitbox-unsubscribe@activemq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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



Re: [I] ServerSessionPoolImpl duplicates active/idle session entries [activemq]

Posted by "otbutz (via GitHub) via gitbox" <gi...@activemq.apache.org>.
otbutz commented on issue #2645:
URL: https://github.com/apache/activemq/issues/2645#issuecomment-7163524323

   @bkbac you might want to look into #2647


-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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



Re: [I] ServerSessionPoolImpl duplicates active/idle session entries [activemq]

Posted by "bkbac (via GitHub) via gitbox" <gi...@activemq.apache.org>.
bkbac commented on issue #2645:
URL: https://github.com/apache/activemq/issues/2645#issuecomment-7157066374

   We've been running against the same issue where consumption of a specific queue stopped. It looks related to this issue.
   We tried the suggested fix (PR) in our UAT environment, but it did not resolve our issue.
   I'm attaching a patch with some extra fixes which seems to have fixed it for us.
   
   [0-activemq-6.2.9-session-wakeup-test.patch](https://github.com/user-attachments/files/35401442/0-activemq-6.2.9-session-wakeup-test.patch)


-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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



Re: [I] ServerSessionPoolImpl duplicates active/idle session entries [activemq]

Posted by "mattrpav (via GitHub) via gitbox" <gi...@activemq.apache.org>.
mattrpav commented on issue #2645:
URL: https://github.com/apache/activemq/issues/2645#issuecomment-7163411420

   @jeanouii could you take a look at this one impacting activemq-ra?


-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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