IBM Support

PI92311: MEMORY LEAK IN LIBERTY SWAGGER LIBRARY DURING APPLICATION STOP/START

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Memory leak caused by application stop and start leads to
    high
    number of page frames retained by the Liberty Server (200 to
    300
    MB). Review of the heap dump shows many duplicate classes
    held
    by com/ibm/ws/classloading/internal/AppClassLoader.
    It appears that there is a class loader leak vector in the
    Swagger library, in which a persistent object (i.e. one that
    is
    present for the life of the server,across application
    instances)
    is holding references to application classes after the
    applications stop.  Since these classes necessarily
    reference
    their class loaders, the result is a leak of the application
    class loader on application restart.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  Users of IBM WebSphere Application Server   *
    *                  Liberty who use the features apidiscovery-  *
    *                  1.0 or openapi-3.0                          *
    ****************************************************************
    * PROBLEM DESCRIPTION: Memory leak when redeploying            *
    *                      applications which use JAXRS            *
    *                      annotations and the apidiscovery-1.0 or *
    *                      openapi-3.0 features                    *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The problem is that when redeploying a Java application in
    WebSphere Liberty, in some cases the old application classes are
    retained in a data structure and are never freed. After
    repeatedly redeploying applications a large amount of memory can
    be leaked.
    

Problem conclusion

  • The solution is to use weak references to the application
    classes in the server code so that they can be freed by the Java
    garbage collector when the application has been undeployed or
    redeployed.
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 18.0.0.1.  Please refer to the Recommended Updates page for
    delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

  • Restart the Java virtual machine after you undeploy the
    application to free the memory used by the application classes.
    

Comments

APAR Information

  • APAR number

    PI92311

  • Reported component name

    LIBERTY PROF -

  • Reported component ID

    5655W6514

  • Reported release

    CD0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2018-01-11

  • Closed date

    2018-01-16

  • Last modified date

    2018-01-16

  • 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

    LIBERTY PROF -

  • Fixed component ID

    5655W6514

Applicable component levels

  • RCD0 PSY

       UP

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Platform":[{"code":"PF054","label":"z Systems"}],"Version":"CD0","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
17 June 2020