Skip to content

Adjust Test_wait_interrupted_user_apc test timeout to handle deviation due to lowres timers. #116066

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lateralusX
Copy link
Member

@lateralusX lateralusX commented May 28, 2025

Looks like outer loop x64 and arm64 Windows lanes hit issues with one of the tests added in #116001.

Test validates that waits are not broken too early by queued APC's by measuring time it spends waiting compared to requested timeout. Test uses higres timer to measure, but it appears that CoreCLR uses lowres timers calculating the wait timeout. Test probably need to include some error margin to handle timer resolution differences.

PR adds logging to the amount of time waited in case of error and increased the acceptance deviations to 500 ms, should be enough to trigger multiple APC's triggering retry of the internal wait with recalculated timeout.

Fixes #116060

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 28, 2025
@lateralusX lateralusX marked this pull request as ready for review May 28, 2025 12:57
@Copilot Copilot AI review requested due to automatic review settings May 28, 2025 12:57
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adjusts the wait timeout test to better accommodate timing deviations observed on Windows lanes using low-res timers. Key changes include lowering the minimum expected wait time to 1500 ms, adding a local variable for elapsed milliseconds, and enhancing the log output in case of a timeout error.

@lateralusX
Copy link
Member Author

lateralusX commented May 28, 2025

/azp run runtime-coreclr outerloop

@dotnet dotnet deleted a comment from azure-pipelines bot May 28, 2025
@dotnet dotnet deleted a comment from azure-pipelines bot May 28, 2025
@dotnet dotnet deleted a comment from azure-pipelines bot May 28, 2025
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@teo-tsirpanis teo-tsirpanis added area-System.Threading and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels May 31, 2025
Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failure: baseservices/threading/regressions/115178/115178/115178.cmd
3 participants