Skip to content
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

nixos/gdm: start on tty7 possibly fixing reload switch #70357

Merged
merged 1 commit into from Oct 11, 2019

Conversation

hedning
Copy link
Contributor

@hedning hedning commented Oct 3, 2019

Motivation for this change

Not entirely sure how this works, but this does seem to fix reload switch
restarting gdm and killing the current gnome-session.

In particular I enabled services.postgresql with switch and that killed my session (even though that shouldn't touch the display-manager service). Have done a few switch rebuilds when starting on VT7 and haven't seen any issues so far.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

@worldofpeace
Copy link
Contributor

Hmm, I actually wrote a nixos test to play around with rebuild switch and didn't have any issues.
I even tried doing a switch of desktop environments configuration and it still didn't restart.

I will try with services.postgresql etc.

@hedning
Copy link
Contributor Author

hedning commented Oct 4, 2019

Ah, right, might've been something else then. my testing was pretty ad-hoc.

@worldofpeace
Copy link
Contributor

Ok, so I've tested again and when the activation script tries to restart dbus it appears this takes the whole gnome-session with it. Perhaps this is related to us switching to systemd services.

@hedning
Copy link
Contributor Author

hedning commented Oct 4, 2019

Ah, so no idea why, but that does seem to be fixed by using vt7:

reloading the following units: dbus.service

@hedning
Copy link
Contributor Author

hedning commented Oct 4, 2019

@GrahamcOfBorg build nixosTests.gnome3

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess it's fine. IIRC most other display managers have their initial vt as 7 anyways.

@worldofpeace
Copy link
Contributor

worldofpeace commented Oct 4, 2019

Actually, I think there's some things missing in our unit that are present in the upstream one

diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix
index 6c566f8752f..5f0ceb6fe1f 100644
--- a/nixos/modules/services/x11/display-managers/gdm.nix
+++ b/nixos/modules/services/x11/display-managers/gdm.nix
@@ -165,9 +165,16 @@ in
       "systemd-machined.service"
       "systemd-user-sessions.service"
       "getty@tty${gdm.initialVT}.service"
+      "plymouth-quit.service"
+      "plymouth-start.service"
     ];
     systemd.services.display-manager.conflicts = [
       "getty@tty${gdm.initialVT}.service"
+      "plymouth-quit.service"
+    ];
+
+    systemd.services.display-manager.onFailure = [
+      "plymouth-quit.service"
     ];
 
     systemd.services.display-manager.serviceConfig = {
@@ -177,6 +184,9 @@ in
       BusName = "org.gnome.DisplayManager";
       StandardOutput = "syslog";
       StandardError = "inherit";
+      ExecReload = "${pkgs.coreutils}/bin/kill -SIGHUP $MAINPID";
+      KeyringMode = "shared";
+      EnvironmentFile = "-/etc/locale.conf";
     };
 
     systemd.services.display-manager.path = [ pkgs.gnome3.gnome-session ];

This one was probably important now

@hedning
Copy link
Contributor Author

hedning commented Oct 4, 2019

Tried testing plymouth in a VM, but it's pretty buggy in nixos so it never shows with or without the extra stuff in gdm. Shouldn't hurt to include though.

I also added mkdir -p /run/gdm/.config in pre-start as gdm would fail if the directory wasn't there (happned with a few VMs).

@ofborg ofborg bot requested a review from worldofpeace October 4, 2019 21:31
@worldofpeace
Copy link
Contributor

Tried testing plymouth in a VM, but it's pretty buggy in nixos so it never shows with or without the extra stuff in gdm. Shouldn't hurt to include though.

I think I might need to test this patch a little more if it fixes reloading on switch.
It seems that when dbus gets reloaded it isn't a problem now, but I'm not sure if it could still happen.

I also added mkdir -p /run/gdm/.config in pre-start as gdm would fail if the directory wasn't there (happned with a few VMs).

Right that's actually very important 👍

@hedning
Copy link
Contributor Author

hedning commented Oct 5, 2019

I think I might need to test this patch a little more if it fixes reloading on switch.
It seems that when dbus gets reloaded it isn't a problem now, but I'm not sure if it could still happen.

Right, it's quite likely the problem is unrelated and I just happened to hit the problems when being on vt1 and didn't see them on vt7. It sure doesn't make any sense that this should fix it (at least when we have specify the getty conflict).

I'll move the service/gnome-initial stuff out of this PR.

@worldofpeace
Copy link
Contributor

I think I might need to test this patch a little more if it fixes reloading on switch.
It seems that when dbus gets reloaded it isn't a problem now, but I'm not sure if it could still happen.

Right, it's quite likely the problem is unrelated and I just happened to hit the problems when being on vt1 and didn't see them on vt7. It sure doesn't make any sense that this should fix it (at least when we have specify the getty conflict).

I'll move the service/gnome-initial stuff out of this PR.

