Thanks, Sharon! Great suggestions. Now I know where to start.
Thanks again,
-Tennis
On Mon, Jul 11, 2011 at 7:46 PM, Sharon Lucas <luc...@us.ibm.com> wrote:
> There are several different ways to debug this. Here are some:
>
> 1) You say a "crash" occurs. Do you mean a STAX signal is raised (e.g.
> STAXPythonEvalError signal) and terminates the job? If so, then that logs
> an errors in the STAX Job log (and is shown if running the STAX job via the
> STAX Monitor) that contains a stack trace which would show you the
> function(s) called when the error occurred.
>
> 2) You could run the STAX job via the STAX Monitor and use the STAX
> Monitor's Debug panel (see the STAX User's Guide for more info). The STAX
> Monitor allows you to set breakpoints at functions / line numbers.
>
> 3) You could add some debug code to your "closeSessionOutput" function that
> checks if scriptFileName has the bad value and, if so, you could hold the
> job and then submit a STAF local STAX LIST JOB <Job#> THREADS request to
> list the active threads. Find the thread (and its thread number) that
> called the closeSessionOutput function and then query that thread by
> submitting a request like: STAF local STAX QUERY JOB <Job#> THREAD
> <Thread#>. For example:
>
> <!-- Check for the "bad" value. I didn't know if you meant '' or None or
> something else -->
> <if expr="scriptFileName == ''>
> <hold/>
> </if>
>
> --------------------------------------------------------------
> Sharon Lucas
> IBM Austin, luc...@us.ibm.com
> (512) 286-7313 or Tieline 363-7313
>
>
>
>
> From: Tennis Smith <tennis_sm...@yahoo.com>
> To: staf-users@lists.sourceforge.net
> Date: 07/11/2011 04:30 PM
> Subject: [staf-users] stax error debug query
> ------------------------------
>
>
>
> Hi,
>
> I'm new to debugging stax errors, so please bear with me.
>
> In a a script called "stax-script.xml', there is a function
> "closeSessionOutput". This has a required argument "scriptFileName".
>
> Intermittently, "closeSessionOutput" is getting called and "scriptFileName"
> is given a null value. This subsequently causes a crash.
>
> How can I determine who is the caller?
>
> Tks,
> -T
>
>
> For completeness, here is the function definition:
> <function name="closeSessionOutput" scope="local">
> <function-prolog>
> When an CompareOutput command is encountered in the script, it
> sends
> a #OutputToTextFile(Close) to all application instances
> </function-prolog>
> <function-single-arg>
> <function-required-arg name="scriptFileName"/>
> </function-single-arg>
> <sequence>
> <script>
> cmdResult =
> gCurrentRootScriptContextMgr.sessionManager.getSessionNameList()
> </script>
> <call function="'handleCmdResult'">cmdResult</call>
> <script>
> sessionsList = cmdResult.result[0]
> appInstancesLen = len(sessionsList) - 1
> </script>
> <if expr="appInstancesLen > 0">
> <sequence>
> <loop var="ii" from="0" to="appInstancesLen" by="1">
> <sequence>
> <script>
> nextAppToCheck = sessionsList[ii]
> onSessionCmd = "#OnSession(%s)" %
> nextAppToCheck
> outputToFileClose =
> "#OutputToTextFile(CLOSE)"
> </script>
> <call
> function="'doNextScriptCommand'">onSessionCmd, scriptFileName</call>
> <call
> function="'doNextScriptCommand'">outputToFileClose, scriptFileName</call>
> </sequence>
> </loop>
> <call function="'logSTAXMsgVerbose'">"Clearing
> Application Instances"</call>
> </sequence>
> </if>
> </sequence>
> </function>
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> staf-users mailing list
> staf-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/staf-users
>
>
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users