IBM Support

IT27924: A race condition to close a TCP/IP socket exists which could cause TIME_WAIT status on the server

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

  • A race condition exists between IBM MQ clients and queue manager
    when closing down a TCP/IP network connection.
    The network resource at the end which issues the close first
    enters a TIME_WAIT state for a period of time in which delayed
    TCP packets will be discarded. If the queue manager side is the
    first to close the network resource across many connections
    within a short period of time, this state could eventually lead
    to a shortage of available ephemeral ports to accept new

Local fix

  • Clients using SHARECNV(0) have a greater chance of the client
    closing the network connection first and so a TIME_WAIT on the
    server is usually avoided, but can't be guaranteed.

Problem summary

  • ****************************************************************
    Users of MQ TCP/IP client connections are affected.
    Platforms affected:
    A race condition exists when sending and receiving the final MQ
    protocol flows to indicate the end of a TCP/IP connection. The
    first side of a channel that closes the network connection will
    cause the ephemeral port that was used for the connection to
    enter a TIME_WAIT state for a short period of time to prevent
    its reuse. The duration of the TIME_WAIT state is relative to
    the maximum segment lifetime, this is to prevent delayed TCP
    packets from interfering with a new conversation reusing the
    same destination port.
    As a port in the TIME_WAIT state may be unavailable for reuse
    for a few minutes, it is desirable for MQ clients to be the side
    of the connection to close the network resources, this is so
    that the the range of ephemeral ports available for new
    connections is not diminished on the network interface being
    used by the queue manager.

Problem conclusion

  • Multiplexed Java/JMS, .NET and native clients have been altered
    to close network resources immediately after sending the
    protocol flow to the queue manager to close the last connection.
    Responding message channel agents (MCAs) have been modified to
    wait briefly for the connection to be closed by the other end of
    the channel when it is deemed appropriate to do so. Under normal
    circumstances these changes cause TCP/IP TIME_WAIT state to
    occur on the initiating end of the channel.
    The fix is targeted for delivery in the following PTFs:
    Version    Maintenance Level
    v9.0 LTS
    v9.1 CD    9.1.3
    v9.1 LTS
    The latest available maintenance can be obtained from
    'WebSphere MQ Recommended Fixes'
    If the maintenance level is not yet available information on
    its planned availability can be found in 'WebSphere MQ
    Planned Maintenance Release Dates'

Temporary fix


APAR Information

  • APAR number


  • Reported component name


  • Reported component ID


  • Reported release


  • Status


  • PE




  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date


  • Closed date


  • Last modified date


  • 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


  • Fixed component ID


Applicable component levels

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

Document Information

Modified date:
08 July 2019