From: Oleg Nesterov <oleg@redhat.com>
To: Mandeep Singh Baines <msb@chromium.org>
Cc: 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>,
Andrew Morton <akpm@linux-foundation.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] exec: log when wait_for_dump_helpers aborts due to a signal
Date: Wed, 26 Oct 2011 18:54:00 +0200 [thread overview]
Message-ID: <20111026165400.GB18076@redhat.com> (raw)
In-Reply-To: <1319591228-20397-1-git-send-email-msb@chromium.org>
On 10/25, Mandeep Singh Baines wrote:
>
> To allow coredump pipe readers to look at /proc/<pid> of the crashing
> process, the kernel waits for the reader to exit. However, the wait
> is silently aborted if the crashing process is signalled.
Well, yes... But note that this signal_pending() is only used because
with TIF_SIGPENDING we have the problems anyway.
Oh. I promise myself I'll make do_coredump() killable and cleanup this
all every time I look at this code...
> This patch, logs whenever wait_for_dump_helpers is aborted or in order
> to assist in debugging cases where /proc/<pid> is gone.
I don't really understand why this is useful. The reader process
can complain if it can't collect the data (say, /proc/pid goes away
or EOF doesn't come).
As for the patch itself,
> - while ((pipe->readers > 1) && (!signal_pending(current))) {
> + while (pipe->readers > 1) {
> + if (signal_pending(current)) {
> + pr_info("wait_for_dump_helpers[%d]: "
> + "aborted due to signal\n",
> + task_pid_nr(current));
> + break;
> + }
> +
> wake_up_interruptible_sync(&pipe->wait);
This can't help in general. If signal_pending() == T, it is quite
possible that pipe_write() already failed before.
Oleg.
next prev parent reply other threads:[~2011-10-26 16:54 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 [this message]
2011-10-28 23:26 ` Andrew Morton
2011-10-29 12:42 ` Neil Horman
2011-10-29 14:43 ` Oleg Nesterov
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=20111026165400.GB18076@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).