IBM Support

PI53867: ScheduledExecutorService can temporarily leak classloaders for c anceled tasks.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Liberty profile's ScheduledExecutorService implementation
    will keep canceled tasks on it's blocking queue for some
    time.  This is the default behavior for the JDK
    ScheduledExecutorService when using Java 6 (or when using
    Java 7+ but not invoking setRemoveOnCancelPolicy(true)).
    Note that WebSphere Application Server Liberty profile must
    support users on Java 6.
    
    
    
    Under this behavior, the blocking queue for the
    ScheduledExecutorService could continue holding a reference
    to the canceled task until its initially scheduled execution
    time.  In some cases, the task may hold a reference to a
    classloader that would otherwise be garbage collected.  This
    scenario is particularly visible when using the session
    manager.  The session manager uses the
    ScheduledExecutorService to schedule invalidation of
    sessions - usually this is a long timeout, like 30 minutes.
    If a session was started, and then the application was
    restarted, the session would be canceled when the
    application is stopping, but the actual task which contains
    a reference to the application's classloader would remain in
    the queue, leaking the old classloader for up to 30 minutes.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty Profile                      *
    ****************************************************************
    * PROBLEM DESCRIPTION: ScheduledExecutorService can            *
    *                      temporarily leak classloaders for       *
    *                      canceled tasks.                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Liberty' profiles ScheduledExecutorService implementation will
    keep canceled tasks on it's blocking queue for some time.  This
    is the default behavior for the JDK ScheduledExecutorService
    when using Java 6 (or when using Java 7+ but not invoking
    setRemoveOnCancelPolicy(true)).  Note that Liberty profile must
    support users on Java 6.
    
    Under this behavior, the blocking queue for the
    ScheduledExecutorService could continue holding a reference to
    the canceled task until it initially scheduled execution time.
    In some cases, the task may hold a reference to a classloader
    that would otherwise be garbage collected.  This scenario is
    particularly visible when using the session manager.  The
    session manager uses the ScheduledExecutorService to schedule
    invalidation of sessions - usually this is a long timeout, like
    30 minutes.  If a session was started, and then the application
    was restarted, the session would be canceled when the
    application is stopping, but the actual task which contains a
    reference to the application's classloader would remain in the
    queue, leaking the old classloader for up to 30 minutes.
    

Problem conclusion

  • The fix for this APAR removes tasks from the blocking queue once
    they are canceled or executed.
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 8.5.5.9.  Please refer to the Recommended Updates page for
    delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI53867

  • Reported component name

    WAS LIBERTY COR

  • Reported component ID

    5725L2900

  • Reported release

    855

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-12-09

  • Closed date

    2016-02-23

  • Last modified date

    2016-02-23

  • 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

    WAS LIBERTY COR

  • Fixed component ID

    5725L2900

Applicable component levels

  • R855 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Product":{"code":"SSD28V","label":"WebSphere Application Server Liberty Core"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"855","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
14 October 2021