Threads Stuck on Jdbc.driver.CancelLock.exitExecuting With JDBC 12.1.0.2

(Doc ID 2061757.1)

Last updated on AUGUST 03, 2016

Applies to:

JDBC - Version 12.1.0.2.0 and later
Information in this document applies to any platform.

Symptoms

Application using 12.1.0.2 ojdbc7.jar version experiences stuck threads during execution.
The issue occurs when in a failure test the Oracle Listener is stopped, the Oracle Database sessions are killed, and then the Oracle Listener is restarted while the application is processing transactions.
After these steps are performed, sometimes one or more threads are stuck after the sessions have been killed. The stack trace is always similar to the following:
 
"G_M405T285|utx:7a7b49f8:14de7b67de7:-1aaa|chnl:L-XXX1-STP-01_TransactionQueue-Global" prio=10 tid=0x00007fb28c3028f0 nid=0xc69 in Object.wait()
[0x00007fb275593000]
  java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at oracle.jdbc.driver.CancelLock.exitExecuting(CancelLock.java:65)
- locked <0x00000004d37c3c00> (a oracle.jdbc.driver.CancelLock)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1185)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4798)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:4875)
- locked <0x00000004d37c4078> (a oracle.jdbc.driver.T4CConnection)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1361)
 
There is the need to stop the JVM to clear the situation.

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