[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACBanvrdpJ=MZGgF1-562pJ4_7ZLFY5w83ZnY-NaS6E+AgyVPg@mail.gmail.com>
Date: Fri, 15 Feb 2013 17:20:04 -0800
From: Mandeep Singh Baines <msb@...omium.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: linux-kernel@...r.kernel.org, Ben Chan <benchan@...omium.org>,
Tejun Heo <tj@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"Rafael J. Wysocki" <rjw@...k.pl>, Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH 5/5] coredump: abort core dump piping only due to a fatal signal
On Fri, Feb 15, 2013 at 7:01 AM, Oleg Nesterov <oleg@...hat.com> wrote:
> On 02/14, Mandeep Singh Baines wrote:
>>
>> This patch makes wait_for_dump_helpers() not to abort piping the core
>> dump data when the crashing process has received any but a fatal signal
>> (SIGKILL). The rationale is that a crashing process may still receive
>> uninteresting signals such as SIGCHLD when its core dump data is being
>> redirected to a helper application.
>
> You already sent this change in the past ;) and I already reviewed it.
>
> It is not enough and imho not good. Damn, I'll try very much to make the
> patches on weekend...
>
>> - while ((pipe->readers > 1) && (!signal_pending(current))) {
>> + while ((pipe->readers > 1) && (!fatal_signal_pending(current))) {
>
> This turns pipe_wait() belowe into the busy-wait loop if signal_pending().
D'oh. Thanks for catching that.
Fixed in v3 by blocking non-fatal signals.
> Not good. And not enough, there are other reasons why coredump can fail
> if the signal is pending.
What other reasons did you have in mind?
Since applying an earlier version of this patch, truncated/missing
coredumps are no longer any issue for us.
Maybe it could fail in binfmt->core_dump().
Could the other reasons be addressed in another patch?
>
>> wake_up_interruptible_sync(&pipe->wait);
>> kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
>> pipe_wait(pipe);
>> + pipe_unlock(pipe);
>> + try_to_freeze();
>
> Oh, yes. One of the problems with coredump/signals is freezer. Not sure
> what should we do...
>
> But if we add try_to_freeze() here, we need to add more try_to_freeze's,
> think about dumping the huge core on the slow media.
>
We could add more try_to_freeze()s in the dump_write paths to work
even better with freezer. Do you see any issues with just adding it
here for a start. It fixes the non-slow media case.
Thanks much for reviewing this patch.
Regards,
Mandeep
> Oleg.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists