memtester asks for memory, linux oom crashes computer
This bug report was converted into a question: question #623029: memtester asks for memory, linux oom crashes computer.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Opinion
|
Medium
|
Colin Ian King |
Bug Description
Hi,
I wanted to test my RAM, so I installed memtester.
On my machine with 2*4GB RAM, I typed in:
$ memtester 8GB 10
Immediately, the computer got frozen...
According to the docs (man page):
"memtester will malloc(3) the amount of memory specified, if possible. If this fails, it will decrease the amount of memory requested until it succeeds"
So, apparently, memtester succeeded reserving 8GB. I would be glad to understand how, since:
1. My machine just has that amount physically, but with the OS+other running software, only 5794044 bytes are free
2. I have set up some paranoïd configurations so that no user process can request more than 2GB:
$ ulimit -m
2097152
How is it possible that memtester did not got rejected by the OS when asking for more memory than available?
How is it possible that memtester did not got rejected by the user process's limits?
How to prevent memtester (and any other software) to crash my system by simply greedily asking for memory?
summary: |
- memtester crashes computer + memtester aks for memroy, linux oom crashes computer |
summary: |
- memtester aks for memroy, linux oom crashes computer + memtester asks for memroy, linux oom crashes computer |
affects: | memtester (Ubuntu) → linux |
Changed in linux: | |
assignee: | nobody → Colin Ian King (colin-king) |
affects: | linux → linux (Ubuntu) |
Changed in linux (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Invalid |
status: | Invalid → Opinion |
Stop all your other software, and retry. chvt 1 or ctrl-alt-f1, login, service lightdm stop, check with htop or ps what other processes use up so much memory.