Bug 1480095 - [GSS](6.4.z) Potential for deadlock on pool's flush
Summary: [GSS](6.4.z) Potential for deadlock on pool's flush
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JCA
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.4.19
Assignee: Radovan STANCEL
QA Contact: Jiří Bílek
URL:
Whiteboard:
Depends On:
Blocks: 1436227 eap6419-payload
TreeView+ depends on / blocked
 
Reported: 2017-08-10 07:00 UTC by Tom Ross
Modified: 2021-06-10 12:47 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-16 11:04:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBEAP-12798 0 Blocker Verified [GSS](7.0.z) JBJCA-1354 - Potential for deadlock on pool's flush 2018-06-06 00:57:11 UTC
Red Hat Issue Tracker JBEAP-13009 0 Blocker Verified [GSS](7.1.0) Potential for deadlock on pool's flush 2018-06-06 00:57:11 UTC
Red Hat Issue Tracker JBJCA-1354 0 Major Resolved Potential for deadlock on pool's flush 2018-06-06 00:57:11 UTC
Red Hat Knowledge Base (Solution) 3164401 0 None None None 2017-08-25 09:31:44 UTC

Description Tom Ross 2017-08-10 07:00:39 UTC
There is a potential for deadlock on all flushes in pools. The problem is that flush is synchronized and inside the flush the code can be delegated to listeners, that are external to IronJacamar.
If those listeners use their own synchronization system , they could require synchronization locking in themselves. If there is another thread locking the listener and at some point invoking an operation that results in a pool flush, the system could enter a deadlock state.
An example of stack trace:
Found one Java-level deadlock:
=============================
"JMSCCThreadPoolWorker-18":
  waiting to lock monitor 0x00007f1d2409ff48 (object 0x00000007853ad060, a org.jboss.jca.core.connectionmanager.pool.strategy.OnePool),
  which is held by "JMSCCThreadPoolWorker-16"
"JMSCCThreadPoolWorker-16":
  waiting to lock monitor 0x00007f1d1c15d138 (object 0x0000000785998598, a com.ibm.mq.connector.outbound.ConnectionEventHandler),
  which is held by "JMSCCThreadPoolWorker-17"
"JMSCCThreadPoolWorker-17":
  waiting to lock monitor 0x00007f1d2409ff48 (object 0x00000007853ad060, a org.jboss.jca.core.connectionmanager.pool.strategy.OnePool),
  which is held by "JMSCCThreadPoolWorker-16"
 
Java stack information for the threads listed above:
===================================================
"JMSCCThreadPoolWorker-18":
	at org.jboss.jca.core.connectionmanager.pool.AbstractPool.flush(AbstractPool.java:322)
	- waiting to lock <0x00000007853ad060> (a org.jboss.jca.core.connectionmanager.pool.strategy.OnePool)
	at org.jboss.jca.core.connectionmanager.listener.AbstractConnectionListener.connectionErrorOccurred(AbstractConnectionListener.java:368)
	at com.ibm.mq.connector.outbound.ConnectionEventHandler.fireEvent(ConnectionEventHandler.java:141)
	- locked <0x0000000788fe1fa0> (a com.ibm.mq.connector.outbound.ConnectionEventHandler)
	at com.ibm.mq.connector.outbound.ManagedConnectionImpl.onException(ManagedConnectionImpl.java:848)

Comment 5 Jiří Bílek 2018-01-08 10:32:31 UTC
The fix causes regression.
More info about regression in BZ1531005

Reopened.

Comment 7 Jiří Bílek 2018-01-16 16:35:55 UTC
Verified with EAP 6.4.19.CP.CR2


Note You need to log in before you can comment on or make changes to this bug.