IBM Support

PI62609: When coreThreads and maxThreads are the same value, CWWKE1200W m essages, which indicate a hung thread, may appear erroneously

Fixes are available

16.0.0.3: WebSphere Application Server Liberty 16.0.0.3
16.0.0.4: WebSphere Application Server Liberty 16.0.0.4
17.0.0.1: WebSphere Application Server Liberty 17.0.0.1
17.0.0.2: WebSphere Application Server Liberty 17.0.0.2
17.0.0.3: WebSphere Application Server Liberty 17.0.0.3
17.0.0.4: WebSphere Application Server Liberty 17.0.0.4
18.0.0.1: WebSphere Application Server Liberty 18.0.0.1
18.0.0.2: WebSphere Application Server Liberty 18.0.0.2
18.0.0.3: WebSphere Application Server Liberty 18.0.0.3
18.0.0.4: WebSphere Application Server Liberty 18.0.0.4
19.0.0.1: WebSphere Application Server Liberty 19.0.0.1
19.0.0.2: WebSphere Application Server Liberty 19.0.0.2
19.0.0.3: WebSphere Application Server Liberty 19.0.0.3
19.0.0.4: WebSphere Application Server Liberty 19.0.0.4
19.0.0.5: WebSphere Application Server Liberty 19.0.0.5
19.0.0.6: WebSphere Application Server Liberty 19.0.0.6
19.0.0.7: WebSphere Application Server Liberty 19.0.0.7
19.0.0.8: WebSphere Application Server Liberty 19.0.0.8
19.0.0.9: WebSphere Application Server Liberty 19.0.0.9
19.0.0.10: WebSphere Application Server Liberty 19.0.0.10
19.0.0.11: WebSphere Application Server Liberty 19.0.0.11
19.0.0.12: WebSphere Application Server Liberty 19.0.0.12
20.0.0.1: WebSphere Application Server Liberty 20.0.0.1
20.0.0.2: WebSphere Application Server Liberty 20.0.0.2
20.0.0.3: WebSphere Application Server Liberty 20.0.0.3
20.0.0.4: WebSphere Application Server Liberty 20.0.0.4
20.0.0.5: WebSphere Application Server Liberty 20.0.0.5
20.0.0.6: WebSphere Application Server Liberty 20.0.0.6
20.0.0.7: WebSphere Application Server Liberty 20.0.0.7
20.0.0.8: WebSphere Application Server Liberty 20.0.0.8
20.0.0.9: WebSphere Application Server Liberty 20.0.0.9
20.0.0.10: WebSphere Application Server Liberty 20.0.0.10
20.0.0.11: WebSphere Application Server Liberty 20.0.0.11
20.0.0.12: WebSphere Application Server Liberty 20.0.0.12

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When checking to see if a thread is possibly hung in
    WebSphere
    Liberty, several conditions are checked, including if the
    number of threads is set to the max size of the pool, and
    when
    coreThreads and maxThreads are configured to be equal, this
    condition is always satisfied, triggering the CWWKE1200W
    messages.
    
    While there may be a small timing window that this condition
    won't occur, it may still result in the message due to other
    conditions for flagging hung threads.
     
    

Local fix

  • Setting the attributes coreThreads and maxThreads to different
    values inside the <executor> tag in the server.xml works around
    the issue.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty                              *
    ****************************************************************
    * PROBLEM DESCRIPTION: CWWKE1200W Hung thread message is       *
    *                      logged when the thread pool is idle.    *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    In situations where the coreThreads and maxThreads setting on
    the executor element are the same (or very close), the server
    may log warning messages such as the following when the thread
    pool is not actually hung or deadlocked:
    [5/2/16 10:40:26:448 CDT] 00000019
    com.ibm.ws.threading.internal.ThreadPoolController           W
    CWWKE1200W:  All threads in the Liberty default executor appear
    to be hung.  Liberty automatically increased the number of
    threads from 25 to 25.  However, all threads still appear to be
    hung.
    
    The logic that checks for hung thread conditions uses three
    conditions:
    1) The thread pool size is at maximum.
    2) That the number of completed tasks has not changed over
    time.
    3) That the incoming buffer of tasks is not empty, indicating
    that there is work needing to be done.
    
    When the coreThreads and maxThreads are the same, the thread
    pool will be maximum once the pool has created a sufficient
    number of threads.  At that point condition 1 is satisfied (and
    will remain satisfied until the server is stopped).
    
    If the server is idle, then the number of completed tasks will
    not change over time, satisfying condition 2.
    
    If a new task is put on the queue of an idle thread pool at such
    a time that the server checks it for hung threads, but before a
    thread in the pool could complete the task, then condition 3
    would also be satisfied.  This would lead to the warning message
    getting printed in the logs even though the thread pool is not
    hung at all.
    

Problem conclusion

  • The fix for this APAR prevents logging of the warning message
    when the thread pool is not hung.
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 16.0.0.3.  Please refer to the Recommended Updates page for
    delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

  • There are various ways to work around this problem:
    1) Do not specify the coreThreads or maxThreads settings at all.
    In general, the thread pool does a good job of estimating
    workload and adjusting the thread pool settings accordingly. For
    more information, see:
    https://developer.ibm.com/wasdev/docs/was-liberty-threading-and-
    why-you-probably-dont-need-to-tune-it/
    2) Do not specify the same (or too closely similar) values for
    coreThreads and maxThreads.
    3) Enable some tasks that keep the thread pool from going idle -
    such as file or configuration monitoring.  This will prevent the
    warning message by ensuring the that the thread pool continually
    completes tasks (incrementing the task count).
    4) Ignore the message and use other methods to determine whether
    the server's thread pool is really hung or deadlocked.
    

Comments

APAR Information

  • APAR number

    PI62609

  • 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

    2016-05-17

  • Closed date

    2016-06-09

  • Last modified date

    2016-06-09

  • 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:
17 October 2021