FS#68852 - Systemd hangs on GNOME reboot/shutdown

Attached to Project: Arch Linux
Opened by General Poxter (GeneralPoxter) - Friday, 04 December 2020, 16:43 GMT
Last edited by Evangelos Foutras (foutrelis) - Wednesday, 30 December 2020, 07:38 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 10
Private No

Details

Description:
After upgrading from 246.6-1 to 247.1-1, rebooting or shutting down takes an indefinite period of time. I have waited for as long as 60-90 seconds, before giving up and powering off my computer by hand. This has not occurred consistently, as sometimes, booting and then immediately rebooting works fine. I have found that the longer time I spend on a boot, the more certain it is that rebooting/shutting down will hang. Downgrading systemd 247.1-1 back to 246.6-1 is the only solution I could find.

Additional info:
* systemd 247.1-1
* Relevant output of "journalctl -p 3 -xb":
Failed to enqueue exit.target job: Transaction for exit.target/start is destructive (gnome-session-restart-dbus.service has 'start' job queued, but 'stop' is included in transaction).

Steps to reproduce:
Reboot or shutdown on GNOME
This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Wednesday, 30 December 2020, 07:38 GMT
Reason for closing:  Fixed
Additional comments about closing:  gnome-session 3.38.0+14+g87d92fec-1
Comment by Taniya Supasin (deaw) - Friday, 04 December 2020, 18:17 GMT
Try this:
https://bugs.freedesktop.org/show_bug.cgi?id=70593#c19

That solved problem on my machines.
Comment by General Poxter (GeneralPoxter) - Friday, 04 December 2020, 20:40 GMT
Thanks for your suggestion.
Unfortunately, that did not solve the problem for me. After re-upgrading systemd to the current version, implementing the changes to systemd-exit.service, and reloading the daemon, my system still takes around 1-2 minutes to reboot/shut down. I did have more patience this time though, and can confirm that my system is eventually able to restart.
Comment by Viktor Jägersküpper (viktorjk) - Friday, 04 December 2020, 21:28 GMT
This is not a bug in systemd, but in gnome-session. A fix has already been committed:
https://gitlab.gnome.org/GNOME/gnome-session/-/commit/9de6e40f12e8878f524f8d429d85724c156a0517

I can confirm that the fix works for me.
Comment by Viktor Jägersküpper (viktorjk) - Friday, 04 December 2020, 23:03 GMT
Although this seems to be a timing issue and thus only a few people seem to be affected, it's probably a good idea to include the fix in the gnome-session package.
Comment by General Poxter (GeneralPoxter) - Friday, 04 December 2020, 23:09 GMT
I'm frankly too scared to build directly from source. However, the gnome-session package has not been updated for nearly 2 months, so it might take a while before I can verify this myself. Should I still close this issue?
Comment by xduugu (xduugu) - Sunday, 06 December 2020, 00:19 GMT
Thanks for the hint, Viktor. The fix works for me as well.

@GeneralPoxter
You don't have to rebuild the package. Just edit the file /usr/lib/systemd/user/gnome-session-restart-dbus.service as root and insert the following line at the end:

Slice=-.slice
Comment by General Poxter (GeneralPoxter) - Sunday, 06 December 2020, 01:26 GMT
@xduugu
Thanks for the suggestion. I don't know what I was thinking at the time, but it turns out the commit isn't too difficult to carry out independently. I can confirm as well that the fix to the gnome-session-restart-dbus.service fixes the problem for me. I will be requesting closure of the issue.
Comment by xduugu (xduugu) - Sunday, 06 December 2020, 11:16 GMT
I think the issue should be kept open, but labeled as a gnome-session bug.
Comment by Mel (Mel) - Wednesday, 09 December 2020, 23:51 GMT
The 'Slice=-.slice' voodoo worked for me as well, gnome was unable to reboot the system...
Comment by Bario (barmadrid) - Friday, 11 December 2020, 22:12 GMT
I agree. We should release an updated version of the package to be safe among all users.
Comment by Arsenii (ettavolt) - Wednesday, 16 December 2020, 06:47 GMT
A 'proper' way to apply the patch is to

mkdir -p /etc/systemd/user/gnome-session-restart-dbus.service.d
print '[Service]\nSlice=-.slice' > /etc/systemd/user/gnome-session-restart-dbus.service.d/override.conf

(sudo systemctl --global edit gnome-session-restart-dbus.service doesn't work because of 'no bus').
Comment by General Poxter (GeneralPoxter) - Friday, 18 December 2020, 00:42 GMT
I believe the latest update to the gnome-shell package has implemented this fix.
Comment by xduugu (xduugu) - Friday, 18 December 2020, 11:05 GMT
I would be surprised if it did. The fix was for the gnome-session package and there was no update to this package.
Comment by Viktor Jägersküpper (viktorjk) - Monday, 28 December 2020, 10:17 GMT
This is now fixed in gnome-session package version 3.38.0+14+g87d92fec-1, and  FS#68989  is another duplicate.
Comment by Peter Weber (hoschi) - Tuesday, 29 December 2020, 23:53 GMT
It seems to be also fixed for me with "3.38.0+14+g87d92fec-1".

Loading...