public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug backtrace/31294] New: cant unwind __libc_do_syscall from gcore in arm 32 bits
@ 2024-01-25 15:25 blarsen at redhat dot com
2024-01-30 14:33 ` [Bug corefiles/31294] gcores do not work in 32-bit arm targets blarsen at redhat dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: blarsen at redhat dot com @ 2024-01-25 15:25 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31294
Bug ID: 31294
Summary: cant unwind __libc_do_syscall from gcore in arm 32
bits
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: backtrace
Assignee: unassigned at sourceware dot org
Reporter: blarsen at redhat dot com
Target Milestone: ---
The newly introduced test gdb.threads/threadcrash.exp has revealed a
pre-existing issue in 32 bit arm.
using "info threads" on a regular corefile gives the following thread list:
info threads
Id Target Id Frame
* 1 Thread 0xf7dbe7e0 (LWP 476389) 0x00830cea in crash_function () at
/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.threads/threadcrash.c:381
2 Thread 0xf7c6f3a0 (LWP 476390) do_spin_task (location=NORMAL) at
/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.threads/threadcrash.c:139
3 Thread 0xf746e3a0 (LWP 476391) do_spin_task (location=SIGNAL_HANDLER) at
/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.threads/threadcrash.c:139
4 Thread 0xf6c6d3a0 (LWP 476392) do_spin_task (location=SIGNAL_ALT_STACK)
at
/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.threads/threadcrash.c:139
5 Thread 0xf52fe3a0 (LWP 476395) __libc_do_syscall () at
../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
6 Thread 0xf646c3a0 (LWP 476393) __libc_do_syscall () at
../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
7 Thread 0xf5aff3a0 (LWP 476394) __libc_do_syscall () at
../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
Whereas the same command when loading a gcore yields:
info threads
Id Target Id Frame
* 1 LWP 476440 0x00400cea in crash_function () at
/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.threads/threadcrash.c:381
2 LWP 476442 do_spin_task (location=NORMAL) at
/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.threads/threadcrash.c:139
3 LWP 476443 do_spin_task (location=SIGNAL_HANDLER) at
/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.threads/threadcrash.c:139
4 LWP 476444 do_spin_task (location=SIGNAL_ALT_STACK) at
/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.threads/threadcrash.c:139
5 LWP 476445 0xf7eadb04 in ?? ()
6 LWP 476446 0xf7eadb04 in ?? ()
7 LWP 476447 0xf7eadb04 in ?? ()
Notice how the threads are in the same order, and threads 5, 6 and 7 all fail
the unwinding. This can be shown in the Linaro CI bug GNU-1120[1], even though
the main focus of the bug is unrelated to this.
I'm opening this mostly as a papertrail to add a KFAIL to the test, but it
should probably be fixed at some point.
[1] https://linaro.atlassian.net/browse/GNU-1120
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug corefiles/31294] gcores do not work in 32-bit arm targets
2024-01-25 15:25 [Bug backtrace/31294] New: cant unwind __libc_do_syscall from gcore in arm 32 bits blarsen at redhat dot com
@ 2024-01-30 14:33 ` blarsen at redhat dot com
2024-01-30 14:36 ` sam at gentoo dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: blarsen at redhat dot com @ 2024-01-30 14:33 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31294
Guinevere Larsen <blarsen at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|backtrace |corefiles
Summary|cant unwind |gcores do not work in
|__libc_do_syscall from |32-bit arm targets
|gcore in arm 32 bits |
--- Comment #1 from Guinevere Larsen <blarsen at redhat dot com> ---
The rest of gdb.threads/threadcrash.exp gcore section has even worse results.
The log for "thread apply all backtrace" is as follows:
thread apply all backtrace^M
^M
Thread 7 (LWP 776476):^M
#0 0xf7eadb04 in ?? ()^M
#1 0xf7f13a7e in ?? ()^M
Backtrace stopped: previous frame identical to this frame (corrupt stack?)^M
^M
Thread 6 (LWP 776475):^M
#0 0xf7eadb04 in ?? ()^M
#1 0xf7f13a7e in ?? ()^M
Backtrace stopped: previous frame identical to this frame (corrupt stack?)^M
^M
Thread 5 (LWP 776474):^M
#0 0xf7eadb04 in ?? ()^M
#1 0xf7f13a7e in ?? ()^M
Backtrace stopped: previous frame identical to this frame (corrupt stack?)^M
^M
Thread 4 (LWP 776473):^M
#0 do_spin_task (location=SIGNAL_ALT_STACK) at
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.threads/threadcrash.c:139^M
#1 0x00400a5e in signal_handler (signo=10) at
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.threads/threadcrash.c:241^M
#2 <signal handler called>^M
#3 0xf7eadb06 in ?? ()^M
#4 0xf7eed292 in ?? ()^M
Backtrace stopped: previous frame identical to this frame (corrupt stack?)^M
^M
Thread 3 (LWP 776472):^M
#0 do_spin_task (location=SIGNAL_HANDLER) at
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.threads/threadcrash.c:139^M
#1 0x00400a5e in signal_handler (signo=10) at
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.threads/threadcrash.c:241^M
#2 <signal handler called>^M
#3 0xf7eadb06 in ?? ()^M
#4 0xf7eed292 in ?? ()^M
Backtrace stopped: previous frame identical to this frame (corrupt stack?)^M
Seems that either the writing or reading of gcores is thoroughly broken.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug corefiles/31294] gcores do not work in 32-bit arm targets
2024-01-25 15:25 [Bug backtrace/31294] New: cant unwind __libc_do_syscall from gcore in arm 32 bits blarsen at redhat dot com
2024-01-30 14:33 ` [Bug corefiles/31294] gcores do not work in 32-bit arm targets blarsen at redhat dot com
@ 2024-01-30 14:36 ` sam at gentoo dot org
2024-01-31 3:54 ` thiago.bauermann at linaro dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: sam at gentoo dot org @ 2024-01-30 14:36 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31294
Sam James <sam at gentoo dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sam at gentoo dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug corefiles/31294] gcores do not work in 32-bit arm targets
2024-01-25 15:25 [Bug backtrace/31294] New: cant unwind __libc_do_syscall from gcore in arm 32 bits blarsen at redhat dot com
2024-01-30 14:33 ` [Bug corefiles/31294] gcores do not work in 32-bit arm targets blarsen at redhat dot com
2024-01-30 14:36 ` sam at gentoo dot org
@ 2024-01-31 3:54 ` thiago.bauermann at linaro dot org
2024-02-01 19:12 ` thiago.bauermann at linaro dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: thiago.bauermann at linaro dot org @ 2024-01-31 3:54 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31294
Thiago Jung Bauermann <thiago.bauermann at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |thiago.bauermann at linaro dot org
--- Comment #2 from Thiago Jung Bauermann <thiago.bauermann at linaro dot org> ---
I'm currently looking into bug #31254 which has similar symptoms.
I narrowed the problem in that bug down to the "arm exidx" unwinder, which uses
C++ exception tables to unwind frames. I think there's a memory corruption
issue with one of its data structures. I'm hoping to have more information
tomorrow.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug corefiles/31294] gcores do not work in 32-bit arm targets
2024-01-25 15:25 [Bug backtrace/31294] New: cant unwind __libc_do_syscall from gcore in arm 32 bits blarsen at redhat dot com
` (2 preceding siblings ...)
2024-01-31 3:54 ` thiago.bauermann at linaro dot org
@ 2024-02-01 19:12 ` thiago.bauermann at linaro dot org
2024-03-11 23:01 ` thiago.bauermann at linaro dot org
2024-03-12 7:04 ` vries at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: thiago.bauermann at linaro dot org @ 2024-02-01 19:12 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31294
--- Comment #3 from Thiago Jung Bauermann <thiago.bauermann at linaro dot org> ---
(In reply to Thiago Jung Bauermann from comment #2)
> I'm currently looking into bug #31254 which has similar symptoms.
Tom de Vries posted a fix to that bug, but even with it applied, I can still
reproduce this problem so they are different issues.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug corefiles/31294] gcores do not work in 32-bit arm targets
2024-01-25 15:25 [Bug backtrace/31294] New: cant unwind __libc_do_syscall from gcore in arm 32 bits blarsen at redhat dot com
` (3 preceding siblings ...)
2024-02-01 19:12 ` thiago.bauermann at linaro dot org
@ 2024-03-11 23:01 ` thiago.bauermann at linaro dot org
2024-03-12 7:04 ` vries at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: thiago.bauermann at linaro dot org @ 2024-03-11 23:01 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31294
--- Comment #4 from Thiago Jung Bauermann <thiago.bauermann at linaro dot org> ---
I can't reproduce this problem anymore, so I did git bisect, which found that
commit 9c0aa4c53104 ("Fix disabling of year 2038 support on 32-bit hosts by
default") fixed the bug.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug corefiles/31294] gcores do not work in 32-bit arm targets
2024-01-25 15:25 [Bug backtrace/31294] New: cant unwind __libc_do_syscall from gcore in arm 32 bits blarsen at redhat dot com
` (4 preceding siblings ...)
2024-03-11 23:01 ` thiago.bauermann at linaro dot org
@ 2024-03-12 7:04 ` vries at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2024-03-12 7:04 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31294
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
CC| |vries at gcc dot gnu.org
Target Milestone|--- |15.1
Status|NEW |RESOLVED
--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-03-12 7:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-25 15:25 [Bug backtrace/31294] New: cant unwind __libc_do_syscall from gcore in arm 32 bits blarsen at redhat dot com
2024-01-30 14:33 ` [Bug corefiles/31294] gcores do not work in 32-bit arm targets blarsen at redhat dot com
2024-01-30 14:36 ` sam at gentoo dot org
2024-01-31 3:54 ` thiago.bauermann at linaro dot org
2024-02-01 19:12 ` thiago.bauermann at linaro dot org
2024-03-11 23:01 ` thiago.bauermann at linaro dot org
2024-03-12 7:04 ` vries at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).