[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080309161153.GA76@tv-sign.ru>
Date: Sun, 9 Mar 2008 19:11:53 +0300
From: Oleg Nesterov <oleg@...sign.ru>
To: Ingo Molnar <mingo@...e.hu>
Cc: Roland McGrath <roland@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Arjan van de Ven <arjan@...radead.org>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC, PATCH] signals: print_fatal_signal: fix the signr "calculation"
On 03/09, Ingo Molnar wrote:
>
> * Roland McGrath <roland@...hat.com> wrote:
>
> > I'm not sure print-fatal-signals was really ever intended for
> > non-coredump signals. It doesn't seem like it would be all that
> > useful. It's probably even undesireable for every normal C-c killing
> > something to cause a printk.
>
> correct. We used to have them for SIGKILL but even that was confusing to
> users - so the intent very much is to only have them for truly
> unexpected, non-user generated and 'fatal', coredump-generating signals.
Yes, I see now, thanks.
Let me clarify why I started this thread. I'm thinking how we can "improve"
fatal signals. Let's look at this patch
http://marc.info/?l=linux-kernel&m=120498888702466
(under discussion, let's suppose it will be accepted). In short: with this
patch the thread-specific SIGKILL shutdowns the whole thread group early on
signal delivery, the same way like the group-wide SIGKILL does.
For various reasons we can't currently do the same for sig_kernel_coredump()
signals. But, when rlim[RLIMIT_CORE] == 0, we don't actually need coredumping?
So, we could do something like
- if (!sig_kernel_coredump(sig)) {
+ if (!sig_kernel_coredump(sig) || !signal->rlim[RLIMIT_CORE]) {
// shutdown the whole group,
// send SIGKILL to each thread
to speedup the processing of fatal coredump signals (to clarify: this issue
is minor, just for example. and the change above is not exactly right).
However, this breaks print_fatal_signal(), because with this change nobody
will dequeue the "right" signal to report, it was transformed to the "global"
SIGKILL.
So, if we change the behaviour of thread-specific coredump signals, then
we should "fix" print_fatal_signal(). At least, now I know which signals
should be reported.
Thanks!
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