Major Bug in Glibc malloc Is Killing Applications with a Memory Limit
thehftguy.com
thehftguy.com
> malloc() preallocates large chunks of memory, per thread
Memory that is preallocated this way counts towards the memory limit of a process. Interesting and definitely not obvious, but it's not a bug.
When an app is using 1 GB of memory but malloc reserves 10 GB, is it a bug? If it were the application doing it, it would be called a memory leak.
What when malloc reserves 50 GB slowly over one hour, is it enough to be a bug? (it can certainly do that given the right environment)
Either way, it's causing issues in things that try to measure memory usage like rlimit, schedulers, kubernetes, hadoop, etc...