=== Elimin8r is now known as Elimin8er === lfaraone_ is now known as lfaraone [08:52] hi.. is there any way to enable an OOM killer on ubuntu? [08:52] It is very annoying to have to turn the PC off at the wall [08:53] it's enabled by default afaik [08:53] hyperair, it really doesn't seem to be in practice [08:54] you probably have too much swap [08:54] it hangs, right? [08:54] hyperair, ah.. [08:54] basically it needs time to fill up the swap, and thrash about for a bit [08:54] it is thrashing exactly [08:54] only when it can't allocate more memory does it trigger OOM [08:54] as long as there's more swap, it can allocate more memory [08:54] and thrash some more [08:54] oh.. I want it to kill the process when it is thrashing which I see is a different problem [08:54] yeah that's a different problem [08:54] because the thrashing is unkillable in effect [08:54] i think you can play with overcommit ratio or something [08:55] well [08:55] as I can't even get to a terminal to type "kill" [08:55] depending on the size of your swap, you can actually just wait it out [08:55] i've let a thrashing machine sit for 30 minutes, and it fixed itself [08:55] hyperair, I think that's potentially forever [08:55] most of the time i don't have the patience and cut the power though [08:55] or start hammering the sysrq keys [08:55] ah [08:55] hyperair, if I have a process which takes 1 hour normally and starts thrashing [08:55] AH [08:55] yes [08:55] I could be waiting for years [08:55] there's a sysrq key that triggers the OOM killer [08:55] oh! [08:56] https://en.wikipedia.org/wiki/Magic_SysRq_key [08:56] alt+sysrq+f [08:56] you need to enable it though [08:56] interesting [08:56] see /etc/sysctl.d/10-magic-sysrq.conf [08:56] how do you get sysrq? It is in small letters on the prt sc key [08:56] yeah [08:57] oh I need to enable it [08:57] start by trying to get hitting alt+sysrq+h. i think that dumps a help message into dmesg [08:57] it tried to take a screenshot :) [08:57] let me try alt+shift [08:57] lol [08:57] i actually use the prtsc key [08:57] alt+prtsc+whatever [08:58] i disabled the screenshot taking though [08:58] it just tries to take a screenshot [08:58] you may or may not need the fn key on a laptop [08:59] it's a desktop [08:59] right [08:59] [ 823.370296] SysRq : This sysrq operation is disabled. [08:59] hah [08:59] so that's something :) [08:59] that's something, yes [09:00] see the file i mentioned [09:00] it's disabled by default because an attacker trying his/her luck might get lucky and kill the screensaver process without killing X [09:01] it says kernel.sysrq = 176 [09:01] which should be allow reboot/poweroff, enable remount read-only, enable sync command [09:01] how do you enable it if not in that file? [09:02] sysctl kernel.sysrq=whatever [09:02] as root [09:02] hyperair, so what role that does file play? [09:02] does that [09:02] default sysctl setting [09:03] I mean /etc/sysctl.d/10-magic-sysrq.conf [09:03] for making it persistent across reboots [09:03] what I mean is.. why isn't it enabled given that it is currentluy 176 [09:03] sysctl changes kernel parameters. that usually lasts until you reboot [09:03] oh [09:03] well [09:03] i dunno [09:03] what does "sysctl kernel.sysrq" say? [09:03] I should say I have an unmodified ubuntu install [09:04] sysctl kernel.sysrq [09:04] kernel.sysrq = 176 [09:04] i think it just allows a certain number of functions [09:04] oh i see [09:04] here's mine: [3277566.690317] sysrq: SysRq : HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) force-fb(V) show-blocked-tasks(w) dump-ftrace-buffe [09:04] r(z) [09:04] what do you get from sysctl kernel.sysrq ? [09:05] 1 [09:05] ok done [09:07] I really need a way to do alt-sys rq+h without it taking a screenshot! [09:08] aha! [09:08] alg gr+prt sc+h does it [09:08] alt gr I mean [09:08] [ 1540.531549] SysRq : HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) force-fb(V) show-blocked-tasks(w) dump-ftrace-buffer(z) [09:08] success [09:09] so what one would kill the task that is thrashing? [09:09] which one [09:18] hyperair, thanks for you help [12:48] Are the kernel Git repos hosted over https somewhere? [13:14] Eduard_Munteanu, checking [13:15] Eduard_Munteanu, yes, https:// is one of the options: https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/xenial [13:18] apw, thanks [13:18] Any reason kernel.ubuntu.org doesn't support it, btw? [13:18] * Eduard_Munteanu should file a bug perhaps [13:23] Eduard_Munteanu, likely because the machine was old and slow [13:23] Eduard_Munteanu, the launchpad repos are going to become the official ones before long in all likelyhood [13:24] Ah, nice. [13:24] as that infrastructure is much more load tollerant [13:31] Eduard_Munteanu, for xily and xenial LP is alreday master, and all others are sync'd up to LP every 15m or so [13:32] Cool. === alai888 is now known as alai === caribou_ is now known as caribou === dkessel_ is now known as dkessel === jdstrand_ is now known as jdstrand