Re: [PATCH] exec: log when wait_for_dump_helpers aborts due to asignal
From: Oleg Nesterov
Date: Sat Oct 29 2011 - 10:47:56 EST
On 10/28, Andrew Morton wrote:
>
> Well. Neil's changelog for 61be228a06dc6e8662 is quite nice and tells
> us everything we could possibly want to know, except for why it tests
> sgnal_pending() :(
In short, signal_pending() should not be here. It only reflects the
fact that do_coredump() needs the fixes (and can't resist, I sent the
patch several years ago, but it was ignored ;)
There are 2 reasons. if signal_pending() == T then:
- pipe_wait() is pointless, it won't block. We do not want
a busywait loop.
- And probably even wait_for_dump_helpers() is pointless,
it is quite possible that pipe_write() already failed
before and the reader doesn't know this.
What I think we should do:
- Fix this code, it should not react to signals.
- But! at the same time the explicit SIGKILL should stop
the coredump. It can take a lot of time/resources.
This also makes it oom-killable, and this is important.
- If we dump to the pipe, then perhaps it makes sense to
send a signal to the pipe reader in the latter case, but
this is a bit offtopic.
I'll try to redo my old patches for 3.2 once I have the time. There
are some nasty problems which I forgot, _iirc_ this is not that
trivial.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/