From: Simon Marchi <simark@simark.ca>
To: tdevries <tdevries@suse.de>, Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Handle SIGSEGV in gdb selftests
Date: Fri, 13 Jan 2023 20:11:47 -0500 [thread overview]
Message-ID: <94f1db30-8514-3bed-3539-142ac2690187@simark.ca> (raw)
In-Reply-To: <375589413f851bebcc3b1256273ab784@suse.de>
On 12/26/22 03:02, tdevries via Gdb-patches wrote:
> On 2022-12-16 16:11, Tom Tromey via Gdb-patches wrote:
>>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>>
>> Tom> On 12/15/22 22:14, Tom Tromey via Gdb-patches wrote:
>>>> The gdb.gdb self-tests were timing out for me. Looking into it, the
>>>> problem is that the version of the Boehm GC that is used by Guile on
>>>> my machine causes a SEGV during stack probing. This unexpected stop
>>>> confuses the tests and causes repeated timeouts.
>>>>
>>
>> Tom> FWIW, that's https://sourceware.org/bugzilla/show_bug.cgi?id=29325 .
>>
>> Thanks, I updated the commit message.
>
> I ran into this again, tried out the patch and checked that it fixes the problem.
>
> LGTM.
>
> Thanks,
> - Tom
Hi both Toms,
I still see the issue on Ubuntu 22.04, when testing with the
native-extended-gdbserver board:
...
Thread 1 "xgdb" received signal SIGSEGV, Segmentation fault.
0x00007ffff6d828f2 in GC_find_limit_with_bound () from /usr/lib/x86_64-linux-gnu/libgc.so.1
(gdb) FAIL: gdb.gdb/selftest.exp: xgdb is at prompt
The modified code looks like this:
set test "xgdb is at prompt"
gdb_test_multiple "continue" $test {
-i "$inferior_spawn_id"
-re "received signal SIGSEGV.* in GC_.*$gdb_prompt" {
# Some versions of the GC used by Guile cause a SEGV
# during stack probing. Ignore this and carry on.
send_gdb "continue\n"
exp_continue
}
-re "$banner" {
pass $test
}
}
Shouldn't the SIGSEGV -re be before the `-i $inferior_spawn_id`?
Otherwise we expect the "received signal SIGSEGV" message to come from
the debugged GDB, when it's the top GDB that will print it (like when
debugging any other test program).
I think we don't see the problem when testing with native because
the top and bottom GDBs share the same spawn id.
Simon
next prev parent reply other threads:[~2023-01-14 1:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-15 21:14 Tom Tromey
2022-12-16 15:17 ` Tom de Vries
2022-12-16 16:11 ` Tom Tromey
2022-12-26 8:02 ` tdevries
2023-01-14 1:11 ` Simon Marchi [this message]
2023-01-14 1:19 ` Simon Marchi
2023-01-17 16:20 ` Tom Tromey
2023-01-17 16:22 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=94f1db30-8514-3bed-3539-142ac2690187@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
--cc=tromey@adacore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).