Skip to content

Clock skew detected during build #8318

@bengalih

Description

@bengalih

Version

Microsoft Windows [Version 10.0.19042.1348]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.102.1

Distro Version

Ubuntu 20.04.4 LTS

Other Software

No response

Repro Steps

When building a kernel I would often get multiple clock skew errors as has been discussed in prior bugs such as #4975 when performing a:

sudo make -j 8

During compile my Vmmem and COM Surrogate processes are taking up close to 100% of my CPU cycles.
This is on a i7-3820QM:

bengalih@MOBILEONE:/mnt/c/Users/bengalih$ getconf _NPROCESSORS_ONLN
8

As my system date/time appears normal when starting the build process, I theorized that the heavy hit to the CPU may have been contributing to a small clock drift during compile time. I tested this theory by running with:

sudo make -j 6

I performed at least 3 builds each using 6 and 8 respectively and without fail the clock skew error appeared when using the full 8 core, but never when I ran with 6.
(EDIT: On last build with "6" I did get one skew error when I also opened a zoom meeting on my device during build. This was an anomaly as on all other 6 builds I did not get any skew and on the 8 runs I would get multiple per run).

While this is not a "bug" per-se, many people seeing this issue at build time may be in a similar situation where they are using slightly older processors. However, it may be considered a bug that the kernel scheduler is not reserving cycles for keeping time in sync (as there have been reported other clock skew issues outside of just build).

I wanted to give this as a PSA for others having the issue, and maybe a more official note can be made somewhere, perhaps in the build instructions:

https://github.com/microsoft/WSL2-Linux-Kernel

Expected Behavior

clock can remain in sync even when running highly CPU intensive tasks.

Actual Behavior

clock appears to lose time when running highly CPU intensive tasks.

Diagnostic Logs

make[3]: warning: Clock skew detected. Your build may be incomplete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions