I used Ubuntu 14.04 a lot on server-side and see OOM-killer kicks in when there is a process that consumes too much memory. OOM-killer will kill it, and will log in syslog/dmesg about what it killed.
Currently, I'm using Ubuntu 16.04 on my notebook, every time the memory exhausted, the machine hang. I see the light for disk-working is on all the time after it. I waited for 15 mins but nothing happened so I have to hard-reboot the computer. No log in syslog since the incident.
This is my /var/log/syslog, the compute was hang around 12:15, then I turned off it and started at 13:12:54.
6979 Oct 16 12:15:20 fmlug systemd[1]: Starting Network Manager Script Dispatcher Service...
6980 Oct 16 12:15:20 fmlug consul[1113]: 2017/10/16 12:15:20 [DEBUG] agent: Service 'gitea' in sync
6981 Oct 16 12:15:20 fmlug consul[1113]: 2017/10/16 12:15:20 [DEBUG] agent: Node info in sync
6982 Oct 16 12:15:22 fmlug dbus[1048]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
6983 Oct 16 12:15:22 fmlug systemd[1]: Started Network Manager Script Dispatcher Service.
6984 Oct 16 12:15:22 fmlug nm-dispatcher: req:1 'dhcp4-change' [wlan0]: new request (1 scripts)
6985 Oct 16 12:15:22 fmlug nm-dispatcher: req:1 'dhcp4-change' [wlan0]: start running ordered scripts...
6986 Oct 16 13:12:54 fmlug rsyslogd: [origin software="rsyslogd" swVersion="8.16.0" x-pid="1031" x-info="http://www.rsyslog.com"] start
6987 Oct 16 13:12:54 fmlug kernel: [ 0.000000] Linux version 4.10.0-37-generic (buildd@lgw01-amd64-037) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6 ubuntu1~16.04.4) ) #41~16.04.1-Ubuntu SMP Fri Oct 6 22:42:59 UTC 2017 (Ubuntu 4.10.0-37.41~16.04.1-generic 4.10.17)
Info about my system
$ uname -a; free -m; sysctl -a 2>/dev/null | grep -E 'oom|swappiness'
Linux fmlug 4.10.0-37-generic #41~16.04.1-Ubuntu SMP Fri Oct 6 22:42:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
total used free shared buff/cache available
Mem: 3855 1559 609 144 1685 1819
Swap: 0 0 0
vm.oom_dump_tasks = 1
vm.oom_kill_allocating_task = 1
vm.panic_on_oom = 0
vm.swappiness = 60
I thought it might caused by swap, but actually I didn't setup any swap for the computer, and also, recently, I set vm.swappiness = 0, it was still hang.
vm.oom_kill_allocating_task = 1
was set to 0 (default Ubuntu 16.04), but after I set it to 1 (by sysctl, also in /etc/sysctld), nothing different.
Is there a known bug or what was setup wrongly that made OOM killer do not work?