OC4J Inactivity-Timeout Datasource Parameter Causes Deadlocks With JDBC Threads (Doc ID 1913545.1)

Last updated on AUGUST 03, 2016

Applies to:

JDBC - Version 10.2.0 to 11.2.0.4.0
Oracle Containers for J2EE - Version 10.1.3.0.0 to 10.1.3.5.0 [Release AS10gR3]
Information in this document applies to any platform.

Symptoms

Oracle Container for J2EE (OC4J) deployed applications can hang on JDBC database access.

Typical thread dump output shows that multiple application threads are waiting on a single JDBC thread, and that this thread is part of the OC4J inactivity timeout processing.

Threads which are typical of this problem look like this:

"Thread-16" daemon prio=1 tid=0x00002b82f0004010 nid=0x43e7 runnable [0x00002b82f6575000..0x00002b82f6575d90]
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:129)
	at oracle.net.ns.Packet.receive(Packet.java:308)
	at oracle.net.ns.DataPacket.receive(DataPacket.java:106)
	at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:324)
	at oracle.net.ns.NetInputStream.read(NetInputStream.java:268)
	at oracle.net.ns.NetInputStream.read(NetInputStream.java:190)
	at oracle.net.ns.NetInputStream.read(NetInputStream.java:107)
	at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124)
	at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80)
	at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137)
	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:350)
	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227)
	at oracle.jdbc.driver.T4C7Ocommoncall.doOLOGOFF(T4C7Ocommoncall.java:61)
	at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:574)
	- locked <0x00002b82454ce070> (a oracle.jdbc.driver.T4CConnection)
	at oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:3995)
	- locked <0x00002b82454ce070> (a oracle.jdbc.driver.T4CConnection)
	at oracle.jdbc.pool.OraclePooledConnection.close(OraclePooledConnection.java:252)
	- locked <0x00002b82454c3130> (a oracle.jdbc.driver.T4CXAConnection)
	at oracle.jdbc.pool.OracleImplicitConnectionCache.actualPooledConnectionClose(OracleImplicitConnectionCache.java:2928)
	at oracle.jdbc.pool.OracleImplicitConnectionCache.closeAndRemovePooledConnection(OracleImplicitConnectionCache.java:2858)
	- locked <0x00002b8225d031c0> (a oracle.jdbc.pool.OracleImplicitConnectionCache)
	at oracle.jdbc.pool.OracleImplicitConnectionCache.processInactivityTimeout(OracleImplicitConnectionCache.java:3079)
	at oracle.jdbc.pool.OracleImplicitConnectionCache.performPooledConnectionTask(OracleImplicitConnectionCache.java:1275)
	at oracle.jdbc.pool.OracleImplicitConnectionCache.doForEveryCachedConnection(OracleImplicitConnectionCache.java:1116)
	- locked <0x00002b8225d031c0> (a oracle.jdbc.pool.OracleImplicitConnectionCache)
	at oracle.jdbc.pool.OracleImplicitConnectionCacheThread.runInactivityTimeout(OracleImplicitConnectionCacheThread.java:182)
	at oracle.jdbc.pool.OracleImplicitConnectionCacheThread.run(OracleImplicitConnectionCacheThread.java:76)


If you see many other threads all waiting on resources locked by a thread similar to the one above, you are likely to be hitting this problem.

This issue has been seen with JDBC versions up to, and including 11.2.0.4.

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