Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Coredump files is not generating here?

I have a situation here, a few days back I was able to see a core- dump file on my target board, I have enabled the core-dump generation by adding "ulimit -c unlimited" to my /etc/profile.

But then someone told me, this will only take affect for program launched from a login shell, not for processes/services started by systemd, etc. and the ulimits are set at another location.

So I changed /etc/limits file and added ulimit -c unlimited line, but still I could not see core-dump file.

I am running kill -9 $$ to generate segmentation fault and it in turn will generate core-dump file as it was doing earlier.

We tried changing "/proc/sys/kernel/core_pattern" file and running ulimit -c unlimited explicitly but this was not enough.

Where we are going wrong?

like image 844
Amit Singh Tomar Avatar asked Oct 15 '25 03:10

Amit Singh Tomar


1 Answers

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.

like image 96
artless-noise-bye-due2AI Avatar answered Oct 17 '25 06:10

artless-noise-bye-due2AI



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!