This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug server/21392] New: gdbserver unable to interrupt execution of daemonized processes starting at 7.9
- From: "robmaher3075 at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 17 Apr 2017 17:56:41 +0000
- Subject: [Bug server/21392] New: gdbserver unable to interrupt execution of daemonized processes starting at 7.9
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=21392
Bug ID: 21392
Summary: gdbserver unable to interrupt execution of daemonized
processes starting at 7.9
Product: gdb
Version: 7.9
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: server
Assignee: unassigned at sourceware dot org
Reporter: robmaher3075 at gmail dot com
Target Milestone: ---
Created attachment 9996
--> https://sourceware.org/bugzilla/attachment.cgi?id=9996&action=edit
Vagrant Ubuntu 16.04 (ubuntu/xenial64) with gdb 7.11.1 can't halt process
I've been having problems debugging daemonized processes on x86_64 when using a
remote target with gdb -> gdbserver -> [daemon process]. The same setup/debug
procedure works up to and including GDB 7.8.2. Once I jump to any more recent
version (tried 7.9, 7.9.1, 7.10.1, or 7.12.1) gdbserver successfully starts up
and it appears that gdb is initially able to attach to the process, however
once the process is resumed I am no longer able to interrupt its execution with
CTRL-C. After a second CTRL-C gdb responds with "^C^CThe target is not
responding to interrupt requests.
Stop debugging it? (y or n)" and the debug session is no longer useable.
While I've been testing this in our Yocto-based development environment I have
also been able to reproduce this issue when switching between Vagrant Ubuntu
VMs for 14.04 (gdb version 7.7.1) and Ubuntu 16.04 (gdb version 7.11.1).
Steps to reproduce as shown in attached log:
1) start-stop-daemon --start --background --exec /bin/sleep -- 300
2) sudo gdbserver --debug --attach 127.0.0.1:34115 `pidof sleep`
3) gdb
3.1) target remote 127.0.0.1:34115
3.2) c (continue)
3.3) CTRL-C (target fails to halt)
3.4) CTRL-C (target not responding message)
Also I've noticed that some daemons don't seem to be affected by this issue.
After looking at their source it seems that those daemons who fork() once,
setsid(), and continue don't seem to be affected while those that fork(),
setsid(), fork(), and continue will not interrupt as expected.
--
You are receiving this mail because:
You are on the CC list for the bug.