Core dumps are often very sparse, containing large zero-filled regions whose actual disk usage can be significantly reduced by preserving holes. Previously, decompress_stream() always wrote dense output, expanding all zero regions into allocated disk blocks. Each decompression backend (xz, lz4, zstd) now auto-detects whether the output fd is suitable for sparse writes via a shared should_sparse() helper. The check requires both S_ISREG (regular file) and !O_APPEND, since O_APPEND causes write() to ignore the file position set by lseek(), which would collapse the holes and corrupt the output. For pipes, sockets, and append-mode files, dense writes are preserved via loop_write_full() with USEC_INFINITY timeout, matching the original behavior. After sparse decompression, finalize_sparse() sets the final file size to account for any trailing holes. This is transparent to callers — all public signatures are unchanged. coredumpctl benefits automatically: - coredumpctl debug: temp file in /var/tmp is now sparse - coredumpctl dump -o file: output file is now sparse - coredumpctl dump > file: redirected stdout is now sparse - coredumpctl dump | ...: pipe output unchanged (dense) - coredumpctl dump >> file: append mode, falls back to dense Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com> Co-developed-by: Codex (GPT-5) <noreply@openai.com>
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list, join our IRC channel #systemd on libera.chat or Matrix channel
Stable branches with backported patches are available in the stable repo.
We have a security bug bounty program sponsored by the Sovereign Tech Fund hosted on YesWeHack
Repositories with distribution packages built from git main are available on OBS, and also repositories with packages built from the latest stable release
