Skip to content
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

Failing test due to no detected IO events in 'System.IO.Tests.FileSystemWatcherTest.ExecuteAndVerifyEvents' #103584

Open
Sergio0694 opened this issue Jun 17, 2024 · 11 comments
Assignees
Labels
area-System.IO disabled-test The test is disabled in source code against the issue Known Build Error Use this to report build issues in the .NET Helix tab os-windows
Milestone

Comments

@Sergio0694
Copy link
Contributor

Sergio0694 commented Jun 17, 2024

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=709665
Build error leg or test failing: System.IO.Tests.Directory_Delete_Tests.FileSystemWatcher_Directory_Delete_SymLink
Pull request: #103528

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "Deleted event did not occur as expected",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=709665
Error message validated: [Deleted event did not occur as expected]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 6/17/2024 3:57:06 PM UTC

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0
@Sergio0694 Sergio0694 added blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab labels Jun 17, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jun 17, 2024
@jozkee jozkee added this to the 10.0.0 milestone Jul 11, 2024
@jozkee jozkee added os-windows and removed untriaged New issue has not been triaged by the area owner labels Jul 11, 2024
@jozkee
Copy link
Member

jozkee commented Jul 11, 2024

This is just FileSystemWatcher being flaky in Windows as always... We may try to add more retries and see if that makes it less noisy.

@jakobbotsch
Copy link
Member

@jozkee Can you disable the test until the flakiness is resolved? This is marked blocking-clean-ci so I don't think putting it in a 10.0 milestone is appropriate.

@jozkee
Copy link
Member

jozkee commented Jul 11, 2024

What makes an issue be tagged as blocking-clean-ci? i.e. how many times does it have to fail for it to not be blocking-clean-ci-optional?

@jozkee
Copy link
Member

jozkee commented Jul 11, 2024

I'm hesitant on disabling the tests because they are multiple methods, I would have to disable the whole class which seems risky.

@jakobbotsch
Copy link
Member

blocking-clean-ci = it is failing in the default pipelines that run on all PRs. blocking-clean-ci-optional = it is failing in non-default pipelines (like libraries-jitstress).

In both cases the failures are disruptive to a lot of people and should be made non-blocking asap, either by resolving the underlying problems, disabling the tests (with expected future investigation), or removing the tests.

I'm hesitant on disabling the tests because they are multiple methods, I would have to disable the whole class which seems risky.

If these tests are flaky isn't that flakiness just going to mask any real failures, making the test not very useful?

@danmoseley
Copy link
Member

In the past I've fixed other FSW tests by adding more retries (or firing more events). Retries are easy to add and they should be outer loop if not already.

@jakobbotsch
Copy link
Member

We have a ton of open issues about this problem: #103549, #103584, #103630, #103940, #104269, #104564, #104930
It seems to have super high impact. @jozkee can you please look into resolving this issue with high priority?

@jozkee jozkee added the disabled-test The test is disabled in source code against the issue label Jul 18, 2024
@jakobbotsch
Copy link
Member

Still seeing failures, e.g. https://dev.azure.com/dnceng-public/public/_build/results?buildId=747310&view=ms.vss-test-web.build-test-results-tab&runId=18893294&resultId=119514&paneView=debug, console log https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-3c8d50d456884ef49b/System.IO.FileSystem.Watcher.Tests/1/console.7ac301db.log?helixlogtype=result.

  Starting:    System.IO.FileSystem.Watcher.Tests (parallel test collections = on [2 threads], stop on fail = off)
    System.IO.Tests.Directory_NotifyFilter_Tests.FileSystemWatcher_Directory_NotifyFilter_LastWriteTime(filter: LastWrite) [FAIL]
      Changed event did not occur as expected
      Stack Trace:
        /_/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs(317,0): at System.IO.Tests.FileSystemWatcherTest.ExecuteAndVerifyEvents(FileSystemWatcher watcher, WatcherChangeTypes expectedEvents, Action action, Boolean assertExpected, String[] expectedPaths, Int32 timeout)
        /_/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs(198,0): at System.IO.Tests.FileSystemWatcherTest.ExpectEvent(FileSystemWatcher watcher, WatcherChangeTypes expectedEvents, Action action, Action cleanup, String[] expectedPaths, Int32 attempts, Int32 timeout)
        /_/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs(168,0): at System.IO.Tests.FileSystemWatcherTest.ExpectEvent(FileSystemWatcher watcher, WatcherChangeTypes expectedEvents, Action action, Action cleanup, String expectedPath, Int32 attempts, Int32 timeout)
        /_/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.NotifyFilter.cs(136,0): at System.IO.Tests.Directory_NotifyFilter_Tests.FileSystemWatcher_Directory_NotifyFilter_LastWriteTime(NotifyFilters filter)
           at InvokeStub_Directory_NotifyFilter_Tests.FileSystemWatcher_Directory_NotifyFilter_LastWriteTime(Object, Span`1)
           at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
RetryHelper: retrying FileSystemWatcher_Directory_Changed_LastWrite 1th time of 3: got Changed event did not occur as expected

@jozkee
Copy link
Member

jozkee commented Jul 22, 2024

Yes, I disabled the ones reported, it was expected that more would come up.

@jozkee jozkee modified the milestones: 10.0.0, 9.0.0 Jul 22, 2024
@stephentoub stephentoub removed the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Jul 23, 2024
@jeffhandley
Copy link
Member

@jozkee Are there any other tests in this realm that are still active and causing noise, or do you think they're all disabled now? It looks like the hit count has dropped off since you merged in #105254 but I wanted to confirm with you.

If you think we're now clean for the 9.0.0 branch, we can move this to Future and clear the assignee.

@jozkee
Copy link
Member

jozkee commented Aug 6, 2024

Are there any other tests in this realm that are still active and causing noise

Not that I'm aware of.

we can move this to Future and clear the assignee.

#105254 left us with a huge test gap for FileSystemWatcher in Windows. We should find ways to re-enable the tests a reduce their noise. Future is not a good idea, 10.0.0 perhaps.

@jozkee jozkee modified the milestones: 9.0.0, 10.0.0 Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.IO disabled-test The test is disabled in source code against the issue Known Build Error Use this to report build issues in the .NET Helix tab os-windows
Projects
None yet
Development

No branches or pull requests

6 participants