Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/storage/buffer_manager/vm_region.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ VMRegion::VMRegion(PageSizeClass pageSizeClass, uint64_t maxRegionSize) : numFra
throw BufferManagerException(
"Mmap for size " + std::to_string(getMaxRegionSize()) + " failed.");
}
#ifdef MADV_DONTDUMP
// Tell the kernel not to include this virtual reservation in core dumps.
// Without this, the kernel walks the entire (potentially multi-TB) sparse
// reservation during crash dump generation, turning every SIGSEGV into an
// unkillable process stuck at 100% CPU in the dump path for minutes.
// MADV_DONTDUMP is available on Linux >= 3.4; macOS has no equivalent.
madvise(region, getMaxRegionSize(), MADV_DONTDUMP);
#endif
#endif
}

Expand Down
Loading