Re: [3.2-rc3] OOM killer doesn't kill the obvious memory hog

From: KAMEZAWA Hiroyuki
Date: Fri Dec 02 2011 - 00:46:26 EST


On Fri, 2 Dec 2011 14:31:48 +1100
Dave Chinner <david@xxxxxxxxxxxxx> wrote:

> So, it's a distro bug - sshd should never be started from from udev
> context because of this inherited oom_score_adj thing.
> Interestingly, the ifup ssh restart script says this:
>
> # We'd like to use 'reload' here, but it has some problems; see #502444.
> if [ -x /usr/sbin/invoke-rc.d ]; then
> invoke-rc.d ssh restart >/dev/null 2>&1 || true
> else
> /etc/init.d/ssh restart >/dev/null 2>&1 || true
> fi
>
> Bug 502444 describes the exact startup race condition that I've just
> found. It does a ssh server restart because reload causes the sshd
> server to fail to start if a start is currently in progress. So,
> rather than solving the start vs reload race condition, it got a
> bandaid (use restart to restart sshd from the reload context) and
> left it as a landmine.....
>

Thank you for chasing.
Hm, BTW, do you think this kind of tracepoint is useful for debugging ?
This patch is just an example.

==