IBM Support

IT18434: AMS INTERCEPTOR MAY DRIVE USER CALLBACK FUNCTION INCORRECTLY AFTER HANDLING INVALID MESSAGE

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

  • When using an asynchronous callback function with MQCB to
    consume an AMS protected message, and because of an error in
    processing the message it is moved to the AMS error queue or
    dead letter queue, the callback function is driven with invalid
    CallType.
    
    The results of this incorrect input to the user-supplied
    callback function will depend on the implementation of the
    callback function.
    
    An MQ trace of the issue shows:
    
    ----}! smqiGetAfter rc=Unknown(2) FunctionTime=10517
    ---} smqiCallbackBefore rc=OK FunctionTime=10590
    --} smqxCallbackBefore rc=OK FunctionTime=10598
    CallType 6 ConsumerState 0 cc=2 rc=2063
    
    If cc=2, then it is expected that the CallType should be 5
    (MQCBCT_EVENT_CALL), as a message is not being delivered to the
    callback function.
    

Local fix

  • This issue can be avoided within the application's logic by
    either:
    
    1. Modifying the application to use a synchronous MQGET call
    instead of MQCB.
    
    2. Modifying the callback function to check the CC in the
    callback context, and not attempt to act on the supplied message
    buffer if the CC is 2.
    
    
    Alternatively, ensure that messages placed on the AMS protected
    queues are well-formed, and adhere to the policy used when
    getting from the queue.
    

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of MQ Advanced Message Security (AMS)
    version 8.0.0.5 who are using an asynchronous consume callback
    to retrieve messages and the message is not consumable.  For
    example, the quality of protection present on the message is not
    sufficient for the quality of protection specified in the
    security policy for the queue.
    
    This also applies to locally-attached (bindings mode) JMS client
    applications making use of JMS message listeners, unless the JMS
    application or connection factory has been configured to run in
    migration mode.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When the MQ queue manager has a message available for delivery
    to a native asynchronous consumer, and the consumer's queue is
    AMS protected, the AMS interceptor will be invoked to unprotect
    the message before the consumer's registered callback function
    is driven by the queue manager.
    
    If the message cannot be unprotected, or is in contravention of
    the security policy defined on the queue, the interceptor will
    move it to the AMS error queue, or dead letter queue, based on
    the current configuration.
    
    In this case, it is expected that the consumer's callback
    function will be driven with a CallType of MQCBCT_EVENT_CALL,
    allowing the callback function to review the MQ completion code
    and reason code within the callback context, and decide how to
    proceed.
    
    A logic error within this code path, introduced in MQ 8.0.0.5,
    meant that the AMS interceptor failed to set the correct
    CallType for the asynchronous consumer. As a result, the
    consumer's callback function was incorrectly invoked with a
    CallType of MQCBCT_MSG_REMOVED. This implied that a message was
    available for the consumer, but this was not the case. A copy of
    the MQMD of the message was supplied to the callback function,
    but the message buffer was empty, as the message had been moved
    to the error or dead letter queue.
    

Problem conclusion

  • The MQ AMS interceptor code has been updated such that the
    asynchronous consumer's callback function is correctly invoked
    with a CallType of MQCBCT_EVENT_CALL when the message intended
    for the consumer was moved to the error or dead letter queue.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v8.0       8.0.0.6
    
    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

    IT18434

  • Reported component name

    WMQ BASE MULTIP

  • Reported component ID

    5724H7251

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-12-15

  • Closed date

    2017-01-25

  • Last modified date

    2017-03-10

  • 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 BASE MULTIP

  • Fixed component ID

    5724H7251

Applicable component levels

  • R800 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0.0.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
10 March 2017