[PATCH] nptl: Retry SIGSETXID delivery on EAGAIN in setxid (bug 21108)
Florian Weimer
fweimer@redhat.com
Fri Aug 14 13:49:35 GMT 2026
* Adhemerval Zanella:
> setxid_signal_thread assumed tgkill could only fail if the target
> thread had not started yet or had already exited, and treated any error
> as "thread is gone". But SIGSETXID is a realtime signal, and for those
> the tgkill may fail with with EAGAIN once the per-real-user
> RLIMIT_SIGPENDING limit is reached (process-directed kill uses the
> guaranteed delivery override, but a thread-directed tgkill cannot.)
I have not reviewed the patch yet, but I want to share an idea: Using
si_value with a random cookie to detect stray signals. Unfortunately,
that doesn't help because the queue is not signal-specific (or
process-specific). So it doesn't simplify the implementation if we
terminate the process on a stray SIGSETXID signal: it's possible to
queue up signals with the help of a completely different process.
Thanks,
Florian
More information about the Libc-alpha
mailing list