systemtap to trace source of syscall error?
Frank Ch. Eigler
fche@redhat.com
Mon Dec 20 14:09:00 GMT 2010
"Richard W.M. Jones" <rjones@redhat.com> writes:
> [...]
> Unfortunately my reproducer is quite hard to trigger[1], and it's
> probably happening somewhere inside FUSE, so I was hoping for a way to
> just grab say a stack trace when it happens. Oh well ...
The problem is that by the time the error propagates to userspace, the
kernel stack has been unwound, so there is nothing to trace exactly.
However, if you suspect the FUSE subsystem, you could probe there
instead, not at the syscall boundary. For example,
% stap -L 'module("fuse").function("*").return'
[... many functions ...]
% sudo stap -vt -e '
probe module("fuse").function("*").return {
if (@defined($return) && $return < 0) println(pp()," ",$return)
}'
This should give you a list of functions that have a <0 result code.
- FChE
More information about the Systemtap
mailing list