Re: Dumb question: Why are exceptions such as SIGSEGV not logged

From: Valdis . Kletnieks
Date: Tue Aug 19 2003 - 10:08:29 EST


On Tue, 19 Aug 2003 09:54:17 +0300, Denis Vlasenko said:

> > char *j=NULL;
> > signal(SIGSEGV, SIG_DFL);
> > *j++;

> I disagree. _exit(2) is the most sensible way to terminate.

Not if you want it *dead*, *now*, with a core dump, and with minimal disruption
of program state. Sometimes (especially when trying to shoot a race condition)
you just can't run the program under gdb - and if it calls _exit() there's not much
wreckage left for gdb to look at....

> Logginh kernel-induced SEGVs and ILLs are definitely a help when you hunt
> daemons mysteriously crashing. This outweighs DoS hazard.

Well, I can *see* the fact it exited with a signal in 'lastcomm' already. If that's all
the info you're providing, it's of no help.

Now, if you figure out how to read the module's -g data and give me a line number
it died at:

kprint(DEBUG "Process %d (%s) died on signal %d at line %d of function %s", ....

but that would involve a lot of file I/O from kernelspace, soo.....

Attachment: pgp00001.pgp
Description: PGP signature