posix_spawn: parent can get stuck in uninterruptible sleep if child receives SIGTSTP early enough
Rain
glibc@sunshowers.io
Fri Oct 21 01:40:41 GMT 2022
On Thu, Oct 20, 2022, at 04:55, Florian Weimer wrote:
> * Adhemerval Zanella Netto:
>
>>> I don't think switching back to fork by default is really an option.
>>> The impact on latency is much worse than with vfork.
>>
>> I agree and I have been chatting with Christian if we can improve this
>> with some kernel support. My idea would to add a new clone3 argument
>> to define a signal mask and another options (either through clone3
>> itself or with a new execve variant) to setup the desired signal mask
>> after execve call.
>>
>> The first features is more an optimization to avoid the sigprocmask
>> (although I think we will need it anyway to proper reap the child if
>> the spawni fails), while the second feature should fix the issue
>> raised in this thread.
>
> But I think it would only work for SIGTSTP, not for SIGSTOP, right?
> But maybe SIGSTOP is sufficiently unusual that fixing SIGTSP on its own
> is already a welcome improvement.
>From my perspective, fixing SIGTSTP is enough.
However, I do care about older versions of the Linux kernel and glibc,
as well as other operating systems, so I'll probably have to maintain
the double-process-spawn workaround indefinitely, sadly.
Thanks,
Rain
More information about the Libc-help
mailing list