IBM Support

IV70630: JMS HANG WHEN MESSAGECONSUMER AND MESSAGEPRODUCER ARE CREATED FROM SAME SESSION AND CLOSED SIMULTANEOUSLY ON TWO THREADS.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A JMS consumer application hangs and stops processing messages
    from the queue
    causing messages to accumulate on the queue. There are no
    errors in the logs. Stopping queue processing has no effect,
    and restarting does not work because the thread is still
    attached to the queue. The only resolution is to stop and
    restart the JMS application.
    

Local fix

  • Restart the JMS application.
    

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of the WebSphere MQ classes for JMS
    v7.0.1.12.
    
    This includes users of WebSphere Application Server which bundle
    the WebSphere MQ Resource Adapter v7.0.1.12.
    
    
    Platforms affected:
    MultiPlatform, AIX, HP-UX Itanium, HP-UX PA-RISC, IBM iSeries,
    Linux on Power, Linux on S390, Linux on x86, Linux on x86-64,
    Linux on zSeries, Solaris SPARC, Solaris x86-64, Windows, z/OS
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    APAR IV46878:
    
      http://www.ibm.com/support/docview.wss?uid=swg1IV46878
    
    introduced a code change to address a problem where a JMS
    application would hang in the case where:
    
    - an attempt was made to close a MessageConsumer but the
    connection to the queue manager had been disconnected, such that
    an MQRC 2009 'MQRC_CONNECTION_BROKEN' exception was thrown
    during the close request,
    
    and then subsequently
    
    - the application created a new MessageConsumer object (from the
    same JMS Session) and attempted to receive a message using it.
    
    The code change associated with that APAR introduced a new
    deadlock, which occurred when a request was made to close both a
    MessageProducer (or QueueSender, etc.) and a MessageConsumer (or
    QueueReceiver, etc.) simultaneously on two different threads.
    
    When this issue occurred, a Javacore would show two threads in
    the following Java stacktrace state:
    
    
    Thread 1: MessageProducer.close()
    ----------------------------------------------------------------
    ------
    com/ibm/msg/client/wmq/internal/WMQMessageProducer$SpiIdentified
    ProducerShadow.close(WMQMessageProducer.java:687(Compiled Code))
    com/ibm/msg/client/wmq/internal/WMQMessageProducer.close(WMQMess
    ageProducer.java:1147(Compiled Code))
    com/ibm/msg/client/jms/internal/JmsMessageProducerImpl.close(Jms
    MessageProducerImpl.java:205(Compiled Code))
    com/ibm/msg/client/jms/internal/JmsMessageProducerImpl.close(Jms
    MessageProducerImpl.java:165)
    com/ibm/mq/jms/MQQueueSender.close(MQQueueSender.java:87)
    ----------------------------------------------------------------
    ------
    
    
    Thread 2: MessageConsumer.close()
    ----------------------------------------------------------------
    ------
    java/lang/Object.wait(Native Method)
    java/lang/Object.wait(Object.java:167(Compiled Code))
    com/ibm/msg/client/commonservices/ReentrantMutex.acquire(Reentra
    ntMutex.java:136(Compiled Code))
       (entered lock:
    com/ibm/msg/client/commonservices/ReentrantMutex@0x0000000012018
    700, entry count: 2)
    com/ibm/msg/client/commonservices/ReentrantMutex.acquire(Reentra
    ntMutex.java:70(Compiled Code))
       (entered lock:
    com/ibm/msg/client/commonservices/ReentrantMutex@0x0000000012018
    700, entry count: 1)
    com/ibm/msg/client/wmq/internal/WMQConsumerShadow.close(WMQConsu
    merShadow.java:404(Compiled Code))
       (entered lock: java/lang/Object@0x0000000011DED090, entry
    count: 1)
    com/ibm/msg/client/wmq/internal/WMQMessageConsumer.close(WMQMess
    ageConsumer.java:389(Compiled Code))
    com/ibm/msg/client/jms/internal/JmsMessageConsumerImpl.close(Jms
    MessageConsumerImpl.java:326(Compiled Code))
    com/ibm/msg/client/jms/internal/JmsMessageConsumerImpl.close(Jms
    MessageConsumerImpl.java:190(Compiled Code))
    com/ibm/mq/jms/MQQueueReceiver.close(MQQueueReceiver.java:80(Com
    piled Code))
    ----------------------------------------------------------------
    ------
    
    
    
    This deadlock lasted indefinitely, meaning that the Java process
    must be killed in order to restart it and resume application
    operation.
    
    While APAR IV46878 was also included in WebSphere MQ 7.5.0.3 and
    7.1.0.5, the issue does not affect those releases. Only
    WebSphere MQ 7.0.1.12 is affected by by the issue.
    

Problem conclusion

  • The WebSphere MQ classes for JMS locking logic has been updated
    to revert to the code behaviour prior to WebSphere MQ 7.0.1.12,
    while maintaining the fix which APAR IV46878 was intended
    resolve.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v7.0       7.0.1.13
    
    The latest available maintenance can be obtained from
    'WebSphere MQ Recommended Fixes'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006037
    
    If the maintenance level is not yet available information on
    its planned availability can be found in 'WebSphere MQ
    Planned Maintenance Release Dates'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006309
    ---------------------------------------------------------------
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV70630

  • Reported component name

    WMQ LIN X86 V7

  • Reported component ID

    5724H7224

  • Reported release

    701

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-03-06

  • Closed date

    2015-03-30

  • Last modified date

    2016-04-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

    WMQ LIN X86 V7

  • Fixed component ID

    5724H7224

Applicable component levels

[{"Line of Business":{"code":"LOB36","label":"IBM Automation"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSFKSJ","label":"WebSphere MQ"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0.1"}]

Document Information

Modified date:
08 March 2021