It’s even worse than that… you can hard lock a system with significant freeable memory left if you have insane vm.dirty_* settings (which is of course the case by default)
zram + no swap is a surprisingly workable workaround IME. The system slows down by a factor of 100 or so instead of 100000 or so, which allows to kill the offending process in a few seconds or have it killed by the OOM killer faster than a reboot.
The two mitigations are to:
- (somewhat counterintuitively) have swap enabled
- run something like earlyoom to stop the system from reaching a low-RAM situation in the first place.