-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Test failed: System.IO.Tests.File_Create_Tests.FileSystemWatcher_File_Create_EnablingDisablingNotAffectRaisingEvent #32955
Comments
@VincentBu thanks for opening test issues. Could you please include the full output, including callstack if any? In this case, it's
Let me know if you can't find it in the UI. |
failed again in job: runtime-libraries outerloop 20200425.4 failed test: System.IO.Tests.FileSystemWatcher_Multiple_Test.FileSystemWatcher_File_Delet_NotAffectEachOther Error message
|
Similar failure here: https://dev.azure.com/dnceng/public/_build/results?buildId=632273&view=logs&j=499826eb-b71f-5fb9-e963-df1d0bd97bcc&t=592f02e1-36e2-5ce1-c6c7-5351786e61b6 failed test: Output:
|
failed again in job: runtime-libraries outerloop 20200531.3 Error message
|
failed again in job: runtime-libraries outerloop 20200708.3 failed test: System.IO.Tests.FileSystemWatcher_Multiple_Test.FileSystemWatcher_File_Delet_NotAffectEachOther Error message
|
also failed in job: runtime-libraries outerloop 20200803.2 failed test: System.IO.Tests.FileSystemWatcher_Multiple_Test.FileSystemWatcher_File_Delet_NotAffectEachOther Error message
|
failed again in job: runtime-libraries outerloop 20200827.1 failed test: Configurations: Error message
|
failed again in job: runtime-libraries-coreclr outerloop 20200914.3 failed test: System.IO.Tests.FileSystemWatcher_Multiple_Test.FileSystemWatcher_File_Delet_NotAffectEachOther net5.0-OSX-Release-x64-CoreCLR_release-OSX.1014.Amd64.Open Error message
|
failed again in job: runtime-libraries-coreclr outerloop 20201013.2 failed test: System.IO.Tests.FileSystemWatcher_Multiple_Test.FileSystemWatcher_File_Delet_NotAffectEachOther net6.0-OSX-Release-x64-CoreCLR_release-OSX.1014.Amd64.Open Error message
|
Failed again in run runtime-libraries-coreclr outerloop 20210124.2 Failed tests:
Error message:
|
Failed again in runtime-libraries-coreclr outerloop 20210131.2 Failed tests:
Error message:
|
Failed again in runtime-libraries-coreclr outerloop 20210225.4 Failed test:
Error message:
|
Failed again in runtime-libraries-coreclr outerloop 20210322.2 Failed test:
Error message:
|
Failed again in runtime-libraries-coreclr outerloop 20210505.3 Failed test:
Error message:
|
Happened 56 times, although I think data is cut off at some point earlier than March. TestResults
| join kind=inner WorkItems on WorkItemId
| join kind=inner Jobs on JobId
| where Finished >= datetime(2020-1-1 0:00:00)
| where Method == "FileSystemWatcher_File_Create_EnablingDisablingNotAffectRaisingEvent" or Method == "FileSystemWatcher_File_Delet_NotAffectEachOther"
| where Result == "Fail"
| project Method, Message, QueueAlias, Queued
| summarize count() by Method, QueueAlias, bin(Queued, 5d)
|
For FileSystemWatcher_File_Create_EnablingDisablingNotAffectRaisingEvent, the rarer one, I think the line number is off. It has to be here: runtime/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.Create.cs Line 63 in e7b743c
Here we are subscribing to events for a file , creating the file, and apparently the event handler is getting called more than once. For FileSystemWatcher_File_Delet_NotAffectEachOther it is here runtime/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.MultipleWatchers.cs Line 316 in e7b743c
We delete a file, wait for several delete watchers to all signal, create it again, set watcher 1 to stop watching, delete it, and we see watcher 1 fire nevertheless within ~250ms. One possibility here is that like the first case, we're getting two events (this time for the delete) and the second event is arriving in a race with disabling the watcher. |
In the second case, it is assuming that events are deterministically not received after In the first case, we are flipping EnableRaisingEvents back and forth, and I am guessing that this may lead to a situation where we effectively have two identical watchers. |
It's not obvious how to fix this - I think it's reasonable to say that we do not guarantee that events won't arrive for a little longer after you disable raising events - and in practice for whatever reason this shows up only on Mac. so FileSystemWatcher_File_Delet_NotAffectEachOther should be disabled for Mac, or refactor the disable raising events out. The FileSystemWatcher_File_Create_EnablingDisablingNotAffectRaisingEvent needs a little more analysis. |
Failed again in runtime-libraries-coreclr outerloop 20210517.4 Failed test:
Error message:
|
Failed again in runtime-libraries-coreclr outerloop 20210609.3 Failed test:
Error message:
|
Failed again in: runtime-libraries-coreclr outerloop 20210819.6 Failed test:
Error message:
|
Failed again in: runtime-libraries-coreclr outerloop 20210927.4
Error message:
|
Failed again in: runtime-libraries-coreclr outerloop 20211010.4 Failed test:
Error message:
|
Failed again in: runtime-libraries-coreclr outerloop 20220123.3 Failed test:
Error message:
|
Job:
runtime-libraries outerloop 20200227.1
Related tests:
System.IO.Tests.File_Create_Tests.FileSystemWatcher_File_Create_EnablingDisablingNotAffectRaisingEvent
Error message:
Assert.False() Failure\nExpected: False\nActual: True
The text was updated successfully, but these errors were encountered: