I don't have enough reputation to add a comment there. For me, on a virtual machine with only 128M sized memory, apt-get update causes the OOM to kill a process which is not from the apt package. This is happening for some time now. It is quite reproducible, as the killed process is the bind name server. Possibly because the machine is mostly idle, which is why there are not many processes to choose from. Or that bind is the largest process. Can someone suggest how to get more insight? It looks like apt-get almost manages to finish processing the update when it happens. That is, I think it happens while apt-get update is almost done.
I think this is not a problem of too tight memory. True the machine has only 128M. Very small, but I still think it should be plenty for this mostly idle machine. Restarting bind makes it work flawlessly, until apt-get update will run again.
Debian GNU/Linux 9 Linux hostname 2.6.32-042stab134.3 #1 SMP Sun Oct 14 12:26:01 MSK 2018 x86_64 GNU/Linux Apr 15 08:44:12 hostname kernel: [14488384.845616] Out of memory in UB 11524: OOM killed process 13894 (named) score 0 vm:231360kB, rss:34332kB, swap:0kB Apr 15 08:44:12 hostname systemd: bind9.service: Main process exited, code=killed, status=9/KILL Apr 15 08:44:12 hostname rndc: rndc: connect failed: 127.0.0.1#953: connection refused Apr 15 08:44:12 hostname systemd: bind9.service: Control process exited, code=exited status=1 Apr 15 08:44:12 hostname systemd: bind9.service: Unit entered failed state. Apr 15 08:44:12 hostname systemd: bind9.service: Failed with result 'signal'.