public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/26664] New: FAIL: gdb.threads/killed-outside.exp: prompt after first continue (timeout)
@ 2020-09-25 9:35 vries at gcc dot gnu.org
2020-09-25 9:38 ` [Bug testsuite/26664] " vries at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: vries at gcc dot gnu.org @ 2020-09-25 9:35 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26664
Bug ID: 26664
Summary: FAIL: gdb.threads/killed-outside.exp: prompt after
first continue (timeout)
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: testsuite
Assignee: unassigned at sourceware dot org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
On a SLE-15 SP1 machine (160 core, 3TB Mem, build area setup in /dev/shm), I
reliably run into:
...
(gdb) PASS: gdb.threads/killed-outside.exp: get pid of inferior
Executing on target: kill -9 145926 (timeout = 300)
spawn -ignore SIGHUP kill -9 145926^M
continue^M
Continuing.^M
Couldn't get registers: No such process.^M
(gdb) [Thread 0x7ffff74c4700 (LWP 145930) exited]^M
^M
Program terminated with signal SIGKILL, Killed.^M
The program no longer exists.^M
FAIL: gdb.threads/killed-outside.exp: prompt after first continue (timeout)
...
Using this patch:
...
diff --git a/gdb/testsuite/gdb.threads/killed-outside.exp
b/gdb/testsuite/gdb.threads/kille
d-outside.exp
index ff5a115728..49a909ebcb 100644
--- a/gdb/testsuite/gdb.threads/killed-outside.exp
+++ b/gdb/testsuite/gdb.threads/killed-outside.exp
@@ -43,6 +43,9 @@ set no_longer_exists_msg "The program no longer exists\."
set not_being_run_msg "The program is not being run\."
gdb_test_multiple "continue" "prompt after first continue" {
+ -re "Continuing\.\r\n$no_such_process_msg\r\n$gdb_prompt " {
+ fail $gdb_test_name
+ }
-re
"Continuing\.\r\n$no_such_process_msg\r\n$no_such_process_msg\r\n$gdb_prompt "
{
pass $gdb_test_name
# Two times $no_such_process_msg. The bug condition was triggered, go
...
we turn the timeout into a regular fail:
...
FAIL: gdb.threads/killed-outside.exp: prompt after first continue
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug testsuite/26664] FAIL: gdb.threads/killed-outside.exp: prompt after first continue (timeout)
2020-09-25 9:35 [Bug testsuite/26664] New: FAIL: gdb.threads/killed-outside.exp: prompt after first continue (timeout) vries at gcc dot gnu.org
@ 2020-09-25 9:38 ` vries at gcc dot gnu.org
2020-09-25 15:40 ` vries at gcc dot gnu.org
2021-10-29 10:04 ` vries at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: vries at gcc dot gnu.org @ 2020-09-25 9:38 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26664
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Here ( https://sourceware.org/pipermail/gdb-patches/2020-April/167781.html ) I
mentioned:
...
>> +gdb_test_multiple "continue" "prompt after first continue" {
>> + -re "Continuing\.\r\n\r\n$killed_msg\r\n$no_longer_exists_msg\r\n$gdb_prompt $" {
>> + pass $gdb_test_name
>> + # Regular output, bug condition was not triggered, we're done.
>> + return -1
>> + }
>> + -re "Continuing\.\r\n$no_such_process_msg\r\n$no_such_process_msg\r\n$gdb_prompt " {
>> + pass $gdb_test_name
>> + # Two times $no_such_process_msg. The bug condition was triggered, go
>> + # check for it.
>> + }
>> + -re "Continuing\.\r\n$no_such_process_msg\r\n$gdb_prompt $" {
>> + pass $gdb_test_name
>> + # One time $no_such_process_msg. We're stuck here. The bug condition
>> + # was not triggered, but we're not getting correct gdb behaviour either:
>> + # every subsequent continue produces one no_such_process_msg. Give up.
>> + return -1
>
> I'm confused here -- the comment says we're not getting correct behavior,
> but this won't result in any FAIL?
>
Um, yes. I made that decision because I was trying to trigger another
scenario. But agreed, it's debatable. Anyway, it also doesn't matter
anymore since rewriting the test to stop at a breakpoint eliminated the
need for this. The scenario I was trying to trigger now always reproduces.
...
So, that was incorrect, the scenario with one $no_such_process_msg still
reproduces, as this PR shows.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug testsuite/26664] FAIL: gdb.threads/killed-outside.exp: prompt after first continue (timeout)
2020-09-25 9:35 [Bug testsuite/26664] New: FAIL: gdb.threads/killed-outside.exp: prompt after first continue (timeout) vries at gcc dot gnu.org
2020-09-25 9:38 ` [Bug testsuite/26664] " vries at gcc dot gnu.org
@ 2020-09-25 15:40 ` vries at gcc dot gnu.org
2021-10-29 10:04 ` vries at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: vries at gcc dot gnu.org @ 2020-09-25 15:40 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26664
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |palves at redhat dot com
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Hmm, this seems to get rid of the "Couldn't get registers: No such process":
...
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 6532b06ae5..e909aab5e2 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2330,7 +2330,7 @@ resume_1 (enum gdb_signal sig)
step = 0;
}
- CORE_ADDR pc = regcache_read_pc (regcache);
+ CORE_ADDR pc = regcache_read_pc_protected (regcache);
infrun_debug_printf ("step=%d, signal=%s, trap_expected=%d, "
"current thread [%s] at %s",
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug testsuite/26664] FAIL: gdb.threads/killed-outside.exp: prompt after first continue (timeout)
2020-09-25 9:35 [Bug testsuite/26664] New: FAIL: gdb.threads/killed-outside.exp: prompt after first continue (timeout) vries at gcc dot gnu.org
2020-09-25 9:38 ` [Bug testsuite/26664] " vries at gcc dot gnu.org
2020-09-25 15:40 ` vries at gcc dot gnu.org
@ 2021-10-29 10:04 ` vries at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: vries at gcc dot gnu.org @ 2021-10-29 10:04 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26664
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2021-October/182906.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-29 10:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 9:35 [Bug testsuite/26664] New: FAIL: gdb.threads/killed-outside.exp: prompt after first continue (timeout) vries at gcc dot gnu.org
2020-09-25 9:38 ` [Bug testsuite/26664] " vries at gcc dot gnu.org
2020-09-25 15:40 ` vries at gcc dot gnu.org
2021-10-29 10: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).