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

"proc: Bad value for 'gid'" #20

Closed
Laski opened this issue Aug 5, 2024 · 8 comments
Closed

"proc: Bad value for 'gid'" #20

Laski opened this issue Aug 5, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@Laski
Copy link

Laski commented Aug 5, 2024

After applying the current (477ef33) version via zip-downloading and importing, and then
sudo nixos-rebuild switch a reboot fails with:

proc: Bad value for 'gid'
mount: mounting proc on /proc failed: Invalid argument
tee: /proc/self/fd/8: No such file or directory

Commenting out this lines:


    # Hide processes from other users except root, may cause breakage.
    # See overrides, in desktop section.
    #"/proc" = {
    #  fsType = "proc";
    #  device = "proc";
    #  options = [
    #    "nosuid"
    #    "nodev"
    #    "noexec"
    #    "hidepid=2"
    #    "gid=proc"
    #  ];
    #};
  };

  # Add "proc" group to whitelist /proc access and allow systemd-logind to view
  # /proc in order to unbreak it.
  #users.groups.proc = { };
  #systemd.services.systemd-logind.serviceConfig.SupplementaryGroups = [ "proc" ];

fixes it. It seems to dislike the "gid=proc" parameter (perhaps the group is created afterwards)?

BTW this is the first time I see a group being referred by name (and not id) in mount parameters.

I'm using stateVersion=24.05.

@cynicsketch
Copy link
Owner

cynicsketch commented Aug 5, 2024

Unable to reproduce on my machine. Rebuild for me works fine and so does the mount, where nix automatically replaces the group name with the gid number once the group is created with users.groups.proc = { };

[user@host:~]$ mount | grep /proc
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime,gid=987,hidepid=ptraceable)

[user@host:~]$

I'll try to see if I can reproduce it in a VM.

@cynicsketch
Copy link
Owner

Issue reproduced in a fresh install on a new NixOS 24.05 VM. Unclear why so far?

@cynicsketch cynicsketch added the bug Something isn't working label Aug 5, 2024
@cynicsketch
Copy link
Owner

Please bear with the process, since there are currently some outstanding problems with the current implementation and a "stable" release is pending an initial rewrite.

@cynicsketch
Copy link
Owner

I'm using stateVersion=24.05.

Are you on NixOS 24.05, per chance?

This might have something to do with the version you're on. The boot failure occured in my 24.05 VM, but not on my unstable (24.11) system, and it seems likely that other users are using flakes which also forces upgrading to unstable.

If this is the case, then there's presumably nothing I can do other than advise that all users run on 24.11+ as 24.05 is soon to reach EOL and unlikely to receive any upstream updates anymore as development focuses on the next version.

@Laski
Copy link
Author

Laski commented Aug 19, 2024

Thanks for taking the time to see this!

Are you on NixOS 24.05, per chance?

I think so.

If this is the case, then there's presumably nothing I can do other than advise that all users run on 24.11+ as 24.05 is soon to reach EOL and unlikely to receive any upstream updates anymore as development focuses on the next version.

Oh cool. I'm pretty new to NixOS so I didn't know the versions had so short timespan (I'm assuming 24.05 came out on may? and we're in august).

However if this is not a problem in the new version (probably a kernel upgrade that make the 'gid' accept strings?) I'll close this as "can't reproduce". Perhaps you can update the README with a compatibility notice?

@Laski Laski closed this as not planned Won't fix, can't repro, duplicate, stale Aug 19, 2024
@nakibrayan3
Copy link

I am using nixpkgs-unstable, and I updated my stateVersion to 24.11, but the problem is till present?

@cynicsketch
Copy link
Owner

I am using nixpkgs-unstable, and I updated my stateVersion to 24.11, but the problem is till present?

systemd/systemd#16896

Just to rule this out, what kernel version are you running?

@nakibrayan3
Copy link

I am using nixpkgs-unstable, and I updated my stateVersion to 24.11, but the problem is till present?

systemd/systemd#16896

Just to rule this out, what kernel version are you running?

Linux 6.6.54 NixOS x86_64 GNU/Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants