Skip to content

Gnome crashes during system updates

There are some times that Gnome session crashes during system update. It does not happen always, so I presume it is when certain package or packages are updated. The last time it crashed, the gnome related packages that where updating:

gnome-desktop
gnome-clocks
gnome-multi-writer
gnome-usage
webkit2gtk

Pacman log says transaction interrupted just after updating webkit2gtk and journalctl has some gsd-keyboard.service: Failed with result 'exit-code'. 3 seconds after the update failed and there are no error messages during the update.

Here are the full logs for pacman and journal

4 points3 comments
Open on Reddit
About this post
Posted
Archived
Score
4 · 100% up
Kind
Text
ID
hpdcof

Author

14
posts
184
comments
0
media
View profile

3 comments

Run your upgrades from a system console (not a terminal emulator), i.e., with Gnome not running.

3 points

If that's the solution, I'm gonna uninstall gnome. I like the desktop workflow, but it has become a pain in the a** through the years. I think the last 20 times my Arch install has broken, about 90% of the times it was due to Gnome.

1 points

Just for the record, I have never seen such an issue with KDE, throughout my 15+ years of using it and updating the system while logged in. So the problem is specific to recent versions of Gnome where I see it all the time. In Gnome I get a session crash during ~one yay -Syu out of two, which makes Gnome unusable with my usual daily automated updates.

Gnome must be doing something bogus around (dynamic) library access or the like. Normally a system update should have no effect on running processes, because processes just see their consistent old binary version they get mmap()'ed into their address space. So they are unaffected by the package manager's replacements of libraries or executables (which always happens in an atomic manner, i.e., using an equivalent of mv instead of in-place writes). The old files stay available, in an "unlinked" state, until all their users close them, at which point their disk blocks get reclaimed.

That said, to make a process actually crash due to a system update and its file replacements, one must do something really unusual, such as repetitive "manual" library accesses with dlopen() or the like. (And even then it's unclear why a gnome-desktop crash should crash the entire session; you can kill and restart plasmashell in KDE whenever you like; no problem at all.)

The key question is: How could one debug this? It's definitely worth a big fat bug report, but it would be great to find out more about the root cause first.

A possible workaround is to start your system updates in screen (or tmux) while using Gnome. That doesn't stop the crashes from happening, but at least it won't stop yay or pacman in the middle of a transaction. (Also, I like to set KillUserProcesses to yes in systemd, unlike the default configuration, so I always need to make sure that loginctl enable-linger is set and screen runs in a separate systemd scope.)

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.