* [Bug translator/16614] New: signal forwarding to child processes uses invalid pthread* functions
@ 2014-02-20 20:24 fche at redhat dot com
2014-02-20 20:58 ` [Bug translator/16614] " jistone at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: fche at redhat dot com @ 2014-02-20 20:24 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=16614
Bug ID: 16614
Summary: signal forwarding to child processes uses invalid
pthread* functions
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
Assignee: systemtap at sourceware dot org
Reporter: fche at redhat dot com
Tracing through stap / stap-serverd signal handling, thence kill_stap_spawn(),
thence spawned_pids_t::killall, one finds pthread mutex lock operations
wrapping
our reading of a set<pid_t>.
That's not appropriate. We can't call pthread mutex ops from a signal handler
at all; among other reasons, it's a deadlock recipe if the signal comes in at
the wrong time. We can't just traverse the set<> locklessly either, because it
may be in the middle of being updated by another thread.
We need a signal-safe structure for collecting & iterating child pids.
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug translator/16614] signal forwarding to child processes uses invalid pthread* functions
2014-02-20 20:24 [Bug translator/16614] New: signal forwarding to child processes uses invalid pthread* functions fche at redhat dot com
@ 2014-02-20 20:58 ` jistone at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: jistone at redhat dot com @ 2014-02-20 20:58 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=16614
Josh Stone <jistone at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jistone at redhat dot com
--- Comment #1 from Josh Stone <jistone at redhat dot com> ---
(In reply to Frank Ch. Eigler from comment #0)
> We need a signal-safe structure for collecting & iterating child pids.
We may just need to make spawned_pids_t properly either-or, signal-safe or
thread-safe but not both. At the moment, stap is single-threaded and calls
kill_stap_spawn from a signal handler; stap-serverd is multithreaded but only
kills via main. So stap only needs the signal-masking, and stap-serverd only
needs the pthread mutex. (In fact, the use of sigprocmask is unspecified in
multithreaded processes.)
This is half-way selected by the SINGLE_THREADED macro now, but that's a big
hammer, not even set by stap.
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-20 20:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-20 20:24 [Bug translator/16614] New: signal forwarding to child processes uses invalid pthread* functions fche at redhat dot com
2014-02-20 20:58 ` [Bug translator/16614] " jistone 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).