Skip to content

File_Move_Multiple_From_Watched_To_Unwatched_Mac fails with out-of-order Deleted events on osx-arm64 #136698

Closed as not planned

Description

@armanossiloko

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1655766
Build error leg or test failing: System.IO.Tests.File_Move_Tests.File_Move_Multiple_From_Watched_To_Unwatched_Mac (osx-arm64 Debug CoreCLR_AllSubsets, osx.26.arm64.open)
Pull request: #136670

Error Message

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

{
  "ErrorMessage": ["File_Move_Multiple_From_Watched_To_Unwatched_Mac(filesCount:", "Assert.Equal() Failure: Collections differ"],
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

ExcludeConsoleLog is false because this is a theory (filesCount: 3), which needs the console log to be matched.

Details

The test moves file0, file1 and file2 out of a watched directory in that order and asserts that the Deleted events arrive in the same order. Here FSEvents delivered them as file2, file0, file1:

    System.IO.Tests.File_Move_Tests.File_Move_Multiple_From_Watched_To_Unwatched_Mac(filesCount: 3) [FAIL]
      Assert.Equal() Failure: Collections differ
                                                                                      ↓ (pos 0)
      Expected: ArraySelectIterator<<>f__AnonymousType1<string, string>, FiredEvent> [Deleted /tmp/helix/working/B5670902/t/#File_Move_Tests_2ca0yjcg.loy/dir_watched/file0 , Deleted /tmp/helix/working/B5670902/t/#File_Move_Tests_2ca0yjcg.loy/dir_watched/file1 , Deleted /tmp/helix/working/B5670902/t/#File_Move_Tests_2ca0yjcg.loy/dir_watched/file2 ]
      Actual:   List<FiredEvent>                                                     [Deleted /tmp/helix/working/B5670902/t/#File_Move_Tests_2ca0yjcg.loy/dir_watched/file2 , Deleted /tmp/helix/working/B5670902/t/#File_Move_Tests_2ca0yjcg.loy/dir_watched/file0 , Deleted /tmp/helix/working/B5670902/t/#File_Move_Tests_2ca0yjcg.loy/dir_watched/file1 ]
                                                                                      ↑ (pos 0)
      Stack Trace:
        /_/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.Move.cs(236,0): at System.IO.Tests.File_Move_Tests.FileMove_Multiple_FromWatchedToUnwatched(Int32 filesCount, Boolean skipOldEvents)
        /_/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.Move.cs(47,0): at System.IO.Tests.File_Move_Tests.File_Move_Multiple_From_Watched_To_Unwatched_Mac(Int32 filesCount)
        /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/InstanceCalliHelper.cs(111,0): at System.Reflection.InstanceCalliHelper.Call( fn, Object o, Int32 arg1)

Console log

The PR only changes Array.Sort for primitive integer arrays of more than 2048 elements. Neither FileSystemWatcher nor this test sorts anything: ExpectEvents appends events to a List<FiredEvent> in the order the watcher raises them. This test has failed intermittently on macOS before (#31455, #125779), and the directory variant Directory_Move_Multiple_From_Watched_To_Unwatched_Mac is disabled against #70164.


I don't have permission to apply labels. Could someone please add Known Build Error, blocking-clean-ci, area-System.IO and os-macos so that Build Analysis picks this up?

Activity

  1. added
    untriaged
    on Oct 30, 2026
  2. dotnet-policy-service commented on Oct 30, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/area-system-io
    See info in area-owners.md if you want to be subscribed.

  3. removed
    untriaged
    on Nov 6, 2026
  4. armanossiloko commented on Nov 6, 2026

    @armanossiloko
    Author

    Just cleaning up old issues and PRs.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions