Analysis steps for WebSphere DataPower stack overflow issues

Technote (troubleshooting)


Problem(Abstract)

A stack overflow error in the DataPower log may indicate that recursive or loop processing in a stylesheet is not working as expected.

Symptom

The following messages may appear in the DataPower system log

0x00230001 Dynamic Execution Error
0x80c00009 Transforming PIPE with my.xsl stored in PIPE failed: my.xsl:321: Stack overflow


Cause

The stylesheet named in the stack overflow message may contain recursive processing: an XSL template that invokes itself. The logic that should terminate the recursive processing may not be working properly for a particular request message. The stylesheet may also contain loop processing that does not exit properly.

Diagnosing the problem

To analyze the issue, follow these steps:

Desk check the stylesheet listed in the 0x80c0009 message for errors in recursive or loop logic. Look for an <xsl:template> that invokes itself recursively. Examine <xsl:for-each> loops.

Recreate the issue and use stylesheet profiling and stylesheet tracing to confirm that
the recursive and loop processing in the stylesheet are working as expected. Look for
processing that never completes: infinite loops, recursive processing that never reaches its exit criteria.

Webcast replay: WebSphere DataPower SOA Appliances and XSLT (Part 1 of 2) - Tools

Webcast replay: WebSphere DataPower SOA Appliances and XSLT (Part 2 of 2) - Tips and Tricks

Here some specific steps to enable stylesheet profiling:

  • Create a compile options policy called profile_stylesheets that profiles all local stylesheets. Here are the CLI commands to do this for a domain called "mydomain". It can also be done in the Web GUI:
    switch domain mydomain; config; urlmap local_stylesheets; match local:*; exit; compile-option profile_stylesheets; profile local_stylesheets; exit;
  • Associate the compile options policy with the XML manager for your service, with CLI commands like this one, or by using the Web GUI. In this command, the XML manager is named "my_xml_manager" and the compile options policy has the name chosen in the step above "profile_stylesheets"
    xslconfig myxmlmanager profile_stylesheets
  • To see the stylesheet profile information for your next test only, in the DataPower Web GUI, select Status > XMLProcessing. Select Stylesheet Cache and Flush the cache for the XML Manager.
  • Run a test transaction that works
  • Review the stylesheet profile for a working transaction: From Status > XMLProcessing, select Stylesheet Profiles. The profiles page shows each stylesheet and each template and a count. Make note of the counts for the stylesheet identified in the stack overflow message by taking a screen capture of the Stylesheet profiles page.
  • Flush the cache again: From Status > XMLProcessing, select Stylesheet Cache and Flush the cache for the XML Manager.
  • Run a test transaction that fails
  • Review the stylesheet profile for the failing transaction: Status > XML Processing > Stylesheet Profiles. Make a second screen capture of the stylesheet profiles page and compare it with the screen capture for the successful transaction. Problems may be found by looking for templates or functions with a very high count value.

Resolving the problem

If you find that processing is working as expected and the size of the input
simply requires a larger stack size: You can increase the DataPower stack size by
modifying the XML manager compile option policy stack size.
If the size of the input request is the issue, you may also need XML manager's Bytes scanned setting. Factors to consider when choosing a compile option policy stack size are discussed in the Related URL technotes below.

Related information

DataPower error "Unable to allocate execution resources

Rate this page:

(0 users)Average rating

Document information


More support for:

WebSphere DataPower SOA Appliances
General

Software version:

3.8.2, 4.0, 4.0.1, 4.0.2, 5.0.0, 6.1

Operating system(s):

Firmware

Reference #:

1618736

Modified date:

2013-01-03

Translate my page

Machine Translation

Content navigation