[systemd-devel] How to suppress coredumps when systemd-coredump is in use?

Robert O'Callahan robert at ocallahan.org
Thu Jan 7 20:31:15 PST 2016


http://rr-project.org has a test suite which runs a lot of programs that
intentionally crash with core-dumping signals. I added "ulimit -c 0" to the
test suite to suppress those core dumps, but I discovered that doesn't work
when systemd has set /proc/sys/kernel/core_pattern to
"|/usr/lib/systemd/systemd-coredump". (Apparently the kernel ignores that
rlimit when a coredump is piped to a process.) So thousands of files get
stashed in /var/lib/systemd/coredump every time the test suite runs :-(.

Is there any way to avoid this on my side or systemd's? Making it
impossible to disable coredumps seems bad. Maybe systemd could query the
dumping process's RLIMIT_CORE with prlimit() and throw the coredump away if
the limit is 0. Obvoiusly I could modify /proc/sys/kernel/core_pattern but
I'd like a solution that works for everyone without messing with their
system configuration.

Rob
--
lbir ye,ea yer.tnietoehr  rdn rdsme,anea lurpr  edna e hnysnenh hhe uresyf
toD
selthor  stor  edna  siewaoeodm  or v sstvr  esBa  kbvted,t
rdsme,aoreseoouoto
o l euetiuruewFa  kbn e hnystoivateweh uresyf tulsa rehr  rdm  or rnea
lurpr
.a war hsrer holsa rodvted,t  nenh hneireseoouot.tniesiewaoeivatewt sstvr
 esn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20160108/86821595/attachment.html>


More information about the systemd-devel mailing list