IBM Support

PH27932: A RACE CONDITION TO CLOSE A TCP/IP SOCKET EXISTS WHICH COULD CAUSE TIME_WAIT STATUS ON THE SERVER

A fix is available

Subscribe

You can track all active APARs for this component.

 

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
    connections.
    This is equivalent APAR to distributed APAR IT27924.
    

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 AFFECTED: All users of IBM MQ for z/OS Version 9       *
    *                 Release 0 Modification 0, Release 1          *
    *                 Modification 0, and Release 2 Modification 0 *
    ****************************************************************
    * PROBLEM DESCRIPTION: A large number of channel connections   *
    *                      to a queue manager are left in a        *
    *                      TIME_WAIT state when disconnecting,     *
    *                      resulting in a potential shortage of    *
    *                      ephemeral ports.                        *
    ****************************************************************
    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

  • 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 changed behaviour will only be seen if the fix (or the
    distributed equivalent IT27924) is applied at both the sending
    and receiving end of a channel.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH27932

  • Reported component name

    IBM MQ Z/OS V9

  • Reported component ID

    5655MQ900

  • Reported release

    000

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-07-28

  • Closed date

    2020-09-22

  • Last modified date

    2020-11-02

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

    PH21216

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

    UI71693 UI71694 UI71695

Modules/Macros

  • CSQIRECP CSQMSTRT CSQXCCAX CSQXCCCX CSQXCCIT CSQXCCXD CSQXRMSS
    

Fix information

  • Fixed component name

    IBM MQ Z/OS V9

  • Fixed component ID

    5655MQ900

Applicable component levels

  • R000 PSY UI71693

       UP20/10/14 P F010

  • R100 PSY UI71695

       UP20/10/14 P F010

  • R200 PSY UI71694

       UP20/10/13 P F010

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.

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

Document Information

Modified date:
14 December 2020