-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sway crashed after nixos-rebuild switch
#74626
Comments
ResultThis crash is reproducible and the regression is caused by 89806e9. When I switch from e89b215 to 0ee0489 both
But without 89806e9 (cc #73871) this will not happen:
Impactman systemd.unit:
man systemd.service:
|
How come that |
@domenkozar I can investigate this later but this shouldn't happen regardless of that fact. Update: Had a look and |
I agree, but socket shouldn't change at all. So I'd like to understand what causes this mess. |
I've used the following patch to figure out what's going on: diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl
index 12a80a12d19..8c22cf7c0e1 100644
--- a/nixos/modules/system/activation/switch-to-configuration.pl
+++ b/nixos/modules/system/activation/switch-to-configuration.pl
@@ -220,6 +220,8 @@ while (my ($unit, $state) = each %{$activePrev}) {
# service unit has to be stopped before the socket can
# be restarted. The service will be started again on demand.
my $serviceUnit = $unitInfo->{'Unit'} // "$baseName.service";
+ print STDERR "Affected unit (socket): $unit\n";
+ print STDERR "Affected unit (service): $serviceUnit\n";
$unitsToStop{$serviceUnit} = 1;
$unitsToStop{$unit} = 1;
$unitsToStart{$unit} = 1; This gives the following output:
|
OK, so this patch doesn't check if socket has actually changed? |
diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl
index 12a80a12d19..943ee547617 100644
--- a/nixos/modules/system/activation/switch-to-configuration.pl
+++ b/nixos/modules/system/activation/switch-to-configuration.pl
@@ -220,6 +220,9 @@ while (my ($unit, $state) = each %{$activePrev}) {
# service unit has to be stopped before the socket can
# be restarted. The service will be started again on demand.
my $serviceUnit = $unitInfo->{'Unit'} // "$baseName.service";
+ print STDERR "Affected unit files: $prevUnitFile -> $newUnitFile\n";
+ print STDERR "Affected unit (socket): $unit\n";
+ print STDERR "Affected unit (service): $serviceUnit\n";
$unitsToStop{$serviceUnit} = 1;
$unitsToStop{$unit} = 1;
$unitsToStart{$unit} = 1; Relevant output:
$ sha256sum /etc/systemd/system/dbus.socket /nix/store/kai0jqnk56zcky086f1y4kr6cwyvvrga-nixos-system-quorra-20.03.git.0ee0489/etc/systemd/system/dbus.socket
e05359bbdc083b8db2b49542b26429166b5e13367a63668a4e8ff8a1b496f7ae /etc/systemd/system/dbus.socket
e05359bbdc083b8db2b49542b26429166b5e13367a63668a4e8ff8a1b496f7ae /nix/store/kai0jqnk56zcky086f1y4kr6cwyvvrga-nixos-system-quorra-20.03.git.0ee0489/etc/systemd/system/dbus.socket So |
The following explains why the fingerprint does still change:
But I'll have to go AFK now. Edit: Btw for the meantime it might not hurt to revert 89806e9 until we find a proper solution (I really don't like issues that cause my graphical session to crash). |
I've had this happen too. |
With 0f799bd, this can probably be closed. |
Opened #74899 |
Describe the bug
After running
nixos-rebuild switch
my graphical session crashed. The Sway process was technically still running but I was back to the console and could see various error messages.This probably applies to other Wayland compositors as well and maybe even X11.
To Reproduce
Tested the following and it it indeed reproducible:
Expected behavior
The system upgrades normally without Sway crashing.
Screenshots
TODO
Additional context
One of the following systemd units that where stopped should be responsible for this:
Probably due to D-Bus or udev.
Update:
systemctl stop dbus
crashes Sway, so that was probably the reason. I also don't think we did ever restart (stop + start) D-Bus in the past (only reloaded it). AFAIK restarting D-Bus will kick all clients and is therefore a bad idea (but haven't looked much into it).Update2: Apparently we still have the following (which is very important):
Not sure why
nixos-rebuild switch
did restartdbus.service
then (actually it did stop, start, and reload the unit...). Maybe we have a bigger regression innixos-rebuild
.Update3: 89806e9 could be the problem, I'll investigate.
Metadata
Maintainer information:
The text was updated successfully, but these errors were encountered: