public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/16182] New: gdb buggy when attached to PID 1 of Linux PID namespace
@ 2013-11-18 1:30 shawnlandden at gmail dot com
2015-05-05 12:30 ` [Bug breakpoints/16182] " gbenson at redhat dot com
2015-05-07 10:44 ` gbenson at redhat dot com
0 siblings, 2 replies; 3+ messages in thread
From: shawnlandden at gmail dot com @ 2013-11-18 1:30 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=16182
Bug ID: 16182
Summary: gdb buggy when attached to PID 1 of Linux PID
namespace
Product: gdb
Version: 7.6
Status: NEW
Severity: normal
Priority: P2
Component: breakpoints
Assignee: unassigned at sourceware dot org
Reporter: shawnlandden at gmail dot com
gdb is very buggy when attached to a process that thinks it is PID 1 due to
Linux's PID namespaces via the clone() system call.
It will hit breakpoints, but next/step/etc does not work, and it locks up both
gdb and systemd, they only way to kill the programs is to 1) kill -9 gdb
2) reattach gdb and use the "r" command to re-exec to unfreeze systemd.
lldb-3.4 works fine in the same situation
from /home/shawn/systemd-nspawn/root.x86_64/usr/lib/libc-2.18.so
(gdb) break socket_enter_running
Breakpoint 1 at 0x4310b0: file src/core/socket.c, line 1433.
(gdb) c
Continuing.
Breakpoint 1, socket_enter_running (s=0xa77ea0, cfd=31) at
src/core/socket.c:1433
1433 static void socket_enter_running(Socket *s, int cfd) {
(gdb) n
Cannot execute this command while the selected thread is running.
...
(gdb) q
A debugging session is active.
Inferior 1 [process 14243] will be detached.
Quit anyway? (y or n) y
^Z
[1]+ Stopped gdb -p 14243
then you have to kill -9 gdb, then reattach to systemd, then
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program:
/home/shawn/systemd-nspawn/root.x86_64/usr/lib/systemd/systemd
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Trying to run as user instance, but $XDG_RUNTIME_DIR is not set.
[Inferior 1 (process 16924) exited with code 01]
(gdb) q
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug breakpoints/16182] gdb buggy when attached to PID 1 of Linux PID namespace
2013-11-18 1:30 [Bug breakpoints/16182] New: gdb buggy when attached to PID 1 of Linux PID namespace shawnlandden at gmail dot com
@ 2015-05-05 12:30 ` gbenson at redhat dot com
2015-05-07 10:44 ` gbenson at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: gbenson at redhat dot com @ 2015-05-05 12:30 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=16182
Gary Benson <gbenson at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gbenson at redhat dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug breakpoints/16182] gdb buggy when attached to PID 1 of Linux PID namespace
2013-11-18 1:30 [Bug breakpoints/16182] New: gdb buggy when attached to PID 1 of Linux PID namespace shawnlandden at gmail dot com
2015-05-05 12:30 ` [Bug breakpoints/16182] " gbenson at redhat dot com
@ 2015-05-07 10:44 ` gbenson at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: gbenson at redhat dot com @ 2015-05-07 10:44 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=16182
--- Comment #1 from Gary Benson <gbenson at redhat dot com> ---
I'm trying to reproduce this but it's working fine on my system. What kernel
are you using?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-07 10:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-18 1:30 [Bug breakpoints/16182] New: gdb buggy when attached to PID 1 of Linux PID namespace shawnlandden at gmail dot com
2015-05-05 12:30 ` [Bug breakpoints/16182] " gbenson at redhat dot com
2015-05-07 10:44 ` gbenson at redhat dot com
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).