Thanks, that unblocks those changes since we haven't determined this actually fixes things 👍
(at least optimally)

@hedning hedning changed the title nixos/gdm: do not restart on reload switch nixos/gdm: start on tty7 possibly fixing reload switch Oct 7, 2019
@hedning
Copy link
Contributor Author

hedning commented Oct 11, 2019

So I'm able to reproduce session crashing by going from a66adfc to a66adfc reliably (plain rebuild switch without any changes). With hedning@e84811d plain rebuilds works, then going back to a66adfc also works, and going from a66adfc to hedning@e84811d also works.

Now in #70954 @Ninlives seemed to get crashes with this fix so I'm not entirely sure what's up (I'm doing this with gdm/gnome-session 3.34.1 so that might be the difference) :/

Not entirely sure how this works, but this does seem to fix reload switch
restarting gdm and killing the current gnome-session.
@worldofpeace
Copy link
Contributor

@hedning I can confirm, at least in my testing, this change fixes switching plainly and I believe by changing anything else.
So maybe 3.34.1 made a difference here.

I've been testing with


{ pkgs, ... }: {
  name = "gnome-gdm-switch";

  nodes = rec {
    machine = { nodes, ... }: {
      imports = [ ./common.nix ];

      environment.etc."other-system".source = nodes.other.config.system.build.toplevel;
    };
    other = { ... }: {
      imports = [ ./common.nix ];
      # Have some different options set to play with
      # services.sysprof.enable = true;
    };
  };

  testScript = {nodes, ...}: let
    originalSystem = nodes.machine.config.system.build.toplevel;
    otherSystem = nodes.other.config.system.build.toplevel;

    # Ensures failures pass through using pipefail, otherwise failing to
    # switch-to-configuration is hidden by the success of `tee`.
    stderrRunner = pkgs.writeScript "stderr-runner" ''
      #! ${pkgs.stdenv.shell}
      set -e
      set -o pipefail
      exec env -i "$@" | tee /dev/stderr
    '';
  in ''
    $machine->succeed("${stderrRunner} ${originalSystem}/bin/switch-to-configuration test");
    $machine->succeed("${stderrRunner} ${otherSystem}/bin/switch-to-configuration test");
  '';
}

which is just copied from the switch test, and running /etc/other-system/bin/switch-to-configuration with the test interactively.

It's really weird that just running the switch script with no changes before this causes an issue.
Not sure where to pin-point the issue.

@worldofpeace
Copy link
Contributor

Even tested with your original issue on services.postgresql.enable and no issues.
I'd say it's as good as confirmed, though not optimal.

@hedning
Copy link
Contributor Author

hedning commented Oct 11, 2019

