|Main Archive Page > Month Archives > openssh-unix-dev archives|
On Mon, May 30, 2011 at 10:32:24PM +0100, Cal Leeming [Simplicity Media Ltd] wrote:
> So, it turns out that it is actually OpenSSH which is broken, after
I would not second this. To me, this very much looks like:
> On 30/05/2011 21:56, Cal Leeming [Simplicity Media Ltd] wrote:
> > Just did some testing..
> >root@vicky:~# cat /var/log/auth.log | grep "Set"
> >May 30 21:41:05 vicky sshd: Set /proc/self/oom_adj from -17 to -17
> >May 30 21:41:07 vicky sshd: Set /proc/self/oom_adj to -17
... it's reading out the old value, saving it, setting it to "-17" (for
the sshd listener process, that one is not to be killed), and later on
*restoring* the old value (for all child processes). See the comments
The log messages look weird because the value is -17 already when sshd
starts - so it's adjusting "-17 to -17" and later on "restoring -17" -
looks stupid, but that's computers for you. But what it tells you is
that the value isn't set by sshd to "-17" but that sshd inherited that
from whoever started it.
The question here is why sshd is sometimes started with -17 and sometimes
with 0 - that's the bug, not that sshd keeps what it's given.
(Ask yourself: if sshd had no idea about oom_adj at all, would this make
it buggy by not changing the value?)
Anyway, as a workaround for your system, you can certainly set
oom_adj_save = 0;
in the beginning of port-linux.c / oom_adjust_restore(), to claim that
"hey, this was the saved value to start with" and "restore" oom_adj to 0
then - but that's just hiding the bug, not fixing it.
-- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany firstname.lastname@example.org fax: +49-89-35655025 email@example.com _______________________________________________ openssh-unix-dev mailing list firstname.lastname@example.org https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev