Deadlock during 'EntirePool' flush on MySQL connection error in EAP 6

Solution Verified - Updated -

Issue

A datasource pool is configured with <flush-strategy>EntirePool</flush-strategy>

  1. time=1: On thread-one, an in-use connection (JDBCMysqlXAConnection - which is locked within MySQL code) detects a failure and notifies its event listeners
  2. time=2: On thread-two, during connection validation, an invalid connection is detected and the thread synchronously locks and begins flushing the pool
  3. time=3: On thread-one, an XAManagedConnection instance, on connection error notification, synchronously attempts to flush the pool and blocks on the pool lock
  4. time=4: On thread-two, the in-progress pool flush attempts to close the JDBCMysqlXAConnection owned by thread-one and blocks on the connection lock

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 6
  • MySQL1

  1. Other datasource types may exhibit similar issues ↩︎

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content