Nice :) (should've looked into testing in a VM instead of killing my session a bunch of times though 😆)

I did try out just removing the getty@tty1 stuff in gdm.nix, without changing which tty gdm starts, and that also seemed to do the trick, so I'm guessing tty1 for some reason tends to get started on rebuild switch 🤷‍♂️

@hedning hedning merged commit 5b7c900 into NixOS:master Oct 11, 2019
@hedning hedning deleted the gdm-fix-reload-switch branch October 11, 2019 18:27
@jtojnar
Copy link
Contributor

jtojnar commented Oct 11, 2019

Does not seem to work for me. I cherry picked this onto 07d4df5, rebuild and after a reboot added dconf-editor to systemPackages and rebuilt again. I saw DBus reloaded, polkit restarted, and then screen went to black with blinking cursor in top left corner.

@hedning
Copy link
Contributor Author

hedning commented Oct 11, 2019

OK, that sucks. There's a small possibility that it requires 3.34.1 though looking at gdm and gnome-session commits there's nothing obvious that we didn't already pull into 3.34.0.

So this seems to just fix a subset of the rebuild switch issues, in particular rebuilds that don't touch the graphical session stuff in some way (in the extreme case "empty" rebuilds). But there's still rebuilds which can crash the session by touching the wrong bits (that was most likely the case in 3.32 too).

@worldofpeace
Copy link
Contributor

Right @hedning, it's possible there's multiple independent issues with the switch script here (there's reports that predate systemd user changes).

@hedning
Copy link
Contributor Author

hedning commented Oct 11, 2019

Hmm, for what's its worth, tried to reproduce @jtojnar failure with dconf-editor without the session crashing:

reloading user units for hed...
setting up tmpfiles
reloading the following units: dbus.service
restarting the following units: polkit.service
starting the following units: accounts-daemon.service

@jtojnar
Copy link
Contributor

jtojnar commented Oct 11, 2019

I can reproduce it 100% of times on latest unstable with Shell 3.34.1 (https://github.com/NixOS/nixpkgs/commits/3b33c6370a9f55b72356409bc5025af4aa7d4b91) as well. I tried switching to Wayland session. No matter how small (swapping xsel and xsv order in systemPackages), even with no units touched as fair as I could notice in the blink.

@hedning
Copy link
Contributor Author

hedning commented Oct 11, 2019

Jesus that's strange (though the minimal changes in 3.34.1 fixing things would be weird too) 😕

@jtojnar
Copy link
Contributor

jtojnar commented Oct 11, 2019

I do not even need to change configuration. Just running sudo nixos-rebuild switch -I nixos-config=/etc/nixos/configuration.nix -I nixpkgs=$PWD triggers the failure:

building Nix...
building the system configuration...
activating the configuration...
setting up /etc...
reloading user units for jtojnar...
setting up tmpfiles
/nix/store/qlppcdbnq58dvv30kpw5g7wam4h7bqdh-nixos-rebuild/bin/nixos-rebuild: line 242:  5231 Hangup                  "$@"

The last line is cleanup not getting run due to the abrupt hanging.

@jtojnar
Copy link
Contributor

jtojnar commented Oct 11, 2019

This is what display-manager.service logs around the end:

Oct 11 23:32:28 kaiser gdm[1148]: GDM finished, cleaning up...
Oct 11 23:32:28 kaiser gdm[1148]: GdmSession: Closing session
Oct 11 23:32:28 kaiser systemd[1]: Stopping X11 Server...
Oct 11 23:32:28 kaiser gdm[1148]: GdmSession: Stopping all conversations
Oct 11 23:32:28 kaiser gdm[1148]: GdmSessionWorkerJob: Stopping job pid:1533
Oct 11 23:32:28 kaiser gdm[1148]: GdmCommon: sending signal 15 to process 1533
Oct 11 23:32:28 kaiser gdm[1148]: GdmSessionWorkerJob: Waiting on process 1533
Oct 11 23:32:28 kaiser gdm[1148]: GdmCommon: process (pid:1533) done (status:0)
Oct 11 23:32:28 kaiser gdm[1148]: GdmSessionWorkerJob: SessionWorkerJob died
Oct 11 23:32:28 kaiser gdm[1148]: GdmDisplay: unmanage display
Oct 11 23:32:28 kaiser gdm[1148]: GdmLocalDisplayFactory: display status changed: 0
Oct 11 23:32:28 kaiser gdm[1148]: GdmLocalDisplayFactory: display status changed: 4
Oct 11 23:32:28 kaiser gdm[1148]: GdmLocalDisplayFactory: enumerating seats from logind
Oct 11 23:32:28 kaiser gdm[1148]: GdmLocalDisplayFactory: wayland login display for seat seat0 requested
Oct 11 23:32:28 kaiser gdm[1148]: GdmLocalDisplayFactory: Adding display on seat seat0
Oct 11 23:32:28 kaiser gdm[1148]: GdmDisplay: id: (null)
Oct 11 23:32:28 kaiser gdm[1148]: GdmDisplay: seat id: (null)
Oct 11 23:32:28 kaiser gdm[1148]: GdmDisplay: session class: greeter
Oct 11 23:32:28 kaiser gdm[1148]: GdmDisplay: initial: no
Oct 11 23:32:28 kaiser gdm[1148]: GdmDisplay: allow timed login: yes
Oct 11 23:32:28 kaiser gdm[1148]: GdmDisplay: local: yes
Oct 11 23:32:28 kaiser gdm[1148]: GdmDisplay: session type: wayland
Oct 11 23:32:28 kaiser gdm[1148]: GdmDisplay: seat id: seat0
Oct 11 23:32:28 kaiser gdm[1148]: GdmDisplay: initial: yes
Oct 11 23:32:28 kaiser gdm[1148]: GdmDisplayStore: Adding display /org/gnome/DisplayManager/Displays/8272832 to store
Oct 11 23:32:28 kaiser gdm[1148]: GdmDisplay: Managing display: /org/gnome/DisplayManager/Displays/8272832
Oct 11 23:32:28 kaiser gdm[1148]: GdmDisplay: Preparing display: /org/gnome/DisplayManager/Displays/8272832
Oct 11 23:32:29 kaiser gdm[1148]: GdmDisplay: Checking kernel command buffer initrd=\efi\nixos\zp8y238bcp6skg8vxy8ipczy8s8gaisf-initrd-linux-5.3.5-initrd.efi systemConfig=/nix/store/6rbik5fqnbmysc23qa4hmk36avap89aq-nixos-system-kaiser-20.03.git.3b33c63 init=/nix/store/6rbik5fqnbmysc23qa4hmk36avap89aq-nixos-system-kaiser-20.03.git.3b33c63/init boot.shell_on_fail kvm-intel splash loglevel=4
Oct 11 23:32:29 kaiser gdm[1148]: GdmDisplay: Failed to read kernel commandline: Could not match gnome.initial-setup= in kernel cmdline
Oct 11 23:32:29 kaiser gdm[1148]: doing initial setup? no
Oct 11 23:32:29 kaiser gdm[1148]: GdmDisplay: prepare display
Oct 11 23:32:29 kaiser gdm[1148]: GdmLocalDisplayFactory: display status changed: 1
Oct 11 23:32:29 kaiser gdm[1148]: GdmDisplay: finish display
Oct 11 23:32:29 kaiser gdm[1148]: GLib: g_hash_table_foreach: assertion 'version == hash_table->version' failed
Oct 11 23:32:29 kaiser gdm[1148]: GdmDisplayStore: Clearing display store
Oct 11 23:32:29 kaiser gdm[1148]: GdmDisplayStore: Unreffing display: 0x7e3bc0
Oct 11 23:32:29 kaiser gdm[1148]: GdmDisplay: Disposing display
Oct 11 23:32:29 kaiser gdm[1148]: GdmDisplay: Finalizing display: /org/gnome/DisplayManager/Displays/8272832
Oct 11 23:32:29 kaiser gdm[1148]: GdmDisplayStore: Unreffing display: 0x7e3ad0
Oct 11 23:32:29 kaiser systemd[1]: display-manager.service: Succeeded.
Oct 11 23:32:29 kaiser systemd[1]: Stopped X11 Server.

@worldofpeace
Copy link
Contributor

Nothing looks out of the ordinary, gnome-initial-setup stuff appears to be correct

Oct 11 23:32:29 kaiser gdm[1148]: GdmDisplay: Failed to read kernel commandline: Could not match gnome.initial-setup= in kernel cmdline
Oct 11 23:32:29 kaiser gdm[1148]: doing initial setup? no

https://github.com/GNOME/gdm/blob/7d63bd5f7ae81ae3d316623cf0f284e9e49ed55d/daemon/gdm-display.c#L1558

@jtojnar
Copy link
Contributor

jtojnar commented Oct 11, 2019

The assertion is suspect, but that appears long after the decision was already made.

@hedning
Copy link
Contributor Author

hedning commented Oct 12, 2019

Yeah, I'm pretty perplexed 😆 . I can reproduce the problem 100% in a VM with a minimal gnome install.

In particular I built two VMs, one with gdm starting on tty1 (at b943338) and one starting on tty7 (b943338 with the fix picked). Inside the VMs I symlinked tty1/tty7 to the corresponding system/bin directories. That way I could run ./tty1/switch-to-configuration test easily.

Going from tty 1 to 1 always crashed the session, while 7 to 1 and 1 to 7 worked. It didn't seem to matter which VM I started in.

So here's a sample of how that looked:

1 -> 7 -> 1 -> 1
  [root@nixos:/home/hed]# ./tty7/switch-to-configuration test
  activating the configuration...
  setting up /etc...
  reloading user units for hed...
  setting up tmpfiles

  [root@nixos:/home/hed]# ./tty1/switch-to-configuration test
  stopping the following units: accounts-daemon.service
  NOT restarting the following changed units: display-manager.service
  activating the configuration...
  setting up /etc...
  reloading user units for hed...
  setting up tmpfiles
  reloading the following units: dbus.service
  restarting the following units: polkit.service
  starting the following units: accounts-daemon.service

  [root@nixos:/home/hed]# ./tty7/switch-to-configuration test
  stopping the following units: accounts-daemon.service
  NOT restarting the following changed units: display-manager.service
  activating the configuration...
  setting up /etc...
  reloading user units for hed...
  setting up tmpfiles
  reloading the following units: dbus.service
  restarting the following units: polkit.service
  starting the following units: accounts-daemon.service
  the following new units were started: getty@tty1.service

  [root@nixos:/home/hed]# ./tty1/switch-to-configuration test
  stopping the following units: accounts-daemon.service
  NOT restarting the following changed units: display-manager.service
  activating the configuration...
  setting up /etc...
  reloading user units for hed...
  setting up tmpfiles
  reloading the following units: dbus.service
  restarting the following units: polkit.service
  starting the following units: accounts-daemon.service

  [root@nixos:/home/hed]# ./tty1/switch-to-configuration test
  activating the configuration...
  setting up /etc...
  reloading user units for hed...
  setting up tmpfiles

  crashes here

Here's a log from one of the crashes

journal log of a rebuild with crash
  Oct 12 10:33:20 nixos nixos[1672]: switching to system configuration /nix/store/lqswha7708f92cafjdmlfpclkw8rqica-nixos-system-nixos-20.03.git.b943338ea58
  Oct 12 10:33:20 nixos systemd[1]: Stopped target Local File Systems.
  Oct 12 10:33:20 nixos systemd[1]: Stopped target All Network Interfaces (deprecated).
  Oct 12 10:33:20 nixos systemd[1]: Stopped target Remote File Systems.
  Oct 12 10:33:20 nixos nscd[742]: 742 monitored file `/etc/group` was moved into place, adding watch
  Oct 12 10:33:20 nixos nscd[742]: 742 ignored inotify event for `/etc/group` (file exists)
  Oct 12 10:33:20 nixos nscd[742]: 742 monitoring file `/etc/group` (15)
  Oct 12 10:33:20 nixos nscd[742]: 742 monitoring directory `/etc` (2)
  Oct 12 10:33:20 nixos nscd[742]: 742 monitored file `/etc/passwd` was moved into place, adding watch
  Oct 12 10:33:20 nixos nscd[742]: 742 ignored inotify event for `/etc/passwd` (file exists)
  Oct 12 10:33:20 nixos nscd[742]: 742 monitoring file `/etc/passwd` (16)
  Oct 12 10:33:20 nixos nscd[742]: 742 monitoring directory `/etc` (2)
  Oct 12 10:33:21 nixos nscd[742]: 742 monitored file `/etc/services` was moved into place, adding watch
  Oct 12 10:33:21 nixos nscd[742]: 742 monitored file `/etc/hosts` was moved into place, adding watch
  Oct 12 10:33:21 nixos polkitd[1657]: Reloading rules
  Oct 12 10:33:21 nixos polkitd[1657]: Collecting garbage unconditionally...
  Oct 12 10:33:21 nixos polkitd[1657]: Loading rules from directory /etc/polkit-1/rules.d
  Oct 12 10:33:21 nixos polkitd[1657]: Loading rules from directory /run/current-system/sw/share/polkit-1/rules.d
  Oct 12 10:33:21 nixos polkitd[1657]: Finished loading, compiling and executing 6 rules
  Oct 12 10:33:21 nixos polkitd[1657]: Reloading rules
  Oct 12 10:33:21 nixos polkitd[1657]: Collecting garbage unconditionally...
  Oct 12 10:33:21 nixos polkitd[1657]: Loading rules from directory /etc/polkit-1/rules.d
  Oct 12 10:33:21 nixos polkitd[1657]: Loading rules from directory /run/current-system/sw/share/polkit-1/rules.d
  Oct 12 10:33:21 nixos polkitd[1657]: Finished loading, compiling and executing 6 rules
  Oct 12 10:33:21 nixos gdm[804]: accountsservice: ActUserManager: sending user-changed signal for user hed
  Oct 12 10:33:21 nixos gdm[804]: accountsservice: ActUserManager: sent user-changed signal for user hed
  Oct 12 10:33:21 nixos gdm[804]: accountsservice: ActUserManager: updating user hed
  Oct 12 10:33:21 nixos gdm-autologin][808]: accountsservice: ActUserManager: sending user-changed signal for user hed
  Oct 12 10:33:21 nixos gdm-autologin][808]: accountsservice: ActUserManager: sent user-changed signal for user hed
  Oct 12 10:33:21 nixos gdm-autologin][808]: accountsservice: ActUserManager: updating user hed
  Oct 12 10:33:23 nixos systemd[1]: Reloading.
  Oct 12 10:33:24 nixos systemd-fstab-generator[1805]: Checking was requested for "store", but it is not a device.
  Oct 12 10:33:24 nixos systemd-fstab-generator[1805]: Checking was requested for "shared", but it is not a device.
  Oct 12 10:33:24 nixos systemd-fstab-generator[1805]: Checking was requested for "xchg", but it is not a device.
  Oct 12 10:33:24 nixos su[1812]: Successful su for hed by root
  Oct 12 10:33:24 nixos su[1812]: pam_unix(su:session): session opened for user hed by hed(uid=0)
  Oct 12 10:33:24 nixos systemd[813]: Reexecuting.
  Oct 12 10:33:25 nixos systemd[813]: Starting Run user-specific NixOS activation...
  Oct 12 10:33:25 nixos systemd[813]: nixos-activation.service: Succeeded.
  Oct 12 10:33:25 nixos systemd[813]: Started Run user-specific NixOS activation.
  Oct 12 10:33:25 nixos su[1812]: pam_unix(su:session): session closed for user hed
  Oct 12 10:33:25 nixos gdm[804]: GDM finished, cleaning up...
  Oct 12 10:33:25 nixos gdm[804]: GdmSession: Closing session
  Oct 12 10:33:25 nixos gdm[804]: GdmSession: Stopping all conversations
  Oct 12 10:33:25 nixos gdm[804]: GdmSessionWorkerJob: Stopping job pid:808
  Oct 12 10:33:25 nixos gdm[804]: GdmCommon: sending signal 15 to process 808
  Oct 12 10:33:25 nixos gdm[804]: GdmSessionWorkerJob: Waiting on process 808
  Oct 12 10:33:25 nixos systemd[1]: Stopping X11 Server...
  Oct 12 10:33:25 nixos gdm-autologin][808]: GdmCommon: sending signal 15 to process 826
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Session is stable (running for >2 minutes).
  Oct 12 10:33:25 nixos systemd[813]: gnome-session-stable.timer: Succeeded.
  Oct 12 10:33:25 nixos systemd[813]: Stopped GNOME Session is not yet stable (running for <2 minutes).
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Wayland Session (session: gnome).
  Oct 12 10:33:25 nixos systemd[813]: Stopped target Current graphical user session.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Session.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Wayland Session.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Session (session: gnome).
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Accessibility settings.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Color management.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Date & Time handling.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Maintenance of expirable data.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Keyboard handling.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Media keys handling.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Power management handling.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Printer notifications.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME RFKill handling.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Freedesktop screensaver handling.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Sharing handling.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Smartcard handling.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME Wacom handling.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME WWan management.
  Oct 12 10:33:25 nixos systemd[813]: Stopped target GNOME XSettings.
  Oct 12 10:33:25 nixos systemd[1]: Condition check resulted in File System Check on Root Device being skipped.
  Oct 12 10:33:25 nixos systemd[1]: Reached target Local File Systems.
  Oct 12 10:33:25 nixos systemd[1]: Reached target Remote File Systems.
  Oct 12 10:33:25 nixos systemd[1]: Reached target All Network Interfaces (deprecated).
  Oct 12 10:33:25 nixos systemd[1]: Condition check resulted in Kernel Configuration File System being skipped.
  Oct 12 10:33:25 nixos systemd[1]: Condition check resulted in Rebuild Journal Catalog being skipped.
  Oct 12 10:33:25 nixos systemd[1]: Condition check resulted in Update is Completed being skipped.
  Oct 12 10:33:25 nixos systemd[813]: Stopping GNOME Accessibility settings...
  Oct 12 10:33:25 nixos systemd[813]: Stopping GNOME Color management...
  Oct 12 10:33:25 nixos systemd[813]: Stopping GNOME Date & Time handling...
  Oct 12 10:33:25 nixos systemd[813]: Stopping GNOME Maintenance of expirable data...
  Oct 12 10:33:25 nixos systemd[813]: Stopping GNOME Keyboard handling...
  Oct 12 10:33:25 nixos systemd[813]: Stopping GNOME Media keys handling...
  Oct 12 10:33:25 nixos systemd[813]: Stopping GNOME Power management handling...
  Oct 12 10:33:25 nixos .gsd-print-noti[1086]: Source ID 4 was not found when attempting to remove it
  Oct 12 10:33:25 nixos systemd[813]: Stopping GNOME Printer notifications...
  Oct 12 10:33:25 nixos systemd[813]: Stopping GNOME RFKill handling...
  Oct 12 10:33:25 nixos systemd[813]: Stopping GNOME Freedesktop screensaver handling...
  Oct 12 10:33:25 nixos systemd[813]: Stopping GNOME Sharing handling...
  Oct 12 10:33:25 nixos systemd[813]: Stopping GNOME Smartcard handling...
  Oct 12 10:33:25 nixos systemd[813]: Stopping GNOME Wacom handling...
  Oct 12 10:33:25 nixos systemd[813]: Stopping GNOME WWan management...
  Oct 12 10:33:25 nixos systemd[813]: Stopping GNOME XSettings...
  Oct 12 10:33:25 nixos systemd[813]: gsd-a11y-settings.service: Succeeded.
  Oct 12 10:33:25 nixos systemd[813]: Stopped GNOME Accessibility settings.
  Oct 12 10:33:25 nixos kernel: rfkill: input handler enabled
  Oct 12 10:33:25 nixos systemd[813]: gsd-color.service: Succeeded.
  Oct 12 10:33:25 nixos systemd[813]: Stopped GNOME Color management.
  Oct 12 10:33:25 nixos systemd[813]: gsd-datetime.service: Succeeded.
  Oct 12 10:33:25 nixos systemd[813]: Stopped GNOME Date & Time handling.
  Oct 12 10:33:25 nixos systemd[813]: gsd-housekeeping.service: Succeeded.
  Oct 12 10:33:25 nixos systemd[813]: Stopped GNOME Maintenance of expirable data.
  Oct 12 10:33:25 nixos systemd[813]: gsd-print-notifications.service: Succeeded.
  Oct 12 10:33:25 nixos systemd[813]: Stopped GNOME Printer notifications.
  Oct 12 10:33:25 nixos systemd[813]: gsd-rfkill.service: Succeeded.
  Oct 12 10:33:25 nixos systemd[813]: Stopped GNOME RFKill handling.
  Oct 12 10:33:25 nixos systemd[813]: gsd-screensaver-proxy.service: Succeeded.
  Oct 12 10:33:25 nixos systemd[813]: Stopped GNOME Freedesktop screensaver handling.
  Oct 12 10:33:25 nixos systemd[813]: gsd-sharing.service: Succeeded.
  Oct 12 10:33:25 nixos systemd[813]: Stopped GNOME Sharing handling.
  Oct 12 10:33:25 nixos systemd[813]: gsd-smartcard.service: Succeeded.
  Oct 12 10:33:25 nixos systemd[813]: Stopped GNOME Smartcard handling.
  Oct 12 10:33:25 nixos systemd[813]: gsd-wwan.service: Succeeded.
  Oct 12 10:33:25 nixos systemd[813]: Stopped GNOME WWan management.
  Oct 12 10:33:25 nixos systemd[813]: gnome-session-monitor.service: Succeeded.
  Oct 12 10:33:25 nixos systemd[813]: Stopped Monitor Session leader for GNOME Session.
  Oct 12 10:33:25 nixos systemd[813]: gsd-xsettings.service: Succeeded.
  Oct 12 10:33:25 nixos systemd[813]: Stopped GNOME XSettings.
  Oct 12 10:33:25 nixos gdm-autologin][808]: GdmCommon: process (pid:826) done (status:0)
  Oct 12 10:33:25 nixos gdm-autologin][808]: GdmSessionWorker: uninitializing PAM
  Oct 12 10:33:25 nixos gdm-autologin][808]: pam_unix(gdm-autologin:session): session closed for user hed
  Oct 12 10:33:25 nixos gdm-autologin][808]: GdmSessionWorker: jumping to VT 7
  Oct 12 10:33:25 nixos gdm-autologin][808]: GdmSessionWorker: state NONE
  Oct 12 10:33:25 nixos gdm-autologin][808]: Worker finished
  Oct 12 10:33:25 nixos systemd-logind[684]: Session 1 logged out. Waiting for processes to exit.
  Oct 12 10:33:25 nixos systemd[1]: session-1.scope: Succeeded.
  Oct 12 10:33:25 nixos systemd-logind[684]: Removed session 1.
  Oct 12 10:33:25 nixos systemd-udevd[392]: Network interface NamePolicy= disabled on kernel command line, ignoring.
  Oct 12 10:33:25 nixos gdm[804]: GdmCommon: process (pid:808) done (status:0)
  Oct 12 10:33:25 nixos gdm[804]: GdmSessionWorkerJob: SessionWorkerJob died
  Oct 12 10:33:25 nixos gdm[804]: GdmDisplay: unmanage display
  Oct 12 10:33:25 nixos gdm[804]: GdmLocalDisplayFactory: display status changed: 0
  Oct 12 10:33:25 nixos gdm[804]: GdmLocalDisplayFactory: display status changed: 4
  Oct 12 10:33:25 nixos gdm[804]: GdmLocalDisplayFactory: enumerating seats from logind
  Oct 12 10:33:25 nixos gdm[804]: GdmLocalDisplayFactory: wayland login display for seat seat0 requested
  Oct 12 10:33:25 nixos gdm[804]: GdmLocalDisplayFactory: Adding display on seat seat0
  Oct 12 10:33:25 nixos gdm[804]: GdmDisplay: id: (null)
  Oct 12 10:33:25 nixos gdm[804]: GdmDisplay: seat id: (null)
  Oct 12 10:33:25 nixos gdm[804]: GdmDisplay: session class: greeter
  Oct 12 10:33:25 nixos gdm[804]: GdmDisplay: initial: no
  Oct 12 10:33:25 nixos gdm[804]: GdmDisplay: allow timed login: yes
  Oct 12 10:33:25 nixos gdm[804]: GdmDisplay: local: yes
  Oct 12 10:33:25 nixos gdm[804]: GdmDisplay: session type: wayland
  Oct 12 10:33:25 nixos gdm[804]: GdmDisplay: seat id: seat0
  Oct 12 10:33:25 nixos gdm[804]: GdmDisplay: initial: yes
  Oct 12 10:33:25 nixos gdm[804]: GdmDisplayStore: Adding display /org/gnome/DisplayManager/Displays/11219920 to store
  Oct 12 10:33:25 nixos gdm[804]: GdmDisplay: Managing display: /org/gnome/DisplayManager/Displays/11219920
  Oct 12 10:33:25 nixos gdm[804]: GdmDisplay: Preparing display: /org/gnome/DisplayManager/Displays/11219920
  Oct 12 10:33:25 nixos systemd-udevd[392]: /nix/store/cdv4ir8254bh6yq6g2qxgf2lvm0v9chk-udev-rules/11-dm-lvm.rules:40 Invalid value for OPTIONS key, ignoring: 'event_timeout=180'
  Oct 12 10:33:25 nixos systemd-udevd[392]: /nix/store/cdv4ir8254bh6yq6g2qxgf2lvm0v9chk-udev-rules/11-dm-lvm.rules:40 The line takes no effect, ignoring.
  Oct 12 10:33:25 nixos systemd-udevd[392]: /nix/store/cdv4ir8254bh6yq6g2qxgf2lvm0v9chk-udev-rules/84-nm-drivers.rules:10 Invalid value "/nix/store/l6h4ya0wzb4b8mr0y58k2gh2nhfql4sn-bash-4.4-p23/bin/bash -c '/nix/store/qv79j3glsdmfhdzwjwa5ys3s7k0kary5-ethtool-5.2/bin/ethtool -i $1 | /nix/store/5pwj1q9zbs89xv9wlmp554p4fixz9im4-gnused-4.7/bin/sed -n s/^driver:\ //p' -- $env{INTERFACE}" for PROGRAM (char 142: invalid substitution type), ignoring, but please fix it.
  Oct 12 10:33:26 nixos systemd[813]: gsd-keyboard.service: Succeeded.
  Oct 12 10:33:26 nixos systemd[813]: Stopped GNOME Keyboard handling.
  Oct 12 10:33:26 nixos systemd[813]: gsd-power.service: Succeeded.
  Oct 12 10:33:26 nixos systemd[813]: Stopped GNOME Power management handling.
  Oct 12 10:33:26 nixos systemd[813]: gsd-wacom.service: Succeeded.
  Oct 12 10:33:26 nixos systemd[813]: Stopped GNOME Wacom handling.
  Oct 12 10:33:26 nixos gdm[804]: GdmDisplay: Checking kernel command buffer loglevel=4 net.ifnames=0 init=/nix/store/i984dhl75npbf2kirnyylnfqb0sjwk1l-nixos-system-nixos-20.03.git.204ed3942b4/init regInfo=/nix/store/1xlrb27rzkqy15kd2ybl8z0g8v0ld8hg-closure-info/registration console=ttyS0,115200n8 console=tty0
  Oct 12 10:33:26 nixos gdm[804]: GdmDisplay: Failed to read kernel commandline: Could not match gnome.initial-setup= in kernel cmdline
  Oct 12 10:33:26 nixos gdm[804]: doing initial setup? no
  Oct 12 10:33:26 nixos gdm[804]: GdmDisplay: prepare display
  Oct 12 10:33:26 nixos gdm[804]: GdmLocalDisplayFactory: display status changed: 1
  Oct 12 10:33:26 nixos gdm[804]: GdmDisplay: finish display
  Oct 12 10:33:26 nixos gdm[804]: GLib: g_hash_table_foreach: assertion 'version == hash_table->version' failed
  Oct 12 10:33:26 nixos gdm[804]: GdmDisplayStore: Clearing display store
  Oct 12 10:33:26 nixos gdm[804]: GdmDisplayStore: Unreffing display: 0xab33d0
  Oct 12 10:33:26 nixos gdm[804]: GdmDisplay: Disposing display
  Oct 12 10:33:26 nixos gdm[804]: GdmDisplay: Finalizing display: /org/gnome/DisplayManager/Displays/11219920
  Oct 12 10:33:26 nixos gdm[804]: GdmDisplayStore: Unreffing display: 0xab32e0
  Oct 12 10:33:26 nixos systemd[1]: display-manager.service: Succeeded.
  Oct 12 10:33:26 nixos systemd[1]: Starting X11 Server...
  Oct 12 10:33:26 nixos gdm[1831]: Enabling debugging
  Oct 12 10:33:26 nixos gdm[1831]: Changing user:group to gdm:gdm
  Oct 12 10:33:26 nixos systemd[1]: Started X11 Server.
  Oct 12 10:33:26 nixos gdm[1831]: Successfully connected to D-Bus
  Oct 12 10:33:26 nixos gdm[1831]: GdmManager: GDM starting to manage displays
  Oct 12 10:33:26 nixos gdm[1831]: GLib: posix_spawn avoided (fd close requested)
  Oct 12 10:33:26 nixos nixos[1672]: finished switching to system configuration /nix/store/lqswha7708f92cafjdmlfpclkw8rqica-nixos-system-nixos-20.03.git.b943338ea58

Edit: I patched nixos-rebuild so it would tag vms with the correct git tag (nixos-version consistently reporting the wrong version inside a VM made me doubt my sanity somewhat)

@hedning
Copy link
Contributor Author

hedning commented Oct 13, 2019

Right, looks there's an issue with the interaction between plymouth and the new display-manager conflicts with plymouth-quit from #70434. I'm at least able to reproduce session crashing using /run/current-system/bin/switch-configuration test with plymouth enabled.

Tried some stuff (eg. updated to plymouth git master, which fedora is on), but to no avail. We might need to drop the conflict. Don't think we actually make use of it properly. It's probably there to handle fading plymouth reliably (eg. it would look bad if plymouth dies in the middle of fading). But we don't support any fading, and plymouth is pretty buggy all over.

@worldofpeace
Copy link
Contributor

worldofpeace commented Oct 13, 2019

@hedning Sounds good. It seems that being tty1 does cause issues, but there's the issue with the conflict also.

@hedning
Copy link
Contributor Author

hedning commented Oct 13, 2019

It seems that being tty1 does cause issues, but there's the issue with the conflict also.

Yep, looks like two fairly unrelated problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants