sysctl: set kernel.core_pipe_limit=16
authorLennart Poettering <lennart@poettering.net>
Mon, 12 Oct 2020 14:31:42 +0000 (16:31 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 13 Oct 2020 07:31:13 +0000 (09:31 +0200)
commit2a9b9323cd844baae3229e9dba67e478bee70654
tree49a5e24ee8f175507dc05b21112f9ef10f363927
parent4b6f74f5a0943e0abfa8e6997811f8f7b7f00a15
sysctl: set kernel.core_pipe_limit=16

We need to make sure that our coredump pattern handler manages to read
process metadata from /proc/$PID/ before the kernel reaps the crashed
process. By default the kernel will reap the process as soon as it can.
By setting kernel.core_pipe_limit to a non-zero the kernel will wait for
userspace to finish before reaping.

We'll set the value to 16, which allows 16 crashes to be
processed in parallel. This matches the MaxConnections= setting in
systemd-coredump.socket.

See: #17301

(This doesn't close 17301, since we probably should also gracefully
handle if /proc/$PID/ vanished already while our coredump handler runs,
just in case people loclly set the sysctl back to zero. i.e. we should
collect what we can and rather issue an incomplete log record than
none.)
sysctl.d/50-coredump.conf.in