I wrote a sample program with kill(pid, SIGABRT), but the process which receives SIGABRT does not create
any core dump. How can I get the core dump file by sending SIGABRT signal?
yes set the core dump file limit as unlimited by using
ulimit -c unlimited
And also check the path of core dump generation, normally the core dump is generated in the current directory of the process but by giving the path in /proc/sys/kernel/core_pattern you can change the path and name of core generation, something like below
echo /var/log/mycore > /proc/sys/kernel/core_pattern
now the core would be generated as /var/log/mycore.pid.
Please also refer the man core, if you still don't see the core then send us the output of below command
cat /proc/sys/kernel/core_pattern
You can also have a look in http://yusufonlinux.blogspot.com/2010/11/debugging-core-using-gdb.html
You need to set the core dump ulimit to something above zero before running the process that you want to abort:
ulimit -c unlimited
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With