Disable core dump generation on #Linux

By | March 10, 2018

Generation of core dumps that result in freezing the Linux system is another common issue in the new Linux kernels discussed on many forum threads. Same as the bug of kswapd0 discussed here Kswapd0 going haywire this can become very annoying.

It seems that lately someone tries to add developer features turned on by default sabotaging the Linux kernel.

I mean really who needs predictive memory cleanup that in most of the cases freezes your system (see kswapd0 bug) !!!!
The same, who needs core dumps which are useful to the 0.00001% of Linux users that develop kernel modules. Core dumps that again can freeze or even completely crash your system aggravating a server problem instead of fixing it.

So to end my rage here is the guide to disable the broken core dump system from the kernel.

STEP 1
Set in /etc/systemd/system.conf

STEP 2
Set in /etc/systemd/coredump.conf

This steps will prevent systemd to write any core dump to the disk. Sadly they are still generated so a system crash due to the core dump can still occur. With the above steps we just avoid the system being locked due to the root partition being filled to the maximum by a huge core dump.

STEP 3
Set in /etc/security/limits.conf

The step will prevent core dumps, and since it is a “hard” limits, non-root programs can’t override it.

Note that root programs can still override this so that is why we need the first two steps to try to contain the horror 🙁

Do not forget to reboot to have the settings activated.

Contribute to this site maintenance !

This is a self hosted site, on own hardware and Internet connection. The old, down to earth way 🙂. If you think that you found something useful here please contribute. Choose the form below (default 1 EUR) or donate using Bitcoin (default 0.0001 BTC) using the QR code. Thank you !

€1,00

Advertisements

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.