Re: [PATCH] extend print_fatal_signals for reached RLIMIT_SIGPENDING

From: Ingo Molnar
Date: Mon Nov 09 2009 - 02:47:31 EST



* Naohiro Ooiwa <nooiwa@xxxxxxxxxxxxxxxx> wrote:

> When the system has too many timers or too many aggregate
> queued signals, the EAGAIN error is returned to application
> from kernel, including timer_create().
> It means that exceeded limit of pending signals at all.
> But we can't imagine it.
>
> This patch show the message when reached limit of pending signals
> and enabled print_fatal_signals.
> If you see this message and your system behaved unexpectedly,
> you can run following command.
> # ulimit -i unlimited
>
> With help from Hiroshi Shimamoto <h-shimamoto@xxxxxxxxxxxxx>.
>
>
> Signed-off-by: Naohiro Ooiwa <nooiwa@xxxxxxxxxxxxxxxx>
> Acked-by: Ingo Molnar <mingo@xxxxxxx>
> ---
> Documentation/kernel-parameters.txt | 11 +++++++++--
> kernel/signal.c | 21 ++++++++++++++++++---
> 2 files changed, 27 insertions(+), 5 deletions(-)

Thanks, i've applied your patch to tip:core/signal, for v2.6.33 merge
(if it passes all tests).

I made a few (very small) changes, see the -tip commit notification
email in this thread with the final commit:

- Extended the functions so that we can print which precise signal got
dropped - app writers will likely want to know that

- Changed the message to:

task/1234: reached RLIMIT_SIGPENDING, dropping signal

which is slightly more informative.

- Cleaned up small cleanliness details in surrounding code that caught
my eyes.

- Changed a few variable and function names to be a tiny bit more
expressive.

- Pushed the print_fatal_printks check into the new utility function
(print_dropped_signal()), to not clutter __sigqueue_alloc()
needlessly.

- Clarified the commit log message a bit, gave sample output of the new
behavior.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/