What Causes a Deadlock in JDBC? (Doc ID 1529317.1)

Last updated on MARCH 08, 2017

Applies to:

MySQL Connectors - Version 5.1 and later
Information in this document applies to any platform.

Symptoms

On : 5.1 version, Connector/J and JDBC

ERROR
-----------------------
"Thread-23459":
  waiting to lock monitor 0x0000000042f71de8 (object 0x000000067d0753b0, a java.lang.Object),
  which is held by "SessionListUpdateThread"
"SessionListUpdateThread":
  waiting to lock monitor 0x00000000414ea500 (object 0x000000067d06bea0, a com.mysql.jdbc.JDBC4Connection),
  which is held by "Thread-23459"



STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Create a Connection object
2. Share the single Connection object across 2 different java threads

BUSINESS IMPACT
-----------------------
The issue has the following business impact:
Due to this issue, users cannot guarantee that the application will continue to function and instead go into a state of deadlock.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms