Mailinglist Archive: opensuse-support (91 mails)

< Previous Next >
Re: [opensuse-support] Prevent system unresponsive state on huge memory consumption
On 12/09/2018 07.41, Mykola Krachkovsky wrote:
Hi,

I've tried to compare two XML (each roughly 3MiB in size) using `xmldiff`.
But
this program have eaten whole RAM and swap and ended up in unresponsive
system
and then crashed almost everything — X session with all applications — so
I've
got just tty's. "Nice".

Is there any way to prevent such behaviour in future? There is ulimit, but I
don't want to limit all of my processes.

Not all processes, just those that run on /that/ terminal.

In my notes, I have this for running this particular program that ate
memory:

cer@nimrodel:~> ulimit -v 300000
cer@nimrodel:~> kbabel


Nice solution is (IMO) would be to
allow every process to reach some limit after which application would be
stopped (not killed), some notification sent (if possible) and user (me)
could
make some decision what to do with it — kill, allow once, add to white list.
If program is white-listed allow it to do anything until ulimit/OOM-killer
behaviour.

Is there any way to do this? I'm not expecting absolutely ready solution, but
at least some direction how I can achieve this. The only solution I'm aware
of
and could do — make some daemon that periodically checks process memory usage
and sends SIGSTOP if some of them uses too much, but I'd prefer not use this
approach — there is no perfect time period — high CPU usage vs too late to do
anything.

Not that I know.

--
Cheers / Saludos,

Carlos E. R.

(from openSUSE 15.0 (Legolas))
--
To unsubscribe, e-mail: opensuse-support+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-support+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References