5

I have a Busybox/Linux system where a mystery program is segfaulting rarely. Is there a way to find which program is doing this?

Shawn J. Goff
  • 45,338
  • 25
  • 134
  • 145

2 Answers2

5

Uh, how do you know about the segfault anyway?

There is a kernel log message at priority info. It shows the executable name without the directory part. On some architectures, the debug.exception-trace sysctl must be set. Some architectures require a compile-time option and kernel command line parameter (e.g. CONFIG_USER_DEBUG and user_debug on arm).

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
3

If the segmentation fault produces a "core" file, you can run file <core-filename> to identify the executable. You can also use ddd or gdb to debug the core file for more information.

dogbane
  • 29,087
  • 16
  • 80
  • 60
  • I'm not getting core dumps, but I found [an article on enabling them](http://www.rt-embedded.com/blog/archives/enabling-core-dumps-in-embedded-systems/ "Enabling Core Dumps in Embedded Systems") – Shawn J. Goff Mar 18 '11 at 17:12