Debian Codegraph @

man/error::fault.7stap

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