Bug 1983048 - systemd-oomd regularly killing inkscape
Summary: systemd-oomd regularly killing inkscape
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-16 10:34 UTC by Allan Day
Modified: 2021-07-16 16:06 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-16 16:06:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Allan Day 2021-07-16 10:34:53 UTC
Description of problem:

I'm a designer and Inkscape is my primary design tool. Recently it has started to  silently disappear - I'll be using it, and the an Inkscape window will just close. Running it from the command line doesn't show any errors, nor do I get crash reports.

It happened again today, and I found this in the journal:

[20761.893754] systemd-oomd[743]: Killed /user.slice/user-1000.slice/user/app.slice/app-flatpak-org.inkscape.Inkscape-10790.scope due to memory used (16483962880) / total (16652419072) and swap used (7745417216) / total (8589>
[20761.978898] systemd[1773]: app-flatpak-org.inkscape.Inkscape-10790.scope: systemd-oomd killed 21 process(es) in this unit.
[20763.076267] systemd[1773]: app-flatpak-org.inkscape.Inkscape-10790.scope: Consumed 20min 56.008s CPU time.

The issue currently occurs multiple times a day for me. I've noticed similar behaviour with Firefox, but with a lower frequency and I haven't confirmed that it's oomd that's responsible.

Version-Release number of selected component (if applicable): systemd-248.4-1.fc34.src.rpm

How reproducible: happens multiple times a day, but the precise circumstances aren't clear.

Steps to Reproduce:
1. Have a bunch of memory intensive apps open - lots of browser tabs, maybe a VM running
2. Open multiple large SVGs in Inkscape, edit, export, etc

Comment 1 Michael Catanzaro 2021-07-16 14:46:21 UTC
You've used up 99% of available system memory and 90% of swap (assuming 8 GB total swap, the number is cut off but that's probably right). Killing something is the right thing to do because your system is very very close to thrashing and becoming unresponsive. (I guess you're using zram, because if not I would expect it to already be unresponsive with so much swap used.) Having systemd-oomd preemptively kill your application before the system becomes unresponsive was a design decision to prioritize maintaining desktop responsiveness. We know that if we don't kill *before* your desktop becomes unresponsive, you're probably going to have to either power off to regain control, or wait 30+ minutes before mouse and keyboard input start to work again. So killing one of your applications using the most memory is desirable to keep your desktop working.

Importantly, once it gets to this point, there's no time to prompt the user or ask the user what to kill. A kill has to come immediately. If we want to introduce some way to prompt the user to decide which application to close, that needs to happen earlier, before memory use reaches this critical threshold.

The biggest problem here is that you have not received any notification why inkscape disappeared. systemd knows how to use D-Bus, so it should be able to send a desktop notification to tell you what it has killed.

Comment 2 Allan Day 2021-07-16 16:06:40 UTC
OK, let's close this.

Regularly killing an app with no feedback seems like a Very Bad Thing to me, but let's take that up elsewhere.


Note You need to log in before you can comment on or make changes to this bug.