[SERVER-76700] Increase window of acceptable elapsed CPU times in OperationCPUTimerTest::TestReset Created: 28/Apr/23 Updated: 20/Nov/23 Resolved: 01/May/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Patrick Freed | Assignee: | Patrick Freed |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v7.0
|
||||||||||||||||||||
| Sprint: | Service Arch 2023-05-01, Service Arch 2023-05-15 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 22 | ||||||||||||||||||||
| Description |
|
OperationCPUTimerTest::TestReset has a step where it starts a timer, busy waits for 1ms, and then checks to see if the timer observed 1ms of elapsed CPU time. This has proven to be a flaky assertion, with the elapsed time sometimes being less than 1ms. Most failures see an elapsed CPU time in the 800,000ns range, but some go as low as 150,000ns. My understanding of why this might happen is the following:
In particular, I have a few ideas about what these differences might be:
I can't reproduce this test failure, so I can't be sure that this diagnosis is correct, but the implementation of PosixTimer and the test are simple enough that it seems unlikely that these failures are due to a bug in the server. In light of that, a solution to this would be to make the test accept a wider range of observed CPU time, including time less than the 1ms that was meant to be busy-waited. |
| Comments |
| Comment by Githook User [ 23/Jun/23 ] |
|
Author: {'name': 'Patrick Freed', 'email': 'patrick.freed@mongodb.com', 'username': 'patrickfreed'}Message: |
| Comment by Githook User [ 01/May/23 ] |
|
Author: {'name': 'Patrick Freed', 'email': 'patrick.freed@mongodb.com', 'username': 'patrickfreed'}Message: |