This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/17705] nptl_db: stale thread create/death events if debugger detaches
- From: "palves at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 12 Dec 2014 17:44:28 +0000
- Subject: [Bug nptl/17705] nptl_db: stale thread create/death events if debugger detaches
- Auto-submitted: auto-generated
- References: <bug-17705-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17705
--- Comment #1 from Pedro Alves <palves at redhat dot com> ---
Created attachment 8010
--> https://sourceware.org/bugzilla/attachment.cgi?id=8010&action=edit
WIP fix
WIP fix. The main idea is that whenever a __nptl_*_event event function is
called, the debugger is expected to consume the event (see
nptl_db/td_ta_event_getmsg.c). If the event wasn't consumed, then it must be
the debugger is either gone, or misbehaved. The death event is to reason about
-- clearly we shouldn't hang on the event forever, as the thread is about to be
wiped out. So right after calling the event function, we remove the thread
from the event queue. The complication is that a new debugger may manage to
reattach just while we're doing that, and the code must be written in a way
that works without any locking/synchronization between the debugger and the
inferior.
--
You are receiving this mail because:
You are on the CC list for the bug.