Bug 26272

Summary: FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: no threads left
Product: gdb Reporter: Tom de Vries <vries>
Component: threadsAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: simon.marchi
Priority: P2    
Version: HEAD   
Target Milestone: 13.1   
Host: Target:
Build: Last reconfirmed:

Description Tom de Vries 2020-07-21 14:51:01 UTC
I run into:
...
FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: no threads left
FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: only inferior 1 left (the program exited)
...

In more detail:
...
[Inferior 1 (process 21928) exited normally]PASS: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: inferior 1 exited
PASS: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: no failure to remove breakpoints
PASS: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: no spurious thread stop
^M
info threads^M
  Id   Target Id                         Frame ^M
  11.11 Thread 0x7ffff3470700 (LWP 22041) (running)^M
^M
No selected thread.  See `help thread'.^M
(gdb) FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: no threads left
[Inferior 11 (process 21990) exited normally]^M
info inferiors^M
  Num  Description       Connection           Executable        ^M
* 1    <null>                                 /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.threads/fork-plus-threads\
/fork-plus-threads ^M
  11   <null>                                 /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.threads/fork-plus-threads\
/fork-plus-threads ^M
(gdb) FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: only inferior 1 left (the program exited)
...
Comment 1 Tom de Vries 2020-07-24 13:54:46 UTC
Confirmed on current trunk, in opensuse tumbleweed vm bound to 1 cpu with 75% execution cap.
Comment 2 Tom de Vries 2021-10-26 23:38:17 UTC
Submitted:
- [PATCH 1/2] [gdb/testsuite] Fix FAIL in gdb.threads/fork-and-threads.exp
  https://sourceware.org/pipermail/gdb-patches/2021-October/182847.html
- [PATCH 2/2] [gdb/testsuite] Add KFAIL in gdb.threads/fork-plus-threads.exp
  https://sourceware.org/pipermail/gdb-patches/2021-October/182846.html
Comment 3 Simon Marchi 2022-04-22 17:49:58 UTC
Should be fixed by: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=152a17495663ae9099d5efdc38322c9ad348014e

I can't change the status of the bug it seems, can you please close it?
Comment 4 Tom de Vries 2022-04-29 08:44:10 UTC
(In reply to Simon Marchi from comment #3)
> Should be fixed by:
> https://sourceware.org/git/?p=binutils-gdb.git;a=commit;
> h=152a17495663ae9099d5efdc38322c9ad348014e
> 

Thanks :) !

> I can't change the status of the bug it seems, can you please close it?

Strange.  Let me try ...