All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Verych <olecom@flower.upol.cz>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] emit logging when a process receives a fatal signal
Date: Sat, 18 Nov 2006 01:26:02 +0000 (UTC)	[thread overview]
Message-ID: <slrnelsomr.dd3.olecom@flower.upol.cz> (raw)
In-Reply-To: 20061118010946.GB31268@vanheusden.com

On 2006-11-18, Folkert van Heusden wrote:
> Hi,
>
> I found that sometimes processes disappear on some heavily used system
> of mine without any logging. So I've written a patch against 2.6.18.2
> which emits logging when a process emits a fatal signal.

Why not to patch default signal handlers in glibc, to have not only
stderr, but syslog, or /dev/kmsg copy of fatal messages?

> Signed-off-by: Folkert van Heusden <folkert@vanheusden.com>
>
> --- linux-2.6.18.2/kernel/signal.c	2006-11-04 02:33:58.000000000 +0100
> +++ linux-2.6.18.2.new/kernel/signal.c	2006-11-17 15:59:13.000000000 +0100
> @@ -706,6 +706,15 @@
>  	struct sigqueue * q = NULL;
>  	int ret = 0;
>  
> +	if (sig == SIGQUIT || sig == SIGILL  || sig == SIGTRAP ||
> +	    sig == SIGABRT || sig == SIGBUS  || sig == SIGFPE  ||
> +	    sig == SIGSEGV || sig == SIGXCPU || sig == SIGXFSZ ||
> +	    sig == SIGSYS  || sig == SIGSTKFLT)
> +	{
> +		printk(KERN_WARNING "Sig %d send to %d owned by %d.%d (%s)\n",
> +			sig, t -> pid, t -> uid, t -> gid, t -> comm);
> +	}
> +
>  	/*
>  	 * fast-pathed signals for kernel-internal things like SIGSTOP
>  	 * or SIGKILL.
>
>
> Folkert van Heusden
>
> www.vanheusden.com/multitail - multitail is tail on steroids. multiple
>                windows, filtering, coloring, anything you can think of
> ----------------------------------------------------------------------
> Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com


  reply	other threads:[~2006-11-18  1:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-18  1:09 [PATCH] emit logging when a process receives a fatal signal Folkert van Heusden
2006-11-18  1:26 ` Oleg Verych [this message]
2006-11-18  2:02   ` Folkert van Heusden
2006-11-18  2:04     ` Folkert van Heusden
2006-11-18  2:38       ` Oleg Verych
2006-11-18 10:39         ` Miquel van Smoorenburg
2006-11-18 14:09           ` Oleg Verych
2006-11-18 19:30         ` Jan Engelhardt
2006-11-18 21:51           ` Oleg Verych
2006-11-18 23:24             ` Jan Engelhardt
2006-11-19  7:13               ` Oleg Verych
2006-11-19 10:47                 ` Jan Engelhardt
2006-11-21  3:48     ` Marty Leisner
2006-11-21  5:47       ` Oleg Verych
  -- strict thread matches above, loose matches on Subject: below --
2006-11-18 11:46 Mikael Pettersson
2006-11-18 13:32 ` Folkert van Heusden
2006-11-18 19:31   ` Jan Engelhardt

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=slrnelsomr.dd3.olecom@flower.upol.cz \
    --to=olecom@flower.upol.cz \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.