[lkml]   [2012]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] oom: add sysctl to enable slab memory dump
On Thu, 23 Feb 2012, Josef Bacik wrote:

> I requested this specifically because I was oom'ing the box so hard that I
> couldn't read /proc/slabinfo at the time of OOM and therefore had no idea what I
> was leaking. Telling me how much slab was in use was no help, I needed to know
> which of the like 6 objects I was doing horrible things with was screwing me,
> and without this patch I would have no way of knowing.

So an oom was creating a denial of service so that you had no way to do
cat /proc/slabinfo? I think we should talk about this first, because
that's a serious situation that certainly shouldn't be happening.

The oom killer is designed to kill the most memory-hogging task available
so that it doesn't have to kill multiple threads. Why was the memory not
being freed or why was the thread that was consistently being killed
restarted time and time again so you couldn't even cat a file?

> Sure, if the OOM killer doesn't kill the poller, or kill NetworkManager since
> I'm remote logged into the box, or any of the other various important things
> that would be required for me to get this info. Thanks,

If you're polling for oom notifications sanely, you'd probably have set

echo -1000 > /proc/pid/oom_score_adj

so it's unkillable as well as anything else you need to diagnose failures.
NetworkManager itself isn't protected like this by default, but it
shouldn't be killed unless it is leaking memory itself: we kill in the
order of the most memory usage to the least.

So neither of these are reasons to not collect /proc/slabinfo, but I'm
very interested in your follow-up to why you can't do so when "ooming the
box so hard" where you're presumably able to cat to kernel log file but
not cat /proc/slabinfo :)

 \ /
  Last update: 2012-02-24 00:11    [W:0.077 / U:1.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site