IBM Support

PH28458: JAXRSCLIENTIMPL MEM LEAK RELATED TO HASHSET

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

  • The com.ibm.ws.jaxrs.2.0.client.JAXRSClientImpl is using
    HashSet<WebClient> for baseClients member variable. These are
    freed only when the whole JAXRSClientImpl is closed using the
    close() method.
    
    This may lead to a memory leak like this:
    |-
    589,666,752 (62.42%) [40] 5
    com/ibm/ws/jaxrs20/client/JAXRSClientImpl
     |- 588,912,080
    (62.34%) [16] 1 java/util/HashSet 0xc86b58a8
     |- 588,912,064
    (62.34%) [40] 1 java/util/HashMap 0xc86b5b28
     |- 588,912,024
    (62.34%) [131,072] 12,208 array of java/util/HashMap$Node
     |-
    1,412,368 (0.15%) [24] 3 java/util/HashMap$Node 0xd5fbd5a0
     |-
    191,944 (0.02%) [24] 3 java/util/HashMap$Node 0xd7f5d860
     |-
    191,888 (0.02%) [24] 3 java/util/HashMap$Node 0xd3b76d50
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of JAXRS application on IBM       *
    *                  WebSphere Application Server                *
    ****************************************************************
    * PROBLEM DESCRIPTION: A memory leak may occur in              *
    *                      com.ibm.ws.jaxrs.2.0.client.JAXRSClient *
    *                      Impl may occur for JAXRS applications.  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The JAXRSClientImpl instance (created when a Client instance
    is created) holds a reference to a WebClient object that is
    part of the WebTarget for every root-level WebTarget created by
    that client. The WebClient is only stored so that it can be
    closed appropriately when the Client is closed.  This can
    cause a memory leak since it is a hard reference.
    

Problem conclusion

  • Switched the code in com.ibm.ws.jaxrs.2.0.client.JAXRSClient
    Impl to use a WeakHashMap instead so the references will be
    cleaned up and the memory leak avoided.
    
    The fix for this APAR is targeted for inclusion in fix pack
    9.0.5.6. For more information, see 'Recommended Updates for
    WebSphere Application Server':
    https://www.ibm.com/support/pages/node/715553
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH28458

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    900

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-08-13

  • Closed date

    2020-09-08

  • Last modified date

    2020-09-08

  • 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

    WEBS APP SERV N

  • Fixed component ID

    5724H8800

Applicable component levels

[{"Line of Business":{"code":"LOB36","label":"IBM Automation"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"900"}]

Document Information

Modified date:
14 September 2020