kernel panic_ System is deadlocked on memory
From: Xianying Wang
Date: Thu Apr 16 2026 - 05:01:13 EST
Hi,
I observed a behavior related to vm.min_free_kbytes.
On a recent kernel (e.g., 7.0.0-rc2), writing a sufficiently large
value to /proc/sys/vm/min_free_kbytes (e.g., hundreds of MB) can
quickly drive the system into persistent allocation failures, even
when there is still a significant amount of free memory.
Minimal trigger:
echo 537178504 > /proc/sys/vm/min_free_kbytes
After this, the system starts to report repeated page allocation failures
from kswapd, for example:
kswapd0: page allocation failure: order:0, mode:...
...
__alloc_pages_slowpath
...
folio_alloc_swap
...
alloc_swap_scan_list
In my testing, this also leads to SLUB allocation failures
(e.g.,swap_table cache) and eventually triggers the OOM killer,
although free memory is still available according to /proc/meminfo.
>From inspection, it seems that setting vm.min_free_kbytes to a large
value significantly raises zone watermarks, which may cause the
allocator to reject requests even when the system is not truly out of
memory.
This was originally observed during fuzzing experiments, but the
behavior appears reproducible with the simple sysctl write shown
above.
This can be reproduced on:
HEAD commit:
report: https://pastebin.com/raw/UZtWdqZG
kernel config : https://pastebin.com/raw/1grwrT16
C reproducer :https://pastebin.com/raw/PGLH2Eqf
Let me know if you need more details or testing.
Best regards,
Xianying