[konsole] [Bug 480884] Konsole terminates when a program launched by it runs out of memory (oom-kill)

Massimiliano L bugzilla_noreply at kde.org
Tue Feb 6 09:47:56 GMT 2024


https://bugs.kde.org/show_bug.cgi?id=480884

--- Comment #5 from Massimiliano L <m.lincetto at gmail.com> ---
(In reply to fanzhuyifan from comment #4)
> In general, the advice is to *not* operate your system in settings that
> frequently trigger the OOM killer.
> There are several ways to do that:
> - limiting the ram of memory-hungry processes (e.g., using systemd, or
> options to jvm)
> - use swap (zram offers a way to put swap inside ram, and you could always
> configure swap on harddrives)
> - upgrade your hardware

The use case here is Konsole being used for development and debug. The large
memory consumption would then be unintentional, either because the amount of
required memory was miscalculated or because there is a memory leak in the
program. But if the terminal gets killed, the stdout is lost and debugging gets
more complicated. Of course logging to a file or limiting the memory available
to the python interpreter would be valid alternatives.

> If you must operate near regimes that saturate the memory, my suggestion is
> to custom configure an OOM killer, so you get more control over what is
> killed in OOM situations.
> 
> The systemd and kernel OOM killers both use some sort of heuristics to
> decide which application to kill first. It is very hard for us to guarantee
> that konsole is not killed first -- in some cases, it might even be
> desirable to kill konsole first if more critical applications can continue.

It might be desirable to kill Konsole if Konsole was responsible for the memory
consumption by itself and not because of a child process, but I get the point.
Your comment clarifies the situation enough for me. Thank you again for the
support.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list