日期:2014-05-16  浏览次数:20602 次

WebSphere 7.0的数据库连接死锁bug修正
现象是:无法取得数据库连接,但在WebSphere中显示的连接并未使用,在log中显示:
Waiting for Monitor Lock on java/util/Collections$SynchronizedSet.....

修正:
To enable the fix, set custom
property "useRRASetEquals" to true on the datasource."

support:

From reviewing the data I see the deadlock issue is a known issue resolved by setting property
useRRASetEquals to true resolves.

Threaddumps show:

1LKDEADLOCK Deadlock detected !!!
NULL ---------------------
NULL
2LKDEADLOCKTHR Thread "WebContainer : 22" (0x39950D00)
3LKDEADLOCKWTR is waiting for:
4LKDEADLOCKMON sys_mon_t:0x3A849E8C infl_mon_t: 0x3A849EC4:
4LKDEADLOCKOBJ java/util/Collections$SynchronizedSet@0x08E32868/0x08E32874:
3LKDEADLOCKOWN which is owned by:
2LKDEADLOCKTHR Thread "WebContainer : 20" (0x39618D00)
3LKDEADLOCKWTR which is waiting for:
4LKDEADLOCKMON sys_mon_t:0x359DD2B0 infl_mon_t: 0x359DD2E8:
4LKDEADLOCKOBJ java/util/Collections$SynchronizedSet@0x044307E8/0x044307F4:
3LKDEADLOCKOWN which is owned by:
2LKDEADLOCKTHR Thread "WebContainer : 22" (0x39950D00)
NULL
NULL ------------------------------------
Found in similar PMRs below setting resolves the issue and also the
APARs below:

"To enable the fix, set custom
property "useRRASetEquals" to true on the datasource."

Here is some more detailed instructions for setting this property. It
should be set on the datasource where the issue is occurring.:

To set the property:

Steps
========================================================================
1. In the Admin console, go to Resources > JDBC > JDBC providers >

2. Choose the JDBC provider you are using

3. Then click on Data sources >

4. To reach the custom properties
a. Click on the data source
b. Then click on the link to Custom properties
========================================================================

Values (when adding a new Custom Property)
========================================================================
Name: useRRASetEquals
Value: true
========================================================================
Click OK and then save

Below Apars relate to the issue. First found on z/os but are an issue
with WSAS 7.0 Solaris (and other distributed environments as well).
PMRS with same issue mention as well.

PK75897: THE SERVANT ABENDS CAUSED BY HUNG THREADS IN JDBC DRIVER
http://www-01.ibm.com/support/docview.wss?uid=swg1PK75897

PK69110: THE SERVANT ABENDS CAUSED BY HUNG THREADS IN JDBC DRIVER.
http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg1PK69110

If it doesn't help datasource is having the problem. If you want to run
WAS.j2c=all:RRA=all trace until the problem occurs, we could determine from that trace which datasource is
deadlocking:
http://www-01.ibm.com/support/docview.wss?uid=swg21254706