2

I have a arm executable[ (Debug build) ELF 32 bit LSB executable, ARM version (SYSV)] process executing on ARM Cortex A9 target having Linux OS(KErnel 2.6.38.8 )

The process has user id root groupid root

Even when the process crashes after getting SIGSEGV, there is no core file generated. Now I have read this question to ensure it has file system is writable, ulimit -c is unlimited, user is root and has permissions, but still something is missing.

Here are few outputs of certain varaibles of my process and system, related to a core file creation :

cat /proc//coredump_filter is 00000033

cat /proc/sys/kernel/core_pattern is core

cat /proc/sys/kernel/core_uses_pid is 0

I have tried everything but stumped.

Could there be any kernel config/build option disabling the core creation?

Any other pointers?

EDIT: I did simple test as below and it created a core file, but my process crash still does not dump core file.

sleep 20 &
killall -SIGSEGV sleep
Community
  • 1
  • 1
goldenmean
  • 18,376
  • 54
  • 154
  • 211
  • Why do you think your process has *crashed*? If it catches a signal, then a **core** file will not be generated. Try adding an `atexit()` or other hook. You can wrap your code in a shell script to verify if it exits *normally* or not. – artless noise Oct 17 '13 at 17:47
  • Because I see it receiving SIGSEGV, and there is no signal handler set for that as i know it. – goldenmean Oct 18 '13 at 16:09
  • How do you *see it receiving*? Via a debugger, with `strace`, or some other way? Whatever tool you are using may circumvent the *core* generation. – artless noise Oct 18 '13 at 18:53
  • @artless noise There is no tool or debugger attached. Just on the console , i see that process receiving SIGSEGV. – goldenmean Oct 21 '13 at 20:50

1 Answers1

1

Could there be any kernel config/build option disabling the core creation?

It is hidden under General Setup|Embedded System or General Setup|Configure standard... depending on your Linux version. The symbol value is ELF_CORE and it is in init/Kconfig. If it is not enabled, you will never get core dumps.

As suggested in a hidden comment in why coredump file is not generated.

Community
  • 1
  • 1
artless noise
  • 21,212
  • 6
  • 68
  • 105
  • Thanks. My Linux kernel on ARM target has no /usr/src or /boot to check config file to see what it was configured with. In that case how can I check what all options the kernel was configured with? Sorry what are these options - "General Setup|Embedded System or General Setup|Configure standard." – goldenmean Oct 18 '13 at 16:35
  • The menus I gave are Linux *kernel* configuration menus, where *top-menu|sub-menu* is fairly standard as to where to find the menu. However, as your edit shows you are able to generate a *core*, this is not your problem (but was part of your question). Some Linux configurations include the config in */proc/config.gz*. As well, this maybe a module which is even better as it takes no space in memory. However, you know you have it set as you can generate a *core* file. – artless noise Oct 18 '13 at 18:50
  • So then any further pointers why core is not getting created on this process? – goldenmean Oct 21 '13 at 20:51
  • `ulimit` must be set to allow them. – artless noise Aug 05 '15 at 13:14