On 25/01/2024 10:10, Maxim Kuvyrkov wrote:
On Jan 25, 2024, at 04:08, ci_notify@linaro.org wrote:
Dear contributor, our automatic CI has detected problems related to your patch(es). Please find some details below. If you have any questions, please follow up on linaro-toolchain@lists.linaro.org mailing list, Libera's #linaro-tcwg channel, or ping your favourite Linaro toolchain developer on the usual project channel.
We appreciate that it might be difficult to find the necessary logs or reproduce the issue locally. If you can't get what you need from our CI within minutes, let us know and we will be happy to help.
We track this report status in https://linaro.atlassian.net/browse/GNU-1120 , please let us know if you are looking at the problem and/or when you have a fix.
In gdb_check master-arm after:
| commit gdb-14-branchpoint-1354-g8669a8b6740 | Author: Guinevere Larsen blarsen@redhat.com | Date: Thu Aug 24 11:00:35 2023 +0200 | | gdb/testsuite: add test for backtracing for threaded inferiors from a corefile | | This patch is based on an out-of-tree patch that fedora has been | carrying for a while. It tests if GDB is able to properly unwind a | threaded program in the following situations: | * regular threads | * in a signal handler | ... 14 lines of the commit log omitted.
FAIL: 2 regressions
regressions.sum: === gdb tests ===
Running gdb:gdb.threads/threadcrash.exp ... FAIL: gdb.threads/threadcrash.exp: test_gcore: $thread_count == 7 FAIL: gdb.threads/threadcrash.exp: test_gcore: $thread_count == [llength $test_list]
Hi Guinevere,
The failures seem to be due to "LWP" output (instead of "Thread") in test_gcore.
I.e., test_corefile succeeds with
=== (gdb) PASS: gdb.threads/threadcrash.exp: test_corefile: loading_corefile 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
(gdb) PASS: gdb.threads/threadcrash.exp: test_corefile: $thread_count == 7
and then test_gcore fails with
=== (gdb) PASS: gdb.threads/threadcrash.exp: test_gcore: loading_corefile 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 ?? ()
(gdb) FAIL: gdb.threads/threadcrash.exp: test_gcore: $thread_count == 7
Could you please look into fixing the testcase? [I assume "LWP" output is expected, but I'm not an expert in GDB.]
So I looked into this and there are 2 problems here. First is that the test isn't able to count the 7 thread, and second is that GDB is failing to unwind 3 of the threads.
Only the first one may be a test issue, and I'm trying to look into that. The second one is a gdb problem either when generating the gcore or when reading it. I'll open a bug and make the test KFAIL instead of FAIL here, since it isn't a simple fix. Just to confirm, before I say something incorrect in the bug report, this bug happens for 32-bit arm, right?
Also, I read the Jira comments and just wanted to mention I go by she/her pronouns :)