lkml.org 
[lkml]   [2008]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC, PATCH] signals: print_fatal_signal: fix the signr "calculation"
On 03/09, Ingo Molnar wrote:
>
> * Roland McGrath <roland@redhat.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.



\
 
 \ /
  Last update: 2008-03-09 17:11    [W:0.084 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site