print_backtrace not printing full stack
Mike Mason
mmlnx@us.ibm.com
Thu Aug 10 21:35:00 GMT 2006
Hmm... I didn't think about the user portion of the stack being missing. Perhaps open() isn't a good example. I tried probing the entry to open()and printing the backtrace. Saw the same results. Then I tried a few other probe points, including schedule() in sched.c. No matter where I probe, I only get one line of the stack.
Mike
Frank Ch. Eigler wrote:
> Mike Mason <mmlnx@us.ibm.com> writes:
>
>> Is there some trick to getting print_backtrace to work? The following
>> script:
>> probe syscall.open.return { [...]
>> print_backtrace();
>> I get one line from the stack and that's it. I assume I should see the
>> full stack.
>
> If by "full stack" you mean to include the user-space program that
> performed open(2), then unfortunately we can't do that yet. We also
> know that kretprobes did or does have problems with corrupting
> backtraces for even plain nested kernel-side probes. To some extent,
> one might work around this by storing the backtrace at the point of
> syscall entry thusly:
>
> global bt
> probe syscall.open { bt[tid()] = backtrace() }
> probe syscall.open.return { if (...) { print_stack (bt[tid()]) }
> /* delete bt[tid()] */ }
>
> - FChE
More information about the Systemtap
mailing list