-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
switch-to-configuration-ng: failed to restart sysinit-reactivation.target #378535
Comments
I'm running into the same issue every once in a while on our servers:
sometimes it's |
ping @jmbaur . Seems to be OP worked around it by increasing timeouts in the rust implementation. Does that look sensible to you? |
Forgot to report back, but I confirm I haven't had this issue since I changed the timeout to 10s |
Mind making a PR? |
@arianvp @diogotcorreia seems logical to me. The original values were just reflected to what works for most cases, starting with the switch-test nixos VM test, so fine if we deviate from it to work in more scenarios. @diogotcorreia can you PR your change? |
In certain cases, systemd might take more than 5 seconds to reply through dbus, causing the switch to appear to fail even though it succeeded. This commit increases the timeout to 10 seconds, which should make it more reliable. Additionally, the timeout for the login dbus was also increased for consistency. Fix #378535 (cherry picked from commit 5cc9347)
Nixpkgs version
Describe the bug
I'm using
system.autoUpgrade.enable
(very recently changed to a custom module, but problem happened before) with a flake to upgrade my systems every night (this only happens on a specific system out of 5 that have this module enabled). However, sometimes (2-3 times a week), this unit fails on activation because of a timeout restartingsysinit-reactivation.target
.Here are the full logs for
nixos-rebuild-switch-to-configuration.service
andsysinit-reactivation.target
:Looking at the timestamps, it seems like the activation script tries to restart
sysinit-reactivation.target
at 04:08:49, but it only does at 04:08:55. It appears that systemd doesn't reply through dbus or something and reaches the timeout of 5 seconds.My theory is that the system is under load and something freezes, taking too long to run, but I have no way to verify this claim at the moment.
Steps to reproduce
Unfortunately I'm unsure how to reliably reproduce this. I'd appreciate some pointers on how to get some logs that could help figure out the root of the problem.
Expected behaviour
Activation should complete successfully
Screenshots
No response
Relevant log output
Additional context
Config: https://github.com/diogotcorreia/dotfiles/tree/c115fd5eb54875107079ffd343201d2945a8898c (host
hera
)Maybe related to #313696
I'm going to try and increase the timeout from 5 seconds to 10 seconds and report back, but that might be a dirty fix instead of fixing the underlying issue.
System metadata
"x86_64-linux"
Linux 6.6.72, NixOS, 24.11 (Vicuna), 24.11.20250126.4e96537
yes
yes
nix-env (Nix) 2.24.11
/nix/store/50yickar04m51aqnc43gxf45g2i0n3k9-source
Notify maintainers
@jmbaur
Note for maintainers: Please tag this issue in your pull request description. (i.e.
Resolves #ISSUE
.)I assert that this issue is relevant for Nixpkgs
Is this issue important to you?
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: