From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Mandeep Singh Baines <msb@chromium.org>,
linux-kernel@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
Neil Horman <nhorman@tuxdriver.com>,
Earl Chew <earl_chew@agilent.com>,
Andi Kleen <andi@firstfloor.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] exec: log when wait_for_dump_helpers aborts due to a signal
Date: Sat, 29 Oct 2011 16:43:15 +0200 [thread overview]
Message-ID: <20111029144315.GB7036@redhat.com> (raw)
In-Reply-To: <20111028162631.294c1f8a.akpm@linux-foundation.org>
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.
prev parent reply other threads:[~2011-10-29 14:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-26 1:07 [PATCH] exec: log when wait_for_dump_helpers aborts due to a signal Mandeep Singh Baines
2011-10-26 16:54 ` Oleg Nesterov
2011-10-28 23:26 ` Andrew Morton
2011-10-29 12:42 ` Neil Horman
2011-10-29 14:43 ` Oleg Nesterov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111029144315.GB7036@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andi@firstfloor.org \
--cc=earl_chew@agilent.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=msb@chromium.org \
--cc=nhorman@tuxdriver.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).