Re: Catch SIGSEGV from Linux kernel



"F.Julien" <stopspam@xxxxxxxxxxxx> writes:
I'd like to catch all processes that end because of a segmentation
fault. My goal is to print a kernel log when a process exit in that
case.

ARM Linux has a configuration option named CONFIG_DEBUG_USER
doing does exaclty that, which I have found very helpful to debug
applications. Maybe looking at this code could help with implementing
something similar for other architectures.

I did look into the kernel code and the only solution I found is to
patch the function "send_signal" (file kernel/signal.c).
I did also search on google an existing kernel patch but I only found
a very old patch for 2.2 kernel. I'm surprised that nobody wants to
monitor this (especially sysadmin).

Generally, people have no clue why a particular application would
segfault, except "that it just does this" and they would prefer this
effect to be as clandestine as possible, lest someone could actually
expect them to fix it (instead of 'working on exciting new features').

NB: That's an imputation, but not much of it. The 'established,
sensible way' of application development, ie use as much third party
code as humanly possible, whose actual interactions nobody
understands, pretty much leaves no other options.
.



Relevant Pages

  • Re: Wine 20041201 on FreeBSD 5.3-RELEASE
    ... (I apologize for replying to jason henson rather than the list; ... >> patch, rebuilt, and installed my kernel, and I continue to get the ... As I said in my original post, my ports tree was updated the day ... have tried both with and without the kernel patch, ...
    (freebsd-questions)
  • 2.6.17.9 new perfmon code base, libpfm, and pfmon packages
    ... I have released another version of the perfmon new code base package. ... This version of the kernel patch is relative to 2.6.17.9. ...
    (Linux-Kernel)
  • Re: Best Solaris 9 Firewall
    ... > and kernel patch level you are running, ... IPFilter wouldn't even fire up. ... Finally, when the next kernel patch rev came out, I MCPed the system ... powerful extra fans, more powerful & newer power supply and newer disks ...
    (comp.unix.solaris)
  • Re: [PATCH 2.6.21] udf: Decrement correct link count in udf_rmdir
    ... instead of the link count on its parent directory. ... kernel messages similar to: ... First attempt at formally submitting a kernel patch - apologies if I've cocked ...
    (Linux-Kernel)
  • Re: [announce] iptables + rrdtool
    ... > I have not had a chance to go over the kernel patch, ... > Is there a better way to access the accumulators and counters than ... collecting data via the proc interface is an alternative but we felt that ...
    (Fedora)