Comment 1 for bug 390556

Revision history for this message
Karsten Suehring (suehring) wrote :

I have done some more investigations on the issue. I found that the original debian patch still exists in sshd.

The problem is caused by the DHCP initialization of my network interface during startup. The DHCP request is processed in the background while the OpenSSH initialization script (and others) are already run. When the interface comes up,

/etc/network/if-up.d/openssh-server

is run. This scrips restarts sshd using the initialization script.

The problem is that the openssh-server script is run with oom_adj equal to -17. Thus sshd saves -17 as the target oom_adj value for all child processes and it appears as if the value would not be reset at all.

I would suggest adding the following line to /etc/network/if-up.d/openssh-server just before /etc/init.d/sshd restart is invoked:

echo 0 > /proc/self/oom_adj

Please consider adding this fix.