Skip to content

Fix clocktest false failure on high CPU count systems (bugfix)#2539

Open
mreed8855 wants to merge 1 commit into
mainfrom
fix_clocktest_jitter_issue_2
Open

Fix clocktest false failure on high CPU count systems (bugfix)#2539
mreed8855 wants to merge 1 commit into
mainfrom
fix_clocktest_jitter_issue_2

Conversation

@mreed8855
Copy link
Copy Markdown
Collaborator

On systems with many cores (e.g., 688), the cumulative time spent switching affinity and yielding exceeds MAX_JITTER (0.2s). This causes the test to misidentify loop overhead as clock skew.

This patch brackets the sampling loop and normalizes each CPU's timestamp against its relative position in the sequence. This isolates actual hardware jitter from the predictable delay of the measurement loop itself.

Description

This patch brackets the sampling loop and normalizes each CPU's timestamp against its relative position in the sequence. This isolates actual hardware jitter from the predictable delay of the measurement loop itself.

Resolved issues

https://bugs.launchpad.net/hp/+bug/2143999
This issue was seen on 26.04 and also on 24.04 but only on systems with high core counts.

Documentation

Tests

@mreed8855
Copy link
Copy Markdown
Collaborator Author

HPE tested this.

Testing for clock jitter on 688 cpus
PASSED: largest jitter seen was 0.029482

Testing clock direction for 5 minutes...
PASSED: Iteration 0 delta: 0.000200
PASSED: Iteration 1 delta: 0.000158
PASSED: Iteration 2 delta: 0.000225
PASSED: Iteration 3 delta: 0.000175
PASSED: Iteration 4 delta: 0.000148
clock direction test: sleeptime 60 sec per iteration, failed iterations: 0

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.92%. Comparing base (886dac6) to head (71b311b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2539   +/-   ##
=======================================
  Coverage   58.92%   58.92%           
=======================================
  Files         476      476           
  Lines       48039    48039           
  Branches     8577     8577           
=======================================
  Hits        28306    28306           
  Misses      18838    18838           
  Partials      895      895           
Flag Coverage Δ
provider-base 34.10% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

On systems with many cores (e.g., 688), the cumulative time spent switching
affinity and yielding exceeds MAX_JITTER (0.2s). This causes the test to
misidentify loop overhead as clock skew.

This patch brackets the sampling loop and normalizes each CPU's timestamp
against its relative position in the sequence. This isolates actual
hardware jitter from the predictable delay of the measurement loop itself.
@mreed8855 mreed8855 force-pushed the fix_clocktest_jitter_issue_2 branch from afb8002 to 71b311b Compare May 22, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant