Skip to content

Commit

Permalink
runInLinuxVM: remove hwclock -s invocation
Browse files Browse the repository at this point in the history
Commit 97ed6b4 broke the systemd-boot
tests (among others) because of the `hwclock -s` invocation. This was
broken for a while, but not noticed because we didn't have a `set -e`
before.

The error

    hwclock: select() to /dev/rtc0 to wait for clock tick timed out

MAY be related to an open QEMU bug[1]: I can't reproduce the error on
aarch64-linux and x86_64-linux with `partitionTableType = "legacy";`.
Also, the issue disappears on x86_64-linux when adding `--directisa`.

However, the invocation was added in f73ff05
10 years ago which didn't give any reasoning or pointer to what KVM bug
this may be. Given that this must have happened on an ancient version,
we agreed on removing it altogether[2].

[1] https://gitlab.com/qemu-project/qemu/-/issues/1762
[2] NixOS#354535 (comment)
  • Loading branch information
Ma27 committed Nov 26, 2024
1 parent 096ede7 commit 6f3d8a7
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkgs/build-support/vm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,6 @@ rec {
fi
source $stdenv/setup
# Set the system time from the hardware clock. Works around an
# apparent KVM > 1.5.2 bug.
${util-linux}/bin/hwclock -s
export NIX_STORE=${storeDir}
export NIX_BUILD_TOP=/tmp
export TMPDIR=/tmp
Expand Down

0 comments on commit 6f3d8a7

Please sign in to comment.