[Test Failure] System.IO.Tests.InternalBufferSizeTests.FileSystemWatcher_InternalBufferSize
Build Information
Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=713266 Build error leg or test failing: System.IO.Tests.InternalBufferSizeTests.FileSystemWatcher_InternalBufferSize Pull request: https://github.com/dotnet/runtime.git/pull/103720
Error Message
Fill the error message using step by step known issues guidance.
{
"ErrorMessage": ["System.IO.Tests.InternalBufferSizeTests.FileSystemWatcher_InternalBufferSize", "Did not observe an error event within 500ms and 3 attempts."] ,
"ErrorPattern": "",
"BuildRetry": false,
"ExcludeConsoleLog": false
}
Known issue validation
Build: :mag_right: https://dev.azure.com/dnceng-public/public/_build/results?buildId=713266
Error message validated: [System.IO.Tests.InternalBufferSizeTests.FileSystemWatcher_InternalBufferSize Did not observe an error event within 500ms and 3 attempts.]
Result validation: :white_check_mark: Known issue matched with the provided build.
Validation performed at: 6/20/2024 11:08:40 AM UTC
Report
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 13 | 58 | 58 |
Tagging subscribers to this area: @dotnet/area-system-io See info in area-owners.md if you want to be subscribed.
AFAIK this cod was not touched for months if not years, I have no idea why it suddenly started failing.
@Jozkee any ideas?
Notes --started 6/19. Windows only both 32 and 64 bit. Apparently no relevant changes in IO or interop stuff.
Test is expecting error event from the OS for particularly large buffer.
- takes default 8KB size and divides by (17 + file name length + 1) to figure how much buffer can hold.
Not clear where this comes from, and it doesn't convert WCHAR into bytes so it will over-estimate. But also seems 17 should be 12, see below. So it should divide by (12 + 2 * (file name length + 1))? - it fires 10 events for each of those entries to try to overflow it.
Guess: wild guess OS patched? Or IO hardware upgraded? Try updating the 10x multiplier.
Aside: comments seem to suggest FILE_NOTIFY_INFORMATION is 16 + 2 * (Path.GetFileName(file.Path).Length + 1) but the leading bytes appear to be 12 not 16 (3x DWORD). In either case that doesn't make 17.
https://github.com/dotnet/runtime/blob/e1f98a13be27efbe0ee3b69aa4673e7e98c5c003/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.InternalBufferSize.cs#L34-L36
Failed in: runtime-coreclr crossgen2 20240622.1
Failed tests:
net9.0-windows-Release-x64-TestReadyToRun_Release-(Windows.Nano.1809.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:nanoserver-1809-helix-amd64
- System.IO.Tests.InternalBufferSizeTests.FileSystemWatcher_InternalBufferSize_SynchronizingObject
Error message:
Did not observe an error event within 500ms and 3 attempts.
Stack trace:
at System.IO.Tests.InternalBufferSizeTests.FileSystemWatcher_InternalBufferSize_SynchronizingObject() in /_/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.InternalBufferSize.cs:line 82
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Reopening for a recurrence on release/8.0 in #136200.
- Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1643140
- Build Analysis: https://github.com/dotnet/runtime/pull/136200/checks?check_run_id=119063576747
- Failing test:
System.IO.Tests.InternalBufferSizeTests.FileSystemWatcher_InternalBufferSize(setToHigherCapacity: False) - Configuration:
net8.0-windows-Debug-x64-CoreCLR_release-Windows.11.Amd64.Client.Open - Error:
Did not observe an error event within 500ms and 3 attempts.
The fix in #103873 is present in main and release/9.0 through release/11.0, but is missing from the failing release/8.0 SHA (da8dbac37b3cb15798931a078672568e5553f85b). The attempted .NET 8 backport, #116432, encountered build errors and was closed unmerged. This recurrence needs a working .NET 8 backport of the test fix.
Build Analysis did not classify this occurrence under this known issue because the issue was closed.