public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/28080] New: detach causes core dump
@ 2021-07-12 15:33 jonah at kichwacoders dot com
  2021-07-12 16:05 ` [Bug gdb/28080] " simark at simark dot ca
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jonah at kichwacoders dot com @ 2021-07-12 15:33 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28080

            Bug ID: 28080
           Summary: detach causes core dump
           Product: gdb
           Version: 11.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: jonah at kichwacoders dot com
  Target Milestone: ---

Created attachment 13556
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13556&action=edit
backtrace

In GDB 11 prerelease there is a regression that doing a detach causes a core
dump (terminate called after throwing an instance of 'gdb_exception_error')

To reproduce, run a simple program like this "gdbserver :45511 simple" (using
gdbserver from the build, but it also failed using system gdbserver 9.2)

Then run gdb and do a "target remote localhost:45511" followed by a "detach".
Note that the target is not running when I do a detach below, but I believe
this is a reduced case of a more complicated test that is part of Eclipse CDT
testsuite[1]

(gdb) detach
Detaching from program:
target:/scratch/eclipse/src/cdt/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/bin/TargetAvail.exe,
process 3671843
Detaching from process 3671843
Ending remote debugging.
[Inferior 1 (process 3671843) detached]
In main
terminate called after throwing an instance of 'gdb_exception_error'
Aborted (core dumped)


I have attached the backtrace for the error.

I did a git bisect and found that 408f66864a1a823591b26420410c982174c239a2
introduces the error which was part of the patch set that Simon pointed me at:
https://sourceware.org/pipermail/gdb-patches/2021-January/175040.html


[1]
https://ci.eclipse.org/cdt/view/Main%20(debug%20tests)/job/debug-tests-master-gdb-master/lastCompletedBuild/testReport/org.eclipse.cdt.tests.dsf.gdb.tests/OperationsWhileTargetIsRunningTest/detachWhileTargetRunningGDBAlive_gdbserver_/

This was done on Ubuntu 20.04 on x86_64 hardware:
$ lsb_release 
LSB Version:    core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
$ uname -a
Linux ditto 5.4.0-77-generic #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021 x86_64
x86_64 x86_64 GNU/Linux
$ gcc --version
gcc (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-07-13 14:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 15:33 [Bug gdb/28080] New: detach causes core dump jonah at kichwacoders dot com
2021-07-12 16:05 ` [Bug gdb/28080] " simark at simark dot ca
2021-07-12 19:37 ` pedro at palves dot net
2021-07-13 14:32 ` cvs-commit at gcc dot gnu.org
2021-07-13 14:32 ` cvs-commit at gcc dot gnu.org
2021-07-13 14:35 ` cvs-commit at gcc dot gnu.org
2021-07-13 14:35 ` cvs-commit at gcc dot gnu.org
2021-07-13 14:37 ` pedro at palves dot net
2021-07-13 14:38 ` pedro at palves dot net

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).