Chapter 5. Understanding SystemTap Errors
This chapter explains the most common errors you may encounter while using SystemTap.
5.1. Parse and Semantic Errors
These types of errors occur while SystemTap attempts to parse and translate the script into C, prior to being converted into a kernel module. For example type errors result from operations that assign invalid values to variables or arrays.
The following invalid SystemTap script is missing its probe handlers:
probe vfs.read
probe vfs.write
It results in the following error message showing that the parser was expecting something other than the probe
keyword in column 1 of line 2:
parse error: expected one of '. , ( ? ! { = +='
saw: keyword at perror.stp:2:1
1 parse error(s).
If you are sure of the safety of any similar constructs in the script and are member of stapdev
group (or have root privileges), run the script in "guru" mode by using the option -g
(i.e. stap -g script
).
Example 5.1. error-variable.stp
probe syscall.open
{
printf ("%d(%d) open\n", execname(), pid())
}
probe begin { printf("x") = 1 }
SystemTap could not find a suitable kernel-debuginfo
at all.