memtester asks for memory, linux oom crashes computer
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?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu linux Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
This question was originally filed as bug #1679740.
Can you help with this problem?
Provide an answer of your own, or ask G.M. for more information if necessary.