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

nscd.service fails after suspend #148306

Closed
pinpox opened this issue Dec 2, 2021 · 5 comments
Closed

nscd.service fails after suspend #148306

pinpox opened this issue Dec 2, 2021 · 5 comments
Labels
0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS

Comments

@pinpox
Copy link
Member

pinpox commented Dec 2, 2021

Describe the bug

After waking up from systemctl suspend the unit nscd.service is in a failed state

Dec 02 18:25:58 ahorn nscd[444566]: 444566 monitored file `/etc/resolv.conf` was written to
Dec 02 18:25:58 ahorn systemd[1]: Stopping Name Service Cache Daemon...
Dec 02 18:25:58 ahorn systemd[1]: nscd.service: Deactivated successfully.
Dec 02 18:25:58 ahorn systemd[1]: Stopped Name Service Cache Daemon.
Dec 02 18:25:58 ahorn systemd[1]: nscd.service: Consumed 16ms CPU time, received 260B IP traffic, sent 150B IP traffic.
Dec 02 18:25:58 ahorn systemd[1]: Starting Name Service Cache Daemon...
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring file `/etc/passwd` (1)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring directory `/etc` (2)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring file `/etc/group` (3)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring directory `/etc` (2)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring file `/etc/hosts` (4)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring directory `/etc` (2)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring file `/etc/resolv.conf` (5)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring directory `/etc` (2)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring file `/etc/services` (6)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring directory `/etc` (2)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring file `/etc/netgroup` (7)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring directory `/etc` (2)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring file `/etc/nsswitch.conf` (8)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring directory `/etc` (2)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring file `/etc/nsswitch.conf` (8)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring directory `/etc` (2)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring file `/etc/nsswitch.conf` (8)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring directory `/etc` (2)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring file `/etc/nsswitch.conf` (8)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring directory `/etc` (2)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring file `/etc/nsswitch.conf` (8)
Dec 02 18:25:58 ahorn nscd[444792]: 444792 monitoring directory `/etc` (2)
Dec 02 18:25:58 ahorn systemd[1]: Started Name Service Cache Daemon.
Dec 02 18:26:00 ahorn nscd[444792]: 444792 monitored file `/etc/resolv.conf` was written to
Dec 02 18:26:00 ahorn systemd[1]: Stopping Name Service Cache Daemon...
Dec 02 18:26:00 ahorn systemd[1]: nscd.service: Deactivated successfully.
Dec 02 18:26:00 ahorn systemd[1]: Stopped Name Service Cache Daemon.
Dec 02 18:26:00 ahorn systemd[1]: nscd.service: Consumed 16ms CPU time, received 734B IP traffic, sent 476B IP traffic.
Dec 02 18:26:00 ahorn systemd[1]: nscd.service: Start request repeated too quickly.
Dec 02 18:26:00 ahorn systemd[1]: nscd.service: Failed with result 'start-limit-hit'.
Dec 02 18:26:00 ahorn systemd[1]: Failed to start Name Service Cache Daemon.
×  systemctl list-units --failed
  UNIT         LOAD   ACTIVE SUB    DESCRIPTION
● nscd.service loaded failed failed Name Service Cache Daemon

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
1 loaded units listed.

Restarting the unit manually with systemctl restart nscd.service fixes the problem until the next suspend.

Steps To Reproduce

Steps to reproduce the behavior:

  1. systemctl suspend
  2. systemctl list-units --failed

Expected behavior

Unit not failed after syspend or restart happens automatically

Notify maintainers

@flokli @jameysharp

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 5.10.81, NixOS, 22.05 (Quokka)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.4`
 - channels(root): `""`
 - channels(pinpox): `"home-manager"`
 - nixpkgs: `/nix/store/15aj5hdp6rcwambcgwyva0x82dra3m3w-source`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
  - nscd
@pinpox pinpox added the 0.kind: bug Something is broken label Dec 2, 2021
@veprbl veprbl added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Dec 6, 2021
@pinpox
Copy link
Member Author

pinpox commented Feb 1, 2022

Is there any additional information I can provide to fix this? The error is still present.

@pinpox
Copy link
Member Author

pinpox commented Mar 18, 2022

Pinging @abbradar as you where the last one editing the service file. Any ideas how to fix this?

@pacien
Copy link
Contributor

pacien commented Apr 27, 2022

I'm also experiencing the same issue on NixOS 21.11 at boot, not just when
resuming after suspending. Same output in the logs.

@flokli
Copy link
Contributor

flokli commented Oct 13, 2022

You might be interested in trying #135888 (comment).

@flokli
Copy link
Contributor

flokli commented Feb 2, 2023

nixpkgs master switched to nsncd, which shouldn't have these issues anymore. Please reopen if this is still a problem with nsncd, or if you need to stick with glibc nscd for some reason.

@flokli flokli closed this as completed Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
Projects
None yet
Development

No branches or pull requests

4 participants