PQ88471: Java level Deadlock found between two threads, both dealing with Connection Pooling

 Fixes are available

5.1.1.17: WebSphere Application Server V5.1.1 Cumulative Fix 17 for AIX
5.1.1.17: WebSphere Application Server V5.1.1 Cumulative Fix 17 for HP-UX
5.1.1.19: WebSphere Application Server V5.1.1 Cumulative Fix 19 for Linux
5.1.1.16: WebSphere Application Server V5.1.1 Cumulative Fix 16 for AIX
5.1.1.18: WebSphere Application Server V5.1.1 Cumulative Fix 18 for AIX
5.1.1.18: WebSphere Application Server V5.1.1 Cumulative Fix 18 for HP-UX
5.1.1.18: WebSphere Application Server V5.1.1 Cumulative Fix 18 for Solaris
5.1.1.18: WebSphere Application Server V5.1.1 Cumulative Fix 18 for Windows
5.1.1.18: WebSphere Application Server V5.1.1 Cumulative Fix 18 for Linux
5.1.1.17: WebSphere Application Server V5.1.1 Cumulative Fix 17 for Linux
5.1.1.17: WebSphere Application Server V5.1.1 Cumulative Fix 17 for Solaris
5.1.1.17: WebSphere Application Server V5.1.1 Cumulative Fix 17 for Windows
5.0.2.7: WebSphere Application Server Express 5.0.2 Cumulative Fix 7
5.1.0.5: WebSphere Application Server V5.1.0 Cumulative Fix 5
5.0.2.17: WebSphere Application Server 5.0.2 Cumulative Fix 17 for Solaris
5.0.2.17: WebSphere Application Server 5.0.2 Cumulative Fix 17 for Windows
5.0.2.14: WebSphere Application Server 5.0.2 Cumulative Fix 14 for Solaris
5.1.1.10: WebSphere Application Server V5.1.1 Cumulative Fix 10 for Windows
5.1.1.10: WebSphere Application Server V5.1.1 Cumulative Fix 10 for AIX
5.0.2.14: WebSphere Application Server 5.0.2 Cumulative Fix 14 for Linux
5.1.1.19: WebSphere Application Server V5.1.1 Cumulative Fix 19 for AIX
5.1.1.19: WebSphere Application Server V5.1.1 Cumulative Fix 19 for Windows
5.1.1.9: WebSphere Application Server V5.1.1 Cumulative Fix 9 for Solaris
5.0.2.15: WebSphere Application Server 5.0.2 Cumulative Fix 15 for Windows
5.0.2.15: WebSphere Application Server 5.0.2 Cumulative Fix 15 for Solaris
5.0.2.15: WebSphere Application Server 5.0.2 Cumulative Fix 15 for AIX
5.1.1.9: WebSphere Application Server V5.1.1 Cumulative Fix 9 for AIX
5.0.2.15: WebSphere Application Server 5.0.2 Cumulative Fix 15 for Linux
5.0.2.12: WebSphere Application Server 5.0.2 Cumulative Fix 12
5.0.2.14: WebSphere Application Server 5.0.2 Cumulative Fix 14 for HP-UX
5.0.2.14: WebSphere Application Server 5.0.2 Cumulative Fix 14 for AIX
5.1.1.9: WebSphere Application Server V5.1.1 Cumulative Fix 9 for Windows
5.0.2.17: WebSphere Application Server 5.0.2 Cumulative Fix 17 for HP-UX
5.0.2.17: WebSphere Application Server 5.0.2 Cumulative Fix 17 for AIX
5.1.1.11: WebSphere Application Server V5.1.1 Cumulative Fix 11 for AIX
5.0.2.17: WebSphere Application Server 5.0.2 Cumulative Fix 17 for Linux
5.1.1.10: WebSphere Application Server V5.1.1 Cumulative Fix 10 for HP-UX
5.1.1.10: WebSphere Application Server V5.1.1 Cumulative Fix 10 for Linux
5.1.1.9: WebSphere Application Server V5.1.1 Cumulative Fix 9 for HP-UX
5.1.1.9: WebSphere Application Server V5.1.1 Cumulative Fix 9 for Linux
5.0.2.16: WebSphere Application Server 5.0.2 Cumulative Fix 16 for HP-UX
5.1.1.12: WebSphere Application Server V5.1.1 Cumulative Fix 12 for Windows
5.0.2.16: WebSphere Application Server 5.0.2 Cumulative Fix 16 for Solaris
5.0.2.8: WebSphere Application Server V5.0.2 Cumulative Fix 8
5.0.2.16: WebSphere Application Server 5.0.2 Cumulative Fix 16 for Windows
5.0.2.16: WebSphere Application Server 5.0.2 Cumulative Fix 16 for AIX
5.1.1.11: WebSphere Application Server V5.1.1 Cumulative Fix 11 for Windows
5.1.1.16: WebSphere Application Server V5.1.1 Cumulative Fix 16 for Solaris
5.0.2.18: WebSphere Application Server 5.0.2 Cumulative Fix 18 for Solaris
5.1.1.11: WebSphere Application Server V5.1.1 Cumulative Fix 11 for Linux
5.0.2.18: WebSphere Application Server 5.0.2 Cumulative Fix 18 for Windows
5.0.2.18: WebSphere Application Server 5.0.2 Cumulative Fix 18 for HP-UX
5.0.2.18: WebSphere Application Server 5.0.2 Cumulative Fix 18 for AIX
5.1.1.16: WebSphere Application Server V5.1.1 Cumulative Fix 16 for Windows
5.1.1.14: WebSphere Application Server V5.1.1 Cumulative Fix 14 for Solaris
5.0.2.14: WebSphere Application Server 5.0.2 Cumulative Fix 14 for Windows
5.1.1.12: WebSphere Application Server V5.1.1 Cumulative Fix 12 for AIX
5.1.1.12: WebSphere Application Server V5.1.1 Cumulative Fix 12 for Linux
5.1.1.12: WebSphere Application Server V5.1.1 Cumulative Fix 12 for HP-UX
5.1.1.12: WebSphere Application Server V5.1.1 Cumulative Fix 12 for Solaris
5.1.1.11: WebSphere Application Server V5.1.1 Cumulative Fix 11 for Solaris
5.1.1.13: WebSphere Application Server V5.1.1 Cumulative Fix 13 for AIX
5.1.1.13: WebSphere Application Server V5.1.1 Cumulative Fix 13 for Windows
5.0.2.13: WebSphere Application Server 5.0.2 Cumulative Fix 13
5.1.1.13: WebSphere Application Server V5.1.1 Cumulative Fix 13 for HP-UX
5.1.1.15: WebSphere Application Server V5.1.1 Cumulative Fix 15 for Solaris
5.1.1.13: WebSphere Application Server V5.1.1 Cumulative Fix 13 for Solaris
5.1.1.13: WebSphere Application Server V5.1.1 Cumulative Fix 13 for Linux
5.1.1.14: WebSphere Application Server V5.1.1 Cumulative Fix 14 for AIX
5.1.1.14: WebSphere Application Server V5.1.1 Cumulative Fix 14 for Linux
5.1.1.14: WebSphere Application Server V5.1.1 Cumulative Fix 14 for Windows
5.1.1.15: WebSphere Application Server V5.1.1 Cumulative Fix 15 for Windows
5.1.1: WebSphere Application Server Version 5.1 Fix Pack 1 (Version 5.1.1)
5.0.2.18: WebSphere Application Server 5.0.2 Cumulative Fix 18 for Linux
5.1.1.11: WebSphere Application Server V5.1.1 Cumulative Fix 11 for HP-UX
5.1.1.14: WebSphere Application Server V5.1.1 Cumulative Fix 14 for HP-UX
5.0.2.15: WebSphere Application Server 5.0.2 Cumulative Fix 15 for HP-UX
5.0.2.16: WebSphere Application Server 5.0.2 Cumulative Fix 16 for Linux
5.1.1.10: WebSphere Application Server V5.1.1 Cumulative Fix 10 for Solaris
5.1.1.15: WebSphere Application Server V5.1.1 Cumulative Fix 15 for AIX
5.1.1.15: WebSphere Application Server V5.1.1 Cumulative Fix 15 for HP-UX
5.1.1.16: WebSphere Application Server V5.1.1 Cumulative Fix 16 for HP-UX
5.1.1.16: WebSphere Application Server V5.1.1 Cumulative Fix 16 for Linux
5.1.1.15: WebSphere Application Server V5.1.1 Cumulative Fix 15 for Linux
5.1.1.19: WebSphere Application Server V5.1.1 Cumulative Fix 19 for HP-UX



