My Oracle Support Banner

Deadlock When Using The Implicit Connection Cache And oracle.sql.ARRAY (Doc ID 2582620.1)

Last updated on SEPTEMBER 03, 2019

Applies to:

JDBC - Version 12.2.0.0.0 and later
Universal Connection Pool - Version 12.1.0.2.0 and later
Information in this document applies to any platform.

Symptoms

On : 12.2.0.1.0 version, Thin JDBC driver

Deadlock when using The Implicit Connection Cache in an application with JDBC 12.2.0.1 and ONS 12.2.0.1.



Found one Java-level deadlock:
=============================
"tomcat-http-257":
  waiting to lock monitor 0x00007f23cc011748 (object 0x0000000721b13700, a oracle.jdbc.pool.OracleImplicitConnectionCache),
  which is held by "Thread-34"
"Thread-34":
  waiting to lock monitor 0x00007f2454e6f0c8 (object 0x000000072b7de7a0, a oracle.jdbc.driver.T4CConnection),
  which is held by "tomcat-http-32"
"tomcat-http-32":
  waiting to lock monitor 0x00007f23f00b0dd8 (object 0x0000000721b6fc78, a oracle.jdbc.driver.T4CConnection),
  which is held by "tomcat-http-45"
"tomcat-http-45":
  waiting to lock monitor 0x00007f241c012108 (object 0x0000000721a85d90, a oracle.jdbc.driver.T4CConnection),
  which is held by "tomcat-http-32"

Java stack information for the threads listed above:
===================================================
"tomcat-http-257":
at oracle.jdbc.pool.OracleImplicitConnectionCache.retrieveCacheConnection(OracleImplicitConnectionCache.java:556)
- waiting to lock <0x0000000721b13700> (a oracle.jdbc.pool.OracleImplicitConnectionCache)
at oracle.jdbc.pool.OracleImplicitConnectionCache.getCacheConnection(OracleImplicitConnectionCache.java:467)
at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:358)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:489)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:194)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:176)
...

"Thread-34":
at oracle.jdbc.driver.PhysicalConnection.closeLogicalConnection(PhysicalConnection.java:2075)
- waiting to lock <0x000000072b7de7a0> (a oracle.jdbc.driver.T4CConnection)
at oracle.jdbc.driver.LogicalConnection.cleanupAndClose(LogicalConnection.java:332)
at oracle.jdbc.pool.OracleImplicitConnectionCache.closeCheckedOutConnection(OracleImplicitConnectionCache.java:1372)
at oracle.jdbc.pool.OracleImplicitConnectionCacheThread.runAbandonedTimeout(OracleImplicitConnectionCacheThread.java:256)
- locked <0x0000000721b13700> (a oracle.jdbc.pool.OracleImplicitConnectionCache)
at oracle.jdbc.pool.OracleImplicitConnectionCacheThread.run(OracleImplicitConnectionCacheThread.java:82)
"tomcat-http-32":
at oracle.jdbc.oracore.OracleTypeADT.linearize(OracleTypeADT.java:1464)
- waiting to lock <0x0000000721b6fc78> (a oracle.jdbc.driver.T4CConnection)
at oracle.sql.ArrayDescriptor.toBytes(ArrayDescriptor.java:654)
at oracle.sql.ARRAY.toBytes(ARRAY.java:681)
- locked <0x0000000721a85d90> (a oracle.jdbc.driver.T4CConnection)
at oracle.jdbc.driver.OraclePreparedStatement.setArrayCritical(OraclePreparedStatement.java:5874)
at oracle.jdbc.driver.OraclePreparedStatement.setARRAYInternal(OraclePreparedStatement.java:5837)
- locked <0x000000072b7de7a0> (a oracle.jdbc.driver.T4CConnection)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:8458)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:7991)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8735)
at oracle.jdbc.driver.OracleCallableStatement.setObject(OracleCallableStatement.java:4561)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObject(OraclePreparedStatementWrapper.java:219)
...
"tomcat-http-45":
at oracle.jdbc.oracore.OracleTypeADT.setConnection(OracleTypeADT.java:3047)
- waiting to lock <0x0000000721a85d90> (a oracle.jdbc.driver.T4CConnection)
at oracle.jdbc.oracore.OracleTypeUPT.setConnection(OracleTypeUPT.java:411)
at oracle.jdbc.oracore.OracleTypeCOLLECTION.setConnection(OracleTypeCOLLECTION.java:1108)
at oracle.jdbc.oracore.OracleTypeUPT.setConnection(OracleTypeUPT.java:411)
at oracle.jdbc.oracore.OracleTypeADT.setConnection(OracleTypeADT.java:3050)
- locked <0x0000000721b6fc78> (a oracle.jdbc.driver.T4CConnection)
at oracle.jdbc.oracore.OracleTypeUPT.setConnection(OracleTypeUPT.java:411)
at oracle.jdbc.oracore.OracleTypeCOLLECTION.setConnection(OracleTypeCOLLECTION.java:1108)
at oracle.sql.TypeDescriptor.setConnection(TypeDescriptor.java:1388)
at oracle.sql.ARRAY.<init>(ARRAY.java:131)
...

Found 1 deadlock.


Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.