Re: oom-reaper choosing wrong processes.

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

 



On Wed 20-07-16 09:33:37, Dave Jones wrote:
> On Wed, Jul 20, 2016 at 09:23:04AM -0400, Dave Jones wrote:
>  
>  >  > so this task has been already oom reaped and so oom_badness will ignore
>  >  > it (it simply doesn't make any sense to select this task because it
>  >  > has been already killed or exiting and oom reaped as well). Others might
>  >  > be in a similar position or they might have passed exit_mm->tsk->mm = NULL
>  >  > so they are ignored by the oom killer as well.
>  > 
>  > I feel like I'm still missing something.  Why isn't "wait for the already reaped trinity tasks to exit"
>  > the right thing to do here (as my diff forced it to do), instead of "pick even more victims even
>  > though we've already got some reaped processes that haven't exited"
>  > 
>  > Not killing systemd-journald allowed the machine to keep running just fine.
>  > If I hadn't have patched that out, it would have been killed unnecessarily.
> 
> nm, I figured it out. As Tetsuo pointed out, I was leaking a task struct,
> so those already reaped trinity processes would never truly 'exit'.

Leaked task_struct would leak some memory but they shouldn't have any
effect on the task visibility to the oom killer. Tasks are basically
visible until they are unhashed from the task_list. But the leak could
indeed have some other side effects - like pinning a lot of memory and
so the OOM kill wouldn't be sufficient to make a forward progress.

-- 
Michal Hocko
SUSE Labs

--
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]