Core dump file is not generated
Make sure your current directory (at the time of crash -- server
may change directories) is writable. If the server calls setuid
, the directory has to be writable by that user.
Also check /proc/sys/kernel/core_pattern
. That may redirect core dumps to another directory, and that directory must be writable. More info here.
Core dumped, but core file is not in the current directory?
Read /usr/src/linux/Documentation/sysctl/kernel.txt.
core_pattern is used to specify a core dumpfile pattern name.
- If the first character of the pattern is a '|', the kernel will treat
the rest of the pattern as a command to run. The core dump will be
written to the standard input of that program instead of to a file.
Instead of writing the core dump to disk, your system is configured to send it to the abrt
(meaning: Automated Bug Reporting Tool, not "abort") program instead. Automated Bug Reporting Tool is possibly not as documented as it should be...
In any case, the quick answer is that you should be able to find your core file in /var/cache/abrt
, where abrt
stores it after being invoked. Similarly, other systems using Apport may squirrel away cores in /var/crash
, and so on.
Why Coredump files is not generating here?
kill -9
will not generate a core file. The command kill -l
gives a list of supported signals. kill -6
or kill -SIGABRT
should produce a core file. As well as most other signals such as kill -BUS
, kill -SEGV
, etc.
Coredump file not generated when changing user
nos was right about the security mechanism.
The solution was to add this after changing user:
prctl(PR_SET_DUMPABLE, 1, 0,0,0);
Now the coredump is generated.
core dump not generated
Are you certain the kernel on your embedded system supports core dumps? The feature can be disabled in the kernel build (ref), in which case you may have to fake it yourself using something like google-coredumper.
Related Topics
Understanding Linux /Proc/Pid/Maps or /Proc/Self/Maps
Difference Between Clock_Realtime and Clock_Monotonic
How to Automatically Redirect Http to Https on Apache Servers
How to Recursively Find All Files in Current and Subfolders Based on Wildcard Matching
What Does "&" At the End of a Linux Command Mean
How to Merge Two Files Using Awk
How to Change the Root Directory of an Apache Server
Sort a List With Lowercase First
Environment Variable Substitution in Sed
./Configure: /Bin/Sh^M: Bad Interpreter
How to Get Overall Cpu Usage (E.G. 57%) on Linux
What Is Rss and Vsz in Linux Memory Management
How to Permanently Set $Path on Linux/Unix
How to Pass Command Output as Multiple Arguments to Another Command
How to Remove Cached Credentials from Git
How to Compare Two Strings in Dot Separated Version Format in Bash
Assembly Segmentation Fault After Making a System Call, At the End of My Code