APAR status
Closed as program error.

Error description
WAS v5.0.2 on SUN Solaris 8

Customer ran the Stress test for 6-8 hrs with a large volume of
users. Then their AppServer crashed. The thread dump shows a
deadlock between two threads, one was waiting for a connection
from the free pool, and the other was returning a connection to
the free pool. This deadlock did not show up in every thread
dump customer had taken after evry AppServer hang or crash
before. The part of the stack, taken
from the thread dump, of two deadlocked threads are given below:
FOUND A JAVA LEVEL DEADLOCK:
----------------------------
"Servlet.Engine.Transports : 17":
  waiting to lock monitor 0x3556328 (object 0xc0bf4c48, a
java.lang.Object),
  which is locked by "Servlet.Engine.Transports : 83"
"Servlet.Engine.Transports : 83":
  waiting to lock monitor 0x1602f10 (object 0xc0bfde50, a
java.lang.Object),
  which is locked by "Servlet.Engine.Transports : 17"

JAVA STACK INFORMATION FOR THREADS LISTED ABOVE:
------------------------------------------------
Java Stack for "Servlet.Engine.Transports : 17":
==========
 at
com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(F
reePool.java:1088)
 at
com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java
:1505)
 at
com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionMa
nager.java:658)
 at
com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionM
anager.java:446)
 at
