From: Oleg Verych <olecom@flower.upol.cz>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Folkert van Heusden <folkert@vanheusden.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] emit logging when a process receives a fatal signal
Date: Sat, 18 Nov 2006 21:51:17 +0000 [thread overview]
Message-ID: <20061118215117.GA15686@flower.upol.cz> (raw)
In-Reply-To: <Pine.LNX.4.61.0611182029150.10940@yvahk01.tjqt.qr>
On Sat, Nov 18, 2006 at 08:30:02PM +0100, Jan Engelhardt wrote:
>
> On Nov 18 2006 02:38, Oleg Verych wrote:
> >On Sat, Nov 18, 2006 at 03:04:13AM +0100, Folkert van Heusden wrote:
> >> > > > 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?
> >> > Afaik when a proces gets shot because of a segfault, also the libraries
> >> > it used are shot so to say. iirc some of the more fatal signals are
> >> > handled directly by the kernel.
> >
> >Kernel sends signals, no doubt.
> >
> >Then, who you think prints that "Killed" or "Segmentation fault"
> >messages in *stderr*?
> >[Hint: libc's default signal handler (man 2 signal).]
>
>
> Please enlighten us on how you plan to catch the uncatchable SIGKILL.
Here's question of getting information. Collecting information is
possible by `waitpid()' from parent process as Miquel noted.
That man above, gave me impression, that SIG_DFL can not be changed in
case of KILL and STOP signals, what yields to "The signals SIGKILL and
SIGSTOP cannot be caught or ignored." Implementation of such no-action
can be different. In case if kernel just stops processing of task with
STOP, breaks with KILL, without giving a chance to flush any pending data
OK, if this is an assembler prorgam with just data segment and no
infrastructure at all. But i think (didn't read anything), it is bad, if
there's libc with standard stream I/O buffers and no callback is possible.
>
> -`J'
> --
next prev parent reply other threads:[~2006-11-18 21:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-18 1:09 Folkert van Heusden
2006-11-18 1:26 ` Oleg Verych
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 [this message]
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
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=20061118215117.GA15686@flower.upol.cz \
--to=olecom@flower.upol.cz \
--cc=folkert@vanheusden.com \
--cc=jengelh@linux01.gwdg.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®