From: Andrew Morton <akpm@linux-foundation.org>
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>,
Oleg Nesterov <oleg@redhat.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: Fri, 28 Oct 2011 16:26:31 -0700 [thread overview]
Message-ID: <20111028162631.294c1f8a.akpm@linux-foundation.org> (raw)
In-Reply-To: <1319591228-20397-1-git-send-email-msb@chromium.org>
On Tue, 25 Oct 2011 18:07:08 -0700
Mandeep Singh Baines <msb@chromium.org> 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.
>
> This patch, logs whenever wait_for_dump_helpers is aborted or in order
> to assist in debugging cases where /proc/<pid> is gone.
You don't really describe what problem you're observing. What's the
use case? What are you trying to do? etc.
Because if that is known, we can perhaps find better solutions.
> Alternatively, we may want to consider not aborting on a signal. You
> could always break the loop by killing the reader process.
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() :(
Neil, Oleg: can you remember?
> --- a/fs/exec.c
> +++ b/fs/exec.c
> @@ -2030,7 +2030,14 @@ static void wait_for_dump_helpers(struct file *file)
> pipe->readers++;
> pipe->writers--;
>
> - 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;
> + }
> +
argh, printk("i screwed up"). Hopefully we can find a better solution
to whatever-your-problem is than this!
next prev parent reply other threads:[~2011-10-28 23:26 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 [this message]
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=20111028162631.294c1f8a.akpm@linux-foundation.org \
--to=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=oleg@redhat.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).