* Deadlock in signal safe functions.
@ 2015-07-11 11:41 Ondřej Bílka
0 siblings, 0 replies; only message in thread
From: Ondřej Bílka @ 2015-07-11 11:41 UTC (permalink / raw)
To: libc-alpha
Hi,
I realized that there is possible deadlock when we call any signal-safe
function in signal handler. Its quite simple.
1. Create two threads to force locking in _dl_fixup with
THREAD_GSCOPE_SET_FLAG ();
2. Send signal and and with handler calling unresolved function, say
mkdir.
This causes deadlock unless we implement locking as signal-safe
recursive mutex, which isn't recursive on x64.
I don't have reproducer yet as I don't know how to force enough lookups
to make this condition likely.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-11 11:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-11 11:41 Deadlock in signal safe functions Ondřej Bílka
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).