Bug 201673 - Userspace dies when TMPFS overcommits memory
Summary: Userspace dies when TMPFS overcommits memory
Status: RESOLVED WILL_NOT_FIX
Alias: None
Product: Memory Management
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 blocking
Assignee: Andrew Morton
URL:
Keywords:
Depends on: 190151 201675
Blocks:
  Show dependency tree
 
Reported: 2018-11-12 22:09 UTC by Artem S. Tashkinov
Modified: 2021-12-30 20:27 UTC (History)
1 user (show)

See Also:
Kernel Version: GIT
Subsystem:
Regression: No
Bisected commit-id:


Attachments

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.

Note You need to log in before you can comment on or make changes to this bug.