IBM Support

PH33941: DEADLOCK ISSUE WHEN CLOSE JMS CONNECTION.

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • deadlock issue when close JMS connection.
    Deadlock detected
    !!!
    
     ---------------------
    
    
    
     Thread "WebContainer : 5"
    (0x0000000005D73B00)
    
     is waiting for:
    
    
    sys_mon_t:0x000003FF61459738 infl_mon_t: 0x000003FF614597B8:
    
    
    java/lang/String@0x000000003621DF10
    
     which is owned by:
    
    
    Thread "Finalizer thread" (0x0000000004127800)
    
     which is
    waiting for:
    
     java/util/concurrent/locks/ReentrantReadWriteLock
    $NonfairSync@0x00000000361EE470
    
     which is owned by:
    
     Thread
    "WebContainer : 5" (0x0000000005D73B00)
     "Finalizer thread"
    J9VMThread:0x0000000004127800, omrthread_t:0x000003FF40649C48,
    java/lang/Thread:0x0000000010EBD810, state:P, prio=5
    
    (java/lang/Thread getId:0x20, isDaemon:true)
     (native thread
    ID:0xF72, native priority:0x5, native policy:UNKNOWN,
    vmstate:P, vm thread flags:0x00020081)
     (native stack address
    range from:0x000003FF80840000, to:0x000003FF80880000,
    size:0x40000)
     CPU usage total: 1.644379266 secs, current
    category="Application"
     Parked on: java/util/concurrent/locks/Re
    entrantReadWriteLock$NonfairSync@0x00000000361EE470 Owned by:
    "WebContainer : 5" (J9VMThread:0x0000000005D73B00,
    java/lang/Thread:0x000000001C525678)
     Heap bytes allocated
    since last GC cycle=0 (0x0)
     Java callstack:
     at
    sun/misc/Unsafe.park(Native Method)
     at java/util/concurrent/loc
    ks/LockSupport.park(LockSupport.java:186(Compiled Code))
     at jav
    a/util/concurrent/locks/AbstractQueuedSynchronizer.parkAndCheckI
    nterrupt(AbstractQueuedSynchronizer.java:847(Compiled Code))
    
    at java/util/concurrent/locks/AbstractQueuedSynchronizer.acquire
    Queued(AbstractQueuedSynchronizer.java:881(Compiled Code))
     at j
    ava/util/concurrent/locks/AbstractQueuedSynchronizer.acquire(Abs
    tractQueuedSynchronizer.java:1210(Compiled Code))
     at java/util/
    concurrent/locks/ReentrantReadWriteLock$WriteLock.lock(Reentrant
    ReadWriteLock.java:954(Compiled Code))
     at
    com/ibm/ejs/j2c/HandleList.remove(HandleList.java:146)
     at com/i
    bm/ejs/j2c/ConnectionHandleManager.removeHandle(ConnectionHandle
    Manager.java:142)
     at com/ibm/ejs/j2c/ServerFunction.removeHandl
    e(ServerFunction.java:1648)
     at com/ibm/ejs/j2c/ConnectionEventL
    istener.connectionClosed(ConnectionEventListener.java:337(Compil
    ed Code))
     at com/ibm/ejs/jms/JMSManagedConnection.handleClosed(
    JMSManagedConnection.java:1694(Compiled Code))
     at com/ibm/ejs/j
    ms/JMSConnectionHandle.close(JMSConnectionHandle.java:613(Compil
    ed Code))
    
     "WebContainer : 5" J9VMThread:0x0000000005D73B00,
    omrthread_t:0x000003FF94D785F0,
    java/lang/Thread:0x000000001C525678, state:B, prio=5
    
    (java/lang/Thread getId:0x12A, isDaemon:true)
     (native thread
    ID:0x1BD9, native priority:0x5, native policy:UNKNOWN,
    vmstate:B, vm thread flags:0x00000281)
     (native stack address
    range from:0x000003FF3B8C0000, to:0x000003FF3B900000,
    size:0x40000)
     CPU usage total: 84.694158803 secs, current
    category="Application"
     Blocked on:
    java/lang/String@0x000000003621DF10 Owned by: "Finalizer
    thread" (J9VMThread:0x0000000004127800,
    java/lang/Thread:0x0000000010EBD810)
     Heap bytes allocated
    since last GC cycle=0 (0x0)
     Java callstack:
     at com/ibm/ejs/jms
    
    /JMSConnectionHandle.close(JMSConnectionHandle.java:563(Compiled
    Code))
     at
    com/ibm/ejs/j2c/HandleList.close(HandleList.java:230(Compiled
    Code))
     at com/ibm/ws/webcontainer/collaborator/ConnectionHandle
    Collaborator.postInvoke(ConnectionHandleCollaborator.java:125(Co
    mpiled Code))
    

Local fix

  • This deadlock behavior could be avoided if the application was
    closing connections or not having any connection work in a
    finalize method. This would help prevent the multi threaded
    access to connection object.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server using JMS connections                *
    ****************************************************************
    * PROBLEM DESCRIPTION: Dead locks can occur while using JMS    *
    *                      connections.                            *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The following two threads stack,
    Java callstack:
    at com/ibm/ejs/jms
    /JMSConnectionHandle.close(JMSConnectionHandle.java:563(Compiled
    Code))
    at
    com/ibm/ejs/j2c/HandleList.close(HandleList.java:230(Compiled
    Code))
    at com/ibm/ws/webcontainer/collaborator/ConnectionHandle
    Collaborator.postInvoke(ConnectionHandleCollaborator.java:125(Co
    mpiled Code))
    and
    Java callstack:
    at
    sun/misc/Unsafe.park(Native Method)
    at java/util/concurrent/loc
    ks/LockSupport.park(LockSupport.java:186(Compiled Code))
    at jav
    a/util/concurrent/locks/AbstractQueuedSynchronizer.parkAndCheckI
    nterrupt(AbstractQueuedSynchronizer.java:847(Compiled Code))
    at
    java/util/concurrent/locks/AbstractQueuedSynchronizer.acquire
    Queued(AbstractQueuedSynchronizer.java:881(Compiled Code))
    at j
    ava/util/concurrent/locks/AbstractQueuedSynchronizer.acquire(Abs
    tractQueuedSynchronizer.java:1210(Compiled Code))
    at java/util/
    concurrent/locks/ReentrantReadWriteLock$WriteLock.lock(Reentrant
    ReadWriteLock.java:954(Compiled Code))
    at
    com/ibm/ejs/j2c/HandleList.remove(HandleList.java:146)
    at com/i
    bm/ejs/j2c/ConnectionHandleManager.removeHandle(ConnectionHandle
    Manager.java:142)
    can cause multithreads access to occur resulting in a deadlock.
    

Problem conclusion

  • Code has been added to avoid the dead lock when closing
    connections in the container and application at the same time
    on two different threads.
    
    The fix for this APAR is targeted for inclusion in fix pack
    8.5.5.20 and 9.0.5.8. For more information, see 'Recommended
    Updates for WebSphere Application Server':
    https://www.ibm.com/support/pages/node/715553
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH33941

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-01-29

  • Closed date

    2021-06-01

  • Last modified date

    2021-06-01

  • APAR is sysrouted FROM one or more of the following:

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

Fix information

  • Fixed component name

    WEBS APP SERV N

  • Fixed component ID

    5724H8800

Applicable component levels

  • R850 PSY

       UP

  • R900 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.5","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
02 November 2021