systemd-coredump fails with "Failed to send coredump datagram: No buffer space available"
Issue
- We have a process with a large number of file descriptors open, systemd-coredump fails to capture core when this program crashes.
- strace of the coredump handler shows it sends core metadata into a Unix socket and runs out of room sending ~14 MiB of FD metadata:
connect(5, {sa_family=AF_UNIX, sun_path="/run/systemd/coredump"}, 24) = 0
sendmsg(5, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="MESSAGE_ID=...", iov_len=43}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 43
...
sendmsg(5, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="COREDUMP_OPEN_FDS=0:/dev/null\n...", iov_len=14917985}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = -1 ENOBUFS (No buffer space available)
- The journal contains the message:
systemd-coredump[PID]: Failed to send coredump datagram: No buffer space available
Environment
- Red Hat Enterprise Linux 9
- systemd-coredump
- Crashing application with millions of file descriptors (FDs)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.