com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcD
ataSource.java:215)
 at
com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcD
ataSource.java:190).................

Java Stack for "Servlet.Engine.Transports : 83":
==========
 at
com.ibm.ejs.j2c.poolmanager.FreePool.returnToFreePool(FreePool.j
ava:358)
 at
com.ibm.ejs.j2c.poolmanager.PoolManager.release(PoolManager.java
:1209)
 at
com.ibm.ejs.j2c.MCWrapper.releaseToPoolManager(MCWrapper.java:16
55)
 at
com.ibm.ejs.j2c.LocalTransactionWrapper.afterCompletionCode(Loca
lTransactionWrapper.java:1086)
Local fix Problem summary
****************************************************************
* USERS AFFECTED: WebSphere Application Server users of JCA,   *
*                 JDBC, and JMS Connections.                   *
****************************************************************
* PROBLEM DESCRIPTION: This fixes a deadlock in the            *
*                      ConnectionPool, during some exception   *
*                      processing.                             *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
A deadlock can occur when an exception occurs while creating a
new connection, if another thread is releasing a connection to
the pool.

The java cores will look something like this :
FOUND A JAVA LEVEL DEADLOCK:
----------------------------
"Servlet.Engine.Transports : 17":
  waiting to lock monitor 0x3556328 (object 0xc0bf4c48,
     a java.lang.Object),
  which is locked by "Servlet.Engine.Transports : 83"
"Servlet.Engine.Transports : 83":
  waiting to lock monitor 0x1602f10 (object 0xc0bfde50,
     a java.lang.Object),
  which is locked by "Servlet.Engine.Transports : 17"

JAVA STACK INFORMATION FOR THREADS LISTED ABOVE:
------------------------------------------------
Java Stack for "Servlet.Engine.Transports : 17":
==========
 at com.ibm.ejs.j2c.poolmanager.FreePool.
          createOrWaitForConnection(FreePool.java:1088)
 at com.ibm.ejs.j2c.poolmanager.PoolManager.
          reserve(PoolManager.java:1505)
. . . .

Java Stack for "Servlet.Engine.Transports : 83":
==========
 at com.ibm.ejs.j2c.poolmanager.FreePool.
          returnToFreePool(FreePool.java:358)
 at com.ibm.ejs.j2c.poolmanager.PoolManager.
          release(PoolManager.java:1209)
. . .  .
Problem conclusion
Moved synchronization point to outside of
createOrWaitForConneciton.
Temporary fix Comments
APAR information
APAR number PQ88471
Reported component name WAS BASE 5.0
Reported component ID 5630A3600
Reported release 00S
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Special Attention NoSpecatt
Submitted date 2004-05-05
Closed date 2004-05-17
Last modified date 2004-05-17

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:
PK26206

Modules/Macros
J2C          

Publications Referenced

Fix information

Applicable component levels
R003 PSY    UP
R00A PSY    UP
R00H PSY    UP
R00I PSY    UP
R00P PSY    UP
R00S PSY    UP
R00W PSY    UP
R103 PSY    UP
R10A PSY    UP
R10H PSY    UP
R10I PSY    UP
R10P PSY    UP
R10S PSY    UP
R10W PSY    UP


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > General
Operating system(s):
Software version: 00S
Software edition:
Reference #: PQ88471
IBM Group: Software Group
Modified date: May 17, 2004