IBM Support

IV57472: WMQ 7.1 AMQ9504 PROTOCOL ERROR RECEIVED AT THE QMGR AND AMQ9213 AT THE CLIENT WHEN A JMS SESSION IS SHARED BY MULTIPLE THREADS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The queue manager reports an AMQ9504 protocol error when a JMS
    QueueSession
    is shared between multiple threads.
    From one thread an MQDISC call arrives at the queue manager
    and ends the conversation while at approximately the same time
    that JMS QueueSession is used to send an internal spiNotify
    call request on another QueueReceiver from a different thread.
    AMQ9213 is returned by the JMS Client.
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of:
    
    - The WebSphere MQ V7.1 classes for JMS.
    - The WebSphere MQ V7.1 resource adapter.
    - The WebSphere MQ V7.5 classes for JMS.
    - The WebSphere MQ V7.5 resource adapter.
    - The WebSphere Application Server V8.5 WebSphere MQ messaging
    provider.
    
    who have multi-threaded applications that connect to a WebSphere
    MQ queue manager using WebSphere MQ messaging provider normal
    mode using the CLIENT transport and:
    
    - Create a JMS Session, and a JMS MessageConsumer from the JMS
    Session, on one thread.
    - Close the JMS Session from a different thread to the one that
    is using it.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When an application creates a JMS session, a connection handle
    (hconn) is assigned to the JMS session and is used whenever the
    JMS session communicates with the queue manager. If a WebSphere
    MQ API call needs to be sent to the queue manager, the WebSphere
    MQ classes for JMS obtain a Call Lock on the connection handle,
    issue the call and then release the Call Lock. The use of the
    Call Lock prevents multiple WebSphere MQ API calls being made on
    the same connection handle at the same time.
    
    This means that when a JMS session is closed, the WebSphere MQ
    classes for JMS will:
    
    - Get the Call Lock for the connection handle associated with
    the JMS Session.
    - Flow an MQDISC call to the queue manager using the connection
    handle.
    - When the MQDISC call completes, release the Call Lock.
    
    While the MQDISC processing is taking place, no other WebSphere
    MQ API calls can be made on the connection handle.
    
    When a JMS MessageConsumer is created by an application which is
    connecting to a queue manager using WebSphere MQ messaging
    provider normal mode, the WebSphere MQ classes for JMS will:
    
    - Register a callback on the queue that the MessageConsumer has
    been asked to monitor, using the WebSphere MQ API MQCB.
    - Flow an internal notify WebSphere MQ call to the queue
    manager, telling it to start sending it messages.
    
    When the JMS MessageConsimer is closed, the WebSphere MQ classes
    for JMS will flow another notify call to the queue manager,
    telling it to stop sending messages. In order to flow the notify
    calls when either a MessageConsumer is created or closed, the
    WebSphere MQ classes for JMS obtain an internal Notify Lock on
    the connection handle for the JMS session that the
    MessageConsumer was created from. The Notify Lock is released
    when the notify call completes.
    
    
    If one thread within an application was trying to close a JMS
    session at the same time as another thread was trying to close a
    MessageConsumer created from that JMS session, the following
    behaviour occurred:
    
    - Thread 1 called Session.close().
    - Thread 2 called MessageConsumer.close().
    - Thread 1 got the Call Lock for the connection handle
    associated with the JMS Session.
    - Thread 2 got the Notify Lock for the connection handle
    associated with the JMS Session.
    - Thread 1 flowed an MQDISC down to the queue manager.
    - The queue manger processed the MQDISC call, disconnected the
    connection handle and sent back a reply to the WebSphere MQ
    classes for JMS.
    - Thread 1 processed the MQDISC reply.
    - Thread 2 flowed an internal notify call to the queue manager.
    - Thread 1 released the Call Lock.
    - The queue manager processed the notify call, and reported an
    AMQ9504 error as the connection handle that the notify call was
    made on had just been disconnected.
    

Problem conclusion

  • The WebSphere MQ classes for JMS have been updated to ensure
    that both the Call Lock and the Notify Lock are held when an
    MQDISC call needs to be made. This means that:
    
    - If a notify call is being made on a connection handle when
    another thread tries to flow MQDISC call to the queue manager to
    close a JMS session, the MQDISC call needs to wait for the
    notify to complete before it can be flowed to the queue manager.
    - If an MQDISC call is in progress when another thread tries to
    call notify, the notify flow will not be sent to the queue
    manager.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v7.1       7.1.0.6
    v7.5       7.5.0.5
    
    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

    IV57472

  • Reported component name

    WMQ LIN X86 V7

  • Reported component ID

    5724H7224

  • Reported release

    710

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-03-27

  • Closed date

    2014-05-13

  • Last modified date

    2014-05-13

  • 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

  • R710 PSY

       UP

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

Document Information

Modified date:
28 April 2022