[systemd-devel] Skipping temporary coredump file during coredump generation

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sat Dec 3 18:16:15 UTC 2016


On Fri, Dec 02, 2016 at 05:53:59PM +0000, P.R.Dinesh wrote:
> During coredump generation I could find a temporary uncompressed file
> getting generated from the corefile and written to the harddisk, later this
> file is getting compressed (if compression was enabled) and then the file
> coredump file is stored and this temporary file is removed.

We write the uncompressed file to disk to generate the backtrace.
If we aren't doing that, we can just compress on-the-fly.

> I have a process whose memory consumption is typically around 5GB, it
> generates around 13GB of uncompressed coredump ( coredump_filter = 0x33).
> Later this file is compressed to 20MB and the uncompressed file is removed.
> I have set the
> ProcessSizeMax=16GB
> ExternalSizeMax= 16GB
> But sometimes my disk doesn't have sufficient space to store this temporary
> file, hence systemd-coredump aborts the coredump processing.
> 
> Is it possible to skip this temporary file generation and generate the
> compressed file directly from the Corefile passed through STDIN?

We could be smarter, and if we see that there isn't enough disk space
to store the uncompressed core file, skip this step, and immediately
try to write compressed data. I don't know how complicated that would be:
we write the core either to the file or to the journal, so the code is 
pretty complicated. Patches are welcome ;)

Zbyszek


More information about the systemd-devel mailing list