Re: oom-reaper choosing wrong processes.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2016/07/19 8:18, Dave Jones wrote:
> Whoa. Why did it pick systemd-journal ?

I guess that it is because all trinity processes' mm already had MMF_OOM_REAPED set.

The OOM reaper sets MMF_OOM_REAPED when OOM reap operation succeeded. But
"[ pid ]   uid  tgid total_vm      rss nr_ptes nr_pmds swapents oom_score_adj name" listing
includes processes whose mm already has MMF_OOM_REAPED set. As a result, trinity-c15 and
trinity-c4 are shown again in the listing. While I can't confirm that trinity-c10, trinity-c2,
trinity-c0 and trinity-c11 are already OOM killed, I guess they are already OOM killed and
their mm already had MMF_OOM_REAPED set.

> My 'skip over !trinity processes' code kicks in, and it then kills the right processes, and the box lives on,
> but if I hadn't have had that diff, the wrong process would have been killed.

As of Linux 4.7, processes whose mm already has MMF_OOM_REAPED can be selected for many
times due to not checking MMF_OOM_REAPED when using task_will_free_mem() shortcut in
out_of_memory(). (It will be fixed in Linux 4.8.) That is, I guess that your system had
already hit

  panic("Out of memory and no killable processes...\n")

if trinity processes with MMF_OOM_REAPED mm were not selected again and again.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]