Deadlock during 'EntirePool' flush on MySQL connection error in EAP 6
Issue
A datasource pool is configured with <flush-strategy>EntirePool</flush-strategy>
time=1
: Onthread-one
, an in-use connection (JDBCMysqlXAConnection
- which is locked within MySQL code) detects a failure and notifies its event listenerstime=2
: Onthread-two
, during connection validation, an invalid connection is detected and the thread synchronously locks and begins flushing the pooltime=3
: Onthread-one
, anXAManagedConnection
instance, on connection error notification, synchronously attempts to flush the pool and blocks on the pool locktime=4
: Onthread-two
, the in-progress pool flush attempts to close theJDBCMysqlXAConnection
owned bythread-one
and blocks on the connection lock
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 6
- MySQL1
-
Other datasource types may exhibit similar issues ↩︎
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.