Differences between revisions 8 and 9
Revision 8 as of 2013-01-28 21:54:51
Size: 2775
Editor: elastic
Comment:
Revision 9 as of 2014-03-12 16:12:24
Size: 3037
Editor: FChE
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:

A blunt workaround is to use the --suppress-handler-errors flag. It lets most errors be quietly absorbed by the systemtap runtime, so the script will soldier on and on, until it runs exit(), or a user interrupts it. It'll print a single warning message then.
Line 28: Line 30:

Exhausted resources

Systemtap attempts to assure that probe handlers run within strict time/space limits. A typical script producing a modest amount of trace data will not encounter these limits, but maybe your script does. What can you do?

A blunt workaround is to use the --suppress-handler-errors flag. It lets most errors be quietly absorbed by the systemtap runtime, so the script will soldier on and on, until it runs exit(), or a user interrupts it. It'll print a single warning message then.

It depends on what resource ran out.

error message

exhausted resource

possible remedy

MAXACTION exceeded

time -- number of statements executed by probe handler

recompile with larger -DMAXACTION=NN or -DMAXACTION_INTERRUPTIBLE=NN

impose limits on iteration - foreach (... limit NN) or break)

MAXNESTING exceeded

time/space -- function recursion too deep

reduce recursion

recompile with larger -DMAXNESTING=NN

division by zero

time/space -- universe is too small to represent exact value

try dividing by one instead

aggregation overflow

space -- number of distinct index tuples in aggregation array

recompile with larger -DMAXMAPENTRIES=NN

declare that array only with larger size -- global my_array[NN]

delete unneeded elements, or use % array global declaration suffix

Array overflow

space -- number of distinct index tuples in ordinary array

as above

string truncation

space -- strings are silently limited to a maximum length

recompile with larger -DMAXSTRINGLEN=NN

WARNING: ... skipped probes: NN

time -- cross-processor contention over global script variables

reduce number of globals

maybe recompile with larger -DMAXTRYLOCK=NN

use aggregates and @count() instead of integer counters

space -- too many return probes may be pending

add larger .maxaction(NN) to .return probe point

space -- too little kernel stack available for probe handler run

move probe points higher in the call stack

risky, but maybe recompile with smaller -DMINSTACKSPACE=NN

probe overhead exceeded threshold

time -- probe handlers are taking too high fraction of total real time

shrink probe handler code

recompile with larger -DSTP_OVERLOAD_THRESHOLD

disable this heuristic with -DSTP_NO_OVERLOAD

There were NN transport failures

space -- amount of data printed by script exceeded staprun's capability to copy it to the output file

print less stuff

run with larger trace buffers: stap -s NN

See also TipSkippedProbesOptimization.


Tips

None: TipExhaustedResourceErrors (last edited 2014-03-12 16:12:24 by FChE)