This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/17705] nptl_db: stale thread create/death events if debugger detaches


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]