Discussion:
[Bug 1325503] Re: gdb reports 'corrupt stack' on armhf without symbols
Thomas Karl Pietrowski
2015-12-22 08:56:28 UTC
Permalink
I also see a lot of these errors here on Wily at KDE Plasma:

Application: Plasma (plasmashell), signal: Segmentation fault
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
__libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
[Current thread is 1 (Thread 0xb2ad9000 (LWP 4363))]

Thread 14 (Thread 0xb076a3e0 (LWP 4365)):
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb55706b0 in __pthread_cond_wait (cond=0xc0560, mutex=0xc0548) at pthread_cond_wait.c:186
#2 0xb2296592 in ?? () from /usr/lib/arm-linux-gnueabihf/dri/swrast_dri.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 13 (Thread 0xaff6a3e0 (LWP 4366)):
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb55706b0 in __pthread_cond_wait (cond=0xc0668, mutex=0xc0650) at pthread_cond_wait.c:186
#2 0xb2296592 in ?? () from /usr/lib/arm-linux-gnueabihf/dri/swrast_dri.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 12 (Thread 0xaf76a3e0 (LWP 4367)):
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb55706b0 in __pthread_cond_wait (cond=0xc0770, mutex=0xc0758) at pthread_cond_wait.c:186
#2 0xb2296592 in ?? () from /usr/lib/arm-linux-gnueabihf/dri/swrast_dri.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 11 (Thread 0xaef6a3e0 (LWP 4368)):
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb55706b0 in __pthread_cond_wait (cond=0xc0878, mutex=0xc0860) at pthread_cond_wait.c:186
#2 0xb2296592 in ?? () from /usr/lib/arm-linux-gnueabihf/dri/swrast_dri.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 10 (Thread 0xae7143e0 (LWP 4369)):
#0 0xb56904e0 in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0xb6bb4168 in ?? () from /usr/lib/arm-linux-gnueabihf/libxcb.so.1
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 9 (Thread 0xad1c43e0 (LWP 4377)):
#0 0xb5a03d80 in QTimerInfoList::timerWait(timespec&) () from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#1 0xb5a04c52 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#2 0xb4fb0c54 in g_main_context_prepare () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#3 0xb4fb12ee in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 8 (Thread 0xaad3d3e0 (LWP 4378)):
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
#1 0xb56a011a in __GI___clock_gettime (clock_id=0, tp=0xaad3cbec) at ../sysdeps/unix/clock_gettime.c:99
#2 0xb59095b2 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 7 (Thread 0xa8fe23e0 (LWP 4386)):
#0 0xb4fb13c2 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 6 (Thread 0xa7dff3e0 (LWP 4387)):
#0 0xb56904e2 in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0xb4fb137a in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 5 (Thread 0xa6a3e3e0 (LWP 4388)):
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb55706b0 in __pthread_cond_wait (cond=0xb6f23dd0, mutex=0xb6f23db8) at pthread_cond_wait.c:186
#2 0xb6ebfe76 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Script.so.5
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 4 (Thread 0xa4eff3e0 (LWP 4389)):
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
#1 0xb56a011a in __GI___clock_gettime (clock_id=0, tp=0xa4efebb4) at ../sysdeps/unix/clock_gettime.c:99
#2 0xb59095b2 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 0xa40633e0 (LWP 4391)):
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb55706b0 in __pthread_cond_wait (cond=0x32e118, mutex=0x32e100) at pthread_cond_wait.c:186
#2 0xb58a52f8 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#3 0xb69b710a in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Quick.so.5
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 2 (Thread 0x9c9723e0 (LWP 4393)):
#0 0xb56744e0 in nanosleep () at ../sysdeps/unix/syscall-template.S:81
#1 0xb56742bc in __sleep (seconds=0) at ../sysdeps/unix/sysv/linux/sleep.c:138
#2 0xb6f77864 in ?? () from /usr/lib/arm-linux-gnueabihf/libKF5Crash.so.5
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0xb2ad9000 (LWP 4363)):
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb55706b0 in __pthread_cond_wait (cond=0x135a428, mutex=0x135a410) at pthread_cond_wait.c:186
#2 0xb58a52f8 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#3 0xb69b4e4e in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Quick.so.5
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1325503

Title:
gdb reports 'corrupt stack' on armhf without symbols

To manage notifications about this bug go to:
https://bugs.launchpad.net/gdb-linaro/+bug/1325503/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-***@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Nonny Moose
2016-06-19 14:40:02 UTC
Permalink
I am running Ubuntu Mate Xenial and gdb always reports the following bt, symbols or not:
```
Program received signal SIGSEGV, Segmentation fault.
0x76fd9822 in ?? () from /lib/ld-linux-armhf.so.3
(gdb) bt
#0 0x76fd9822 in ?? () from /lib/ld-linux-armhf.so.3
#1 0x76fd983a in ?? () from /lib/ld-linux-armhf.so.3
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Is this related?
```
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1325503

Title:
gdb reports 'corrupt stack' on armhf without symbols

To manage notifications about this bug go to:
https://bugs.launchpad.net/gdb-linaro/+bug/1325503/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-***@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
matteo
2016-09-14 14:01:24 UTC
Permalink
Nonny Moose I have the same problem of you (running Ubuntu Mate and gdb v.7.11.1).
Actually I can't perform any application in debug due to the same segmentation fault!
Did you solve the problem?
Thanks
Matteo
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1325503

Title:
gdb reports 'corrupt stack' on armhf without symbols

To manage notifications about this bug go to:
https://bugs.launchpad.net/gdb-linaro/+bug/1325503/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-***@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Brian Makin
2017-01-25 00:42:29 UTC
Permalink
ubuntu-mate (Xenial Xerus) on raspberry pi 3.

having similar issue.

$ gcc -g main.c -o main
$ gdb main
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from main...done.
(gdb) run
Starting program: /home/merimus/foo/main

Program received signal SIGSEGV, Segmentation fault.
0x76fd9822 in ?? () from /lib/ld-linux-armhf.so.3
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1325503

Title:
gdb reports 'corrupt stack' on armhf without symbols

To manage notifications about this bug go to:
https://bugs.launchpad.net/gdb-linaro/+bug/1325503/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-***@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Matthias Klose
2018-05-17 20:32:27 UTC
Permalink
The problem is that most system library code is built
without -g, so gdb doesn't have whatever information is necessary to
unwind the stack properly.
this is wrong. every package is built with -g, however the debug symbols are
split out into separate -dbg or dbgsym packages.
It seems that gcc, with the -g option, adds .cfi directives into the
assembler code, and gdb needs that info. Remove the .cfi directives and
you get the "Backtrace stopped: previous frame identical to this frame
(corrupt stack?)" error.
Even a very simple program with subroutine calls (similar to below) will
void foo(int i)
{
if (i < 100) foo(i+1);
printf("i=%d\n", i);
}
main()
{
foo(0);
}
When compiled without -g each time the program calls foo the stack looks
to gdb like it's corrupted, and only the topmost level is shown, along
with the error. Compile with -g and everything works, at least until
you step into printf, which wasn't compiled with -g.
Once you step out of printf you'll get your stack back.
This feels like a compiler bug to me, i.e. gcc __SHOULD__ generate at
least the minimal set of .cfi directives that are needed for gdb to
generate a backtrace, regardless of whether -g is specified or not.
is gdb using the split out debug symbols for your use case?
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1325503

Title:
gdb reports 'corrupt stack' on armhf without symbols

To manage notifications about this bug go to:
https://bugs.launchpad.net/gdb-linaro/+bug/1325503/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-***@lists.ubuntu.com
https://lists.ubuntu.com/mailman/l
Loading...