IBM Support

JR48395: INTRODUCTION OF THE CAPABILITY TO DETECT INFINITE LOOPS IN CUSTOMER WRITTEN JAVASCRIPT ACTIVITIES

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • It is possible for JavaScript activities in IBM BPM applications
    to be coded so that infinite loops can occur. Identifying which
    JavaScript is looping might be difficult. However, resources are
    affected when JavaScripts loop. For example, Process Center or
    Process Server threads are lost until the server is terminated.
    Lost threads can affect server availability.
    
    A fix is available that helps identify JavaScripts that are in
    infinite loops and, optionally, terminate them.
    

Local fix

  • N/A
    

Problem summary

  • It is possible for JavaScript activities in IBM BPM applications
    to be coded so that infinite loops can occur. Identifying which
    JavaScript is looping might be difficult. However, resources are
    affected when JavaScripts loop. For example, Process Center or
    Process Server threads are lost until the server is terminated.
    Lost threads can affect server availability.
    In some cases, it might be possible to terminate the process
    instance, but it is not always possible.
    This enhancement improves the stability and availability of
    Process Center and Process Server by detecting and terminating
    infinite loops within a JavaScript activity.
    

Problem conclusion

  • IBM BPM monitors the number of executed JavaScript instructions
    in each Script Activity.  The JavaScript run-time notifies the
    BPM engine when the instruction counter reaches a limit that is
    set by the BPM engine.
    After the number of executed JavaScript instructions have
    reached the limit, the BPM engine checks how long the Script
    Activity has been executing.
    Notes:
    - Calls to Java methods or IBM BPM JavaScript API calls, e.g.,
      tw.system.executeServiceByName count as 1 instruction.
    - JavaScript code within managed server-side files referenced
      by server side components counting as individual instructions
      and not just one
    - Currently a hard coded limit of 25 Million JavaScript
      instructions are used
    - APAR JR51504 introduces the capability to change this limit.
      Please refer to this APAR for further details.
    If the "loop-detection-exception" value is set to "false", one
    of the following messages will be written to SystemOut.log:
    "CWLLG2261W: Infinite loop suspected after {0} seconds in
    ''UKNOWN'' activity. If this script is not in a loop, increase
    the loop-detection-duration property."
    "CWLLG2263W: Infinite loop suspected after {0} seconds in
    ''{1}'', for BPD ''{2}'', script activity ''{3}''. If this
    script is not in a loop, increase the loop-detection-duration
    property.
    "CWLLG2265W: Infinite loop suspected after {0} seconds in
    service ''{1}''. If this service is not in a loop, increase the
    loop-detection-duration property."
    If the "loop-detection-exception" value is set to "true", one of
    the following messages will be written to SystemOut.log:
    "CWLLG2262E: Infinite loop detected after {0} seconds,
    ''UKNOWN'' activity terminated. If this script is not in a loop,
    increase the loop-detection-duration property.");
    "CWLLG2264E: Infinite loop detected after {0} seconds in
    ''{1}'', for BPD ''{2}'', script activity ''{3}'' terminated. If
    this script is not in a loop, increase the
    loop-detection-duration property.
    "CWLLG2266E: Infinite loop detected after {0} seconds, service
    ''{1}'' terminated. If this service is not in a loop, increase
    the loop-detection-duration property."
    If the loop-detection-duration is exceeded, it is assumed that
    the activity is in an endless loop.  The default duration is set
    to 20 seconds, but it is configurable (see below).
    By default, when an endless loop is detected, the BPM engine
    writes a Warning to SystemOut, but the Script Activity
    continues.  To configure the BPM engine to terminate infinitely
    looping script activities, set the loop-detection-exception
    property to the value true.
    You can configure the JavaScript loop detection parameters in
    100Custom as follows:
    <common merge="mergeChildren">
      <javascript-engine>
        <loop-detection-duration
    merge="replace">90</loop-detection-duration>
        <loop-detection-exception
    merge="replace">true</loop-detection-exception>
      </javascript-engine>
    </common>
    FIX AVAILABILITY:
    iFix for 8.0.1.1 is available on Fix Central, search for APAR
    JR48395 at http://www.ibm.com/support/fixcentral/
    iFix for 8.0.1.2 is available on Fix Central, search for APAR
    JR48395 at http://www.ibm.com/support/fixcentral/
    iFix for 8.5.0.1 is available on Fix Central, search for APAR
    JR48395 at http://www.ibm.com/support/fixcentral/
    Fix is also targetted for inclusion in next fixpack for BPM
    8.0.1, BPM 8.5.0
    When obtaining any of the above fixes, be sure to download the
    accompanying readme, for itself, and any prerequisite fixes, and
    review them thoroughly.
    

Temporary fix

  • Not applicable
    

Comments

APAR Information

  • APAR number

    JR48395

  • Reported component name

    BPM STANDARD

  • Reported component ID

    5725C9500

  • Reported release

    801

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-11-08

  • Closed date

    2014-10-28

  • Last modified date

    2015-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

    BPM STANDARD

  • Fixed component ID

    5725C9500

Applicable component levels

  • R801 PSY

       UP

  • R850 PSY

       UP



Document information

More support for: IBM Business Process Manager Standard

Software version: 8.0.1

Reference #: JR48395

Modified date: 09 June 2015