Red Hat Bugzilla – Bug 76645
gdb unable to give stack traces across signal handler (UML)
Last modified: 2015-01-07 19:01:20 EST
When running user-mode Linux under gdb in Red Hat 8.0, I am unable to get a
stack trace that goes back before a signal handler runs.
Only the functions called from the signal handler (in this case, |segv| and
|panic|) are visible when stopped at a breakpoint in |panic|. Manual walking of
$ebp will let me find calling PCs, so the stack hasn't been trashed.
I've tried with both
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
with similar results. I will try to find time to try with a RH7.3-era gdb to
see if the results are different.
The user-mode Linux in question is built from the Red Hat 2.4.18-14 kernel, with
some VFS patches.
Could you attach a copy of gdb's backtrace output? I suspect this is a known
bug, and it is being fixed in the FSF gdb development branch.
Now that I've started using the compat-gcc-7.3 gcc to build my kernel, the
problem has gone away. I can try to restore the old setup, if you really need
me too, but the stack trace would look very much like:
#0 0xdeadbeef in panic (args to panic) at panic_source.c:42
#1 0xcafebabe in segv (args to segv) at segv_source.c:1977
Trying to go up from frame 1 would tell me
Initial frame selected; you cannot go up.
I'll try a build with 3.2 this weekend, once I'm finished with my current
Thanks, could I also bribe you in trying the current FSF gdb on
A fix was recently checked in for this problem. (Ignore the 5.3 branch).
Sure. Once I've torched my development environment, I don't mind dancing on the
Can I just grab a today-or-later snapshot, or should I really pull from CVS?
The snapshots should be ok.
An errata has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.