Re: [PATCH] kernel/signal: Signal-based pre-coredump notification
From: Eric W. Biederman
Date: Tue Oct 16 2018 - 11:27:13 EST
Enke Chen <enkechen@xxxxxxxxx> writes:
> Hi, Eric:
> On 10/15/18 4:28 PM, Eric W. Biederman wrote:
>> With that said I think the best solution would be to figure out how to
>> allow the coredump to run in parallel with the usual exit signal, and
>> exit code reaping of the process>
>> That would solve the problem for everyone, and would not introduce any
>> new complicated APIs.
> That would certainly help. But given the huge deployment of Linux, I don't
> think it would be feasible to change this fundamental behavior (signal post
Of course it will be feasible to change. Make it a sysctl and keep the
current default and no one will even notice. Waiting for something that
is happening asynchronously is not be difficult so having the wait
optional should not be a problem.
Right now the default in most distributions is to disable core dumps
entirely. Which means that you are going to have to find a very
specific situation in which people and applications care about core
dumps happening to break an existing setup.
Then all you have to do to get the non-blocking behavior is to just do:
echo 1 > /proc/sys/kernel_core_async
Then everything else works without modifications and everyone is happy.
Maybe I am wearing rose colored glasses but that looks like all that is
needed and it should be much easier to work with and maintain than
having to modify every manager process to listen for unreliable signals,
and then take action on those unreliable signals.