Bug 201673

Summary: Userspace dies when TMPFS overcommits memory
Product: Memory Management Reporter: Artem S. Tashkinov (aros)
Component: OtherAssignee: Andrew Morton (akpm)
Status: RESOLVED WILL_NOT_FIX    
Severity: blocking CC: torvalds
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: GIT Tree: Mainline
Regression: No
Bug Depends on: 190151, 201675    
Bug Blocks:    

Description Artem S. Tashkinov 2018-11-12 22:09:44 UTC
Steps to reproduce:

1) Disable SWAP (in case you have it and to simplify testing)
2) Have some of your RAM taken by running heavy applications (Firefox/Chrome/IDEs/etc.)
3) Create a file in TMPFS > $free_available_ram
4) See your userspace die

I'm curious why in this situation the kernel starts doing _massive_ amounts of disk IO - I don't even understand what's being read or written since SWAP is disabled, and all applications are in RAM doing pretty much nothing.

Also for some reasons OOM doesn't kick in and the only way to unfreeze your PC is to forcefully reboot it or to continuously press SysRq + F until enough applications get killed.
Comment 1 Artem S. Tashkinov 2021-12-30 20:27:37 UTC
The Linux kernel memory management could be a whole lot better, but at least we have things like earlyoom and systemd-oomd.