This is the mail archive of the libc-alpha@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]

Deadlock in signal safe functions.


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.


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