Skip to content

Fix buffer manager causing huge core dumps and hung processes on SIGSEGV#665

Merged
adsharma merged 1 commit into
mainfrom
fix/madvise-dontdump
Jul 8, 2026
Merged

Fix buffer manager causing huge core dumps and hung processes on SIGSEGV#665
adsharma merged 1 commit into
mainfrom
fix/madvise-dontdump

Conversation

@adsharma

@adsharma adsharma commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Fixes: #664

Call madvise(..., MADV_DONTDUMP) on the buffer pool's virtual address reservation right after mmap, so the kernel skips this sparse multi-TB range during core dump generation.

Without this, when a ladybug process crashes with coredumps enabled (the default on many distros via systemd-coredump/apport), the kernel walks the entire reservation in the dump path, turning every SIGSEGV into an unkillable process stuck at 100% CPU for 10+ minutes.

MADV_DONTDUMP is available on Linux >= 3.4. macOS has no equivalent, so the call is guarded by #ifdef MADV_DONTDUMP.

…EGV (#664)

Call madvise(..., MADV_DONTDUMP) on the buffer pool's virtual address
reservation right after mmap, so the kernel skips this sparse multi-TB
range during core dump generation.

Without this, when a ladybug process crashes with coredumps enabled
(the default on many distros via systemd-coredump/apport), the kernel
walks the entire reservation in the dump path, turning every SIGSEGV
into an unkillable process stuck at 100% CPU for 10+ minutes.

MADV_DONTDUMP is available on Linux >= 3.4. macOS has no equivalent,
so the call is guarded by #ifdef MADV_DONTDUMP.
@adsharma adsharma force-pushed the fix/madvise-dontdump branch from ebfd874 to 9419289 Compare July 8, 2026 05:36
@adsharma adsharma merged commit 4ff9dbd into main Jul 8, 2026
3 checks passed
@adsharma adsharma deleted the fix/madvise-dontdump branch July 8, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Buffer-pool virtual reservation should be marked MADV_DONTDUMP — coredumps of a crashed process try to dump ~8 TB of sparse address space

1 participant