1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
.\" t
.TH ERROR::FAULT 7stap
.SH NAME
error::fault \- memory access faults
.\" macros
.de SAMPLE
.br
.RS
.nf
.nh
..
.de ESAMPLE
.hy
.fi
.RE
..
.SH DESCRIPTION
Read or write faults can occur during the operation of a systemtap
script, if the script causes dereferencing of a pointer that turns out
to be invalid. This can be caused by using context variables that do
not happen to have valid values, or perhaps references to memory that
is unavailable at that moment due to paging.
.PP
These fault conditions are benign because they are caught by the
systemtap runtime, which cleanly terminates the script. If quick
termination is not desired, consider using the
.IR \-\-skip\-badvars " or " \-\-suppress\-handler\-errors " or " \-DMAXERRORS=NN
stap options, or wrapping relevant parts of the probe handlers in a
.IR try / catch
block.
.PP
It may be possible to adjust the target program, to make it more likely
that needed context variables are paged in when systemtap looks for them.
Consider adding some lightweight processing on the key variables, like a
.I strlen(foo)
for a string, or iterating across elements of an array or linked list,
or touching a few bytes of a heap-allocated block. The idea is to trigger
any page faults in the target program, before systemtap would need to (but can't).
.SH SEE ALSO
.nh
.nf
.IR stap (1),
.IR error::reporting (7stap)
|