[LTP] [BUG] oom hangs the system, NMI backtrace shows most CPUs in shrink_slab
Jan Stancek
jstancek@redhat.com
Tue Jan 26 08:48:01 CET 2016
On 01/22/2016 04:14 PM, Jan Stancek wrote:
> On 01/19/2016 11:29 AM, Tetsuo Handa wrote:
>> although I
>> couldn't find evidence that mlock() and madvice() are related with this hangup,
>
> I simplified reproducer by having only single thread allocating
> memory when OOM triggers:
> http://jan.stancek.eu/tmp/oom_hangs/console.log.3-v4.4-8606-with-memalloc.txt
>
> In this instance it was mmap + mlock, as you can see from oom call trace.
> It made it to do_exit(), but couldn't complete it:
I have extracted test from LTP into standalone reproducer (attached),
if you want to give a try. It usually hangs my system within ~30
minutes. If it takes too long, you can try disabling swap. From my past
experience this usually helped to reproduce it faster on small KVM guests.
# gcc oom_mlock.c -pthread -O2
# echo 1 > /proc/sys/vm/overcommit_memory
(optionally) # swapoff -a
# ./a.out
Also, it's interesting to note, that when I disabled mlock() calls
test ran fine over night. I'll look into confirming this observation
on more systems.
Regards,
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oom_mlock.c
Type: text/x-csrc
Size: 1974 bytes
Desc: not available
URL: <http://lists.linux.it/pipermail/ltp/attachments/20160126/f54f7c7b/attachment.c>
More information about the Ltp
mailing list