OK, turing.

<- leave blank

Sun Apr 5 19:17:28 EDT 2020

diff -r ed9a8f50c08f sys/src/9/pc/mmu.c
--- a/sys/src/9/pc/mmu.c Sun Apr 05 03:46:47 2020 +0200
+++ b/sys/src/9/pc/mmu.c Mon Apr 06 01:17:28 2020 +0200
@@ -524,8 +524,7 @@
			panic("mmuwalk2: va %luX entry %luX", va, *table);
		if(!(*table & PTEVALID)){
			map = rampage();
- if(map == nil)
- panic("mmuwalk: page alloc failed");
+ memset(map, 0, BY2PG);
			*table = PADDR(map)|PTEWRITE|PTEVALID;
		}
		table = KADDR(PPN(*table));


Sun Apr 5 18:23:29 EDT 2020
diff -r ed9a8f50c08f sys/src/9/pc/memory.c
--- a/sys/src/9/pc/memory.c Sun Apr 05 03:46:47 2020 +0200
+++ b/sys/src/9/pc/memory.c Mon Apr 06 00:23:28 2020 +0200
@@ -470,6 +470,9 @@
	 */
	if(e820scan() < 0)
		ramscan(MemMin, -((uintptr)MemMin), 4*MB);
+
+ print("after meminit0:\n");
+ memmapdump();
 }

 /*
@@ -523,5 +526,6 @@
			break;
	}

- if(0) memmapdump();
+ print("after meminit():\n");
+ memmapdump();
 }


Sun Apr 5 08:39:33 EDT 2020
root@debian:~# find /usr | grep earlyoom
/usr/lib/systemd/system/earlyoom.service
/usr/share/man/man1/earlyoom.1.gz
/usr/share/doc/earlyoom
/usr/share/doc/earlyoom/copyright
/usr/share/doc/earlyoom/changelog.Debian.gz
/usr/share/doc/earlyoom/README.md.gz
/usr/bin/earlyoom
/usr/local/bin/earlyoom
root@debian:~#
root@debian:~#
root@debian:~#
root@debian:~# cat /usr/share/doc/earlyoom/copyright
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/


Sun Apr 5 08:09:56 EDT 2020
/usr/lib/systemd/system/nohang-desktop.service
/usr/lib/systemd/system/nohang.service
/usr/share/licenses/nohang
/usr/share/licenses/nohang/LICENSE
/usr/share/man/man1/nohang.1.gz
/usr/share/doc/nohang
/usr/share/doc/nohang/CHANGELOG.md
/usr/share/doc/nohang/README.md
/usr/bin/nohang
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# find /usr | grep earlyoom
/usr/lib/systemd/system/earlyoom.service
/usr/share/licenses/earlyoom
/usr/share/licenses/earlyoom/LICENSE
/usr/share/man/man1/earlyoom.1.gz
/usr/share/doc/earlyoom
/usr/share/doc/earlyoom/README.md
/usr/bin/earlyoom


Sun Apr 5 04:02:33 EDT 2020
generic max = {a : @t, b : @t :: numeric @t
    if a > b
	-> a
    else
	-> b
    ;;
}


Sun Apr 5 03:10:26 EDT 2020
$ earlyoom -n
earlyoom v1.5-4-gab946ee
Notifying through D-Bus
mem total: 3946 MiB, swap total: 0 MiB
sending SIGTERM when mem <= 10.00% and swap <= 10.00%,
	SIGKILL when mem <= 5.00% and swap <= 5.00%
mem avail: 2917 of 3946 MiB (73.92%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 2917 of 3946 MiB (73.92%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 2917 of 3946 MiB (73.92%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 2917 of 3946 MiB (73.92%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 2916 of 3946 MiB (73.90%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 2916 of 3946 MiB (73.90%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 2916 of 3946 MiB (73.89%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 2916 of 3946 MiB (73.89%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 2916 of 3946 MiB (73.89%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 2916 of 3946 MiB (73.89%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 2785 of 3946 MiB (70.58%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 1232 of 3946 MiB (31.23%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 344 of 3946 MiB ( 8.73%), swap free: 0 of 0 MiB ( 0.00%)
low memory!  at or below SIGTERM limits: mem 10.00%, swap 10.00%
sending SIGTERM to process 1434 uid 1000 "tail": badness 652, VmRSS 2570 MiB
process exited after 0.1 seconds
mem avail: 2916 of 3946 MiB (73.89%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 2916 of 3946 MiB (73.89%), swap free: 0 of 0 MiB ( 0.00%)


Sun Apr 5 03:08:32 EDT 2020





user@debian:~$ oom-sort
oom_score oom_score_adj UID PID Name VmRSS VmSwap cmdline
--------- ------------- ----- ----- --------------- ------- -------- -------



	0 0 1000 1150 ssh-agent 0 M 0 M /usr/bin/ssh-agent mate-session
	0 0 1000 1244 systembus-notif 1 M 0 M systembus-notify
	0 0 1000 1420 earlyoom 1 M 0 M earlyoom -n



Sun Apr 5 02:43:42 EDT 2020
root@debian:~# earlyoom -n
earlyoom v1.5-4-gab946ee
Notifying through D-Bus
mem total: 1615 MiB, swap total: 4845 MiB
sending SIGTERM when mem <= 10.00% and swap <= 10.00%,
	SIGKILL when mem <= 5.00% and swap <= 5.00%
mem avail: 346 of 1615 MiB (21.44%), swap free: 4680 of 4845 MiB (96.59%)
mem avail: 346 of 1615 MiB (21.44%), swap free: 4680 of 4845 MiB (96.59%)
mem avail: 346 of 1615 MiB (21.43%), swap free: 4680 of 4845 MiB (96.59%)
mem avail: 346 of 1615 MiB (21.42%), swap free: 4680 of 4845 MiB (96.59%)
mem avail: 344 of 1615 MiB (21.34%), swap free: 4680 of 4845 MiB (96.59%)
mem avail: 344 of 1615 MiB (21.34%), swap free: 4680 of 4845 MiB (96.59%)
mem avail: 344 of 1615 MiB (21.34%), swap free: 4680 of 4845 MiB (96.59%)
mem avail: 343 of 1615 MiB (21.29%), swap free: 4680 of 4845 MiB (96.59%)
mem avail: 343 of 1615 MiB (21.29%), swap free: 4680 of 4845 MiB (96.59%)
mem avail: 343 of 1615 MiB (21.29%), swap free: 4680 of 4845 MiB (96.59%)
mem avail: 343 of 1615 MiB (21.29%), swap free: 4680 of 4845 MiB (96.59%)
mem avail: 343 of 1615 MiB (21.29%), swap free: 4680 of 4845 MiB (96.59%)
mem avail: 343 of 1615 MiB (21.29%), swap free: 4680 of 4845 MiB (96.59%)
mem avail: 341 of 1615 MiB (21.12%), swap free: 0 of 160 MiB ( 0.00%)
mem avail: 334 of 1615 MiB (20.68%), swap free: 0 of 150 MiB ( 0.00%)
mem avail: 321 of 1615 MiB (19.91%), swap free: 0 of 134 MiB ( 0.00%)
mem avail: 308 of 1615 MiB (19.08%), swap free: 0 of 115 MiB ( 0.00%)
mem avail: 264 of 1615 MiB (16.38%), swap free: 0 of 55 MiB ( 0.00%)
mem avail: 247 of 1615 MiB (15.33%), swap free: 0 of 29 MiB ( 0.00%)
mem avail: 230 of 1615 MiB (14.28%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 231 of 1615 MiB (14.31%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 231 of 1615 MiB (14.32%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 231 of 1615 MiB (14.32%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 231 of 1615 MiB (14.32%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 231 of 1615 MiB (14.32%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 231 of 1615 MiB (14.34%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 231 of 1615 MiB (14.34%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 231 of 1615 MiB (14.34%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 89 of 1615 MiB ( 5.53%), swap free: 0 of 0 MiB ( 0.00%)
low memory!  at or below SIGTERM limits: mem 10.00%, swap 10.00%
sending SIGTERM to process 3395 uid 1000 "firefox-esr": badness 163, VmRSS 263 MiB
escalating to SIGKILL after 0.1 seconds
process exited after 0.4 seconds
mem avail: 468 of 1615 MiB (29.01%), swap free: 0 of 0 MiB ( 0.00%)
mem avail: 700 of 1615 MiB (43.40%), swap free: 0 of 0 MiB ( 0.00%)


Sun Apr 5 02:37:53 EDT 2020
user@debian:/tmp/systembus-notify$ ./systembus-notify &
[2] 8710
user@debian:/tmp/systembus-notify$ dbus-send --system /
net.nuetzlich.SystemNotifications.Notify 'string:summary text only'
user@debian:/tmp/systembus-notify$ summary text only
(null)
dbus-send --system / net.nuetzlich.SystemNotifications.Notify 'string:summary
text' 'string:and body text'summary text only
(null)



Sun Apr 5 02:25:15 EDT 2020
user@debian:/tmp/systembus-notify$ dbus-send --system /
net.nuetzlich.SystemNotifications.Notify 'string:summary text only'
user@debian:/tmp/systembus-notify$ summary text only
(null)



Sun Apr 5 02:22:53 EDT 2020
user@debian:/tmp/systembus-notify$ systembus-notify test
bash: systembus-notify: command not found
user@debian:/tmp/systembus-notify$ ./systembus-notify test
Usage: ./systembus-notify
(no parameters accepted)
user@debian:/tmp/systembus-notify$ ./systembus-notify --help
Usage: ./systembus-notify
(no parameters accepted)


next