Bug 190151

Summary: OOM Killer don't kill processes when using tmpfs for /tmp and no swap
Product: Memory Management Reporter: Илья Индиго (ilya)
Component: OtherAssignee: Andrew Morton (akpm)
Status: NEW ---    
Severity: normal CC: mihail.zenkov, mikhail.v.gavrilov
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 4.8.13 Tree: Mainline
Regression: No
Bug Depends on:    
Bug Blocks: 201673    

Description Илья Индиго 2016-12-12 17:35:58 UTC
openSUSE Tumbleweed x86_64 | kernel 4.8.13-default | 4GB RAM

I have no swap, and I use tmpfs for /tmp with limit 2GB (half from 4GB).
Using commands archive "7z a -mx=9" or compilation "make -j4" cause a sharp intake of RAM, and sometimes, when I forget to unload heavy applications such as firefox, qBittorrent and skype, especially before "make -j4", my memory ends and OOM Killer It does not work automatically. Manual only (Alt+SysRq+F). Tmpfs share is less than 10%. And even if the lower limit of /tmp to a minimum, the auto it still does not work, manually only.

As far as I understand the situation, the contents of tmpfs is celebrated as the "cached". At the end of the contents of memory tmpfs displaced in the swap. If the swap is disabled or is not enough for the entire contents of a tmpfs, the OOM Killer will not work, as it sees that there are still cached and he is waiting for his ousting from memory.

In my opinion this is wrong behavior, because all system tmpfs swamping more than free the swap, will be subject to a similar problem.
Comment 1 Artem S. Tashkinov 2019-08-06 16:16:25 UTC
Related bug 201673.