Skip to content

Skip machine-level hugepage fragmentation stats during OOM dumps. - #1040

Closed
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_981595248
Closed

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_981595248

Conversation

@copybara-service

Copy link
Copy Markdown

Skip machine-level hugepage fragmentation stats during OOM dumps.

Root Cause:
During OOM crash reporting in PrintStats(), TCMalloc_Internal_GetStats() is invoked with kStatsBufferSize = 16 KiB (>= 10,000 bytes), triggering DumpStats(printer, 2). DumpStats() unconditionally reads /sys/devices/system/node/node*/hugepage_fragmentation_ratio via GetHugepageFragmentationRatio(), contending on kernel zone->lock across concurrent processes and causing death test timeouts in logging_test and limit_test.

Reducing kStatsBufferSize to 8 KiB invokes DumpStats(printer, 1), and gating GetHugepageFragmentationRatio() behind level >= 2 avoids kernel sysfs reads during OOM crash dumps while retaining full fragmentation telemetry in MallocExtension::GetStats().

Root Cause:
During OOM crash reporting in PrintStats(), TCMalloc_Internal_GetStats() is invoked with kStatsBufferSize = 16 KiB (>= 10,000 bytes), triggering DumpStats(printer, 2). DumpStats() unconditionally reads /sys/devices/system/node/node*/hugepage_fragmentation_ratio via GetHugepageFragmentationRatio(), contending on kernel zone->lock across concurrent processes and causing death test timeouts in logging_test and limit_test.

Reducing kStatsBufferSize to 8 KiB invokes DumpStats(printer, 1), and gating GetHugepageFragmentationRatio() behind level >= 2 avoids kernel sysfs reads during OOM crash dumps while retaining full fragmentation telemetry in MallocExtension::GetStats().

PiperOrigin-RevId: 981595248
@copybara-service copybara-service Bot closed this Sep 21, 2026
@copybara-service
copybara-service Bot deleted the test_981595248 branch September 21, 2026 18:22
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.

1 participant