-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Timeout_SetTenMillisecondsOnLoopback_ThrowsWebException is sometimes failing with Assert.InRange() Failure #44494
Comments
Tagging subscribers to this area: @dotnet/ncl Issue meta data
|
This looks like product bug on Windows 7. (where I see all the recent InRange failures) With the added instrumentation, failure for
However, duration of the test was 0.0012442 e.g. ~ 1ms so we should not get timeout before 10ms. All the successful runs have time in 0.01 - 0.02s. While looking for any hints of issues with Window7 timers, I did come across this documentation:
That suggests that the time cannot be completely trusted on old Windows for short durations. let me know how you want to proceed @stephentoub and @geoffkizer |
That's not just on older Windows. Anything that sleeps or is based on timers will by default end up rounding up to 10-15ms quantums. You can see that with a simple test. using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
var sw = new Stopwatch();
while (true)
{
sw.Restart();
Thread.Sleep(1);
//await Task.Delay(1);
Console.WriteLine(sw.Elapsed.TotalMilliseconds);
} |
Yep. It's approx 1/60th of a second, or 16.667ms. Thus it has always been, and thus it will always be. |
I would suggest bumping the timeout up a bit, e.g. 20ms instead of 10ms; that's probably enough to fix this. |
ok, I'll give it try. |
@Anipik I usually paste in the console as it vanished after a while
|
It is interesting that this test no longe exist in master. Is your branch waaaaay behind @Anipik ??? (it was renamed to reflect new values) |
It’s the release/5.0 branch |
Triage: If the failure rate in 5.0 is significant, we can backport it. Not worth tracking one off release/5.0 test failures. |
This is fork of #40881 where new failure was originally reported. It failed again few times recently in CI.
For master, it was always on Windows7 queue but there are other failures in various PRs (and maybe same root cause)
The text was updated successfully, but these errors were encountered: