Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.3, 1.3.1, 1.3.2
-
Fix Version/s: 1.3.3
-
Labels:None
-
Number of attachments :
Description
When a connection is closed after the transaction in which it has been enlisted has been terminated, the connection pool must check if the connection is still enlisted in a transaction or not.
This basically means iterating all the XAResources of all in-flight transactions via the Scheduler of transactions' XAResourceManager. Since those calls are not reentrant, they can lead to an exception in a Scheduler's iterator which end up with the connection not being requeued.
See: http://www.nabble.com/Exception-during-calling-Connection-close()-to20242143.html
Issue Links
- is superceded by
-
BTM-43
Fix for BTM-33 leads to another problem
-
As a workaround, you can make sure connections are closed before the transaction commits or rolls back.
Fixing this bug will require more than just adding synchronizations: iterating all transactions will hardly ever be thread safe so this should be changed to make sure a thread never need to read data outside of its transaction context.
The exact root cause is unknown yet, the parts of the code that trigger this race condition still need to be found to be able to reproduce the bug. This must happen before any fix can be worked on.