Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix flaky FSW test - #103873

#103873
Merged
jozkee merged 3 commits into
dotnet:maindotnet/runtime:mainfrom
danmoseley:fix.fsw.testdanmoseley/runtime:fix.fsw.testCopy head branch name to clipboard
Jun 24, 2024
Merged

Fix flaky FSW test#103873
jozkee merged 3 commits into
dotnet:maindotnet/runtime:mainfrom
danmoseley:fix.fsw.testdanmoseley/runtime:fix.fsw.testCopy head branch name to clipboard

Conversation

@danmoseley

@danmoseley danmoseley commented Jun 23, 2024

Copy link
Copy Markdown
Contributor

Fix #103753

Test does not fail for me locally; making assumption that firing even more events will this will help avoid it failing elsewhere.

  1. Fix the calculation of the size of FILE_NOTIFY_INFORMATION, although this is likely not material.
  2. Fire 250x the number of events that will fill the buffer, instead of 100x. Takes the 3 tests from 3 seconds total to 28 seconds for me. Guessing this is hitting some kind of IO parallelism threshold.
  3. Speed up some by moving file system operations to threadpool. Takes tests to 20 seconds.
  4. Halve size of buffer, also reduce to 200x. Tests are 9 seconds.
  5. It's still slow so move to outerloop.

@ghost ghost added the area-System.IO label Jun 23, 2024
@danmoseley

danmoseley commented Jun 23, 2024

Copy link
Copy Markdown
Contributor Author

BTW error case of too small InternalBufferSize is not being tested on non Windows (which may have different error behavior/limits)

@danmoseley

Copy link
Copy Markdown
Contributor Author

Comment says "where filePath is the path to changed file relative to the path passed into ReadDirectoryChanges." .. but the math does not use the relative path. Small beans; will cause over estimate, increasing events.

@adamsitnik adamsitnik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for providing the fix @danmoseley !

@adamsitnik
adamsitnik requested a review from jozkee June 24, 2024 14:12
@danmoseley

Copy link
Copy Markdown
Contributor Author

Can we run outer loop on this PR? It's just speculation that this will fix the test

@jozkee

jozkee commented Jun 24, 2024

Copy link
Copy Markdown
Member

/azp list

@azure-pipelines

This comment was marked as off-topic.

@jozkee

jozkee commented Jun 24, 2024

Copy link
Copy Markdown
Member

/azp run runtime-libraries-coreclr outerloop-windows

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jozkee

jozkee commented Jun 24, 2024

Copy link
Copy Markdown
Member

#103753 also mentions FileSystemWatcher_Directory_NotifyFilter_Attributes so it won't completely fix it.

@danmoseley

Copy link
Copy Markdown
Contributor Author

Right, not really evidence that's related. Eg., it didn't start on the same day, it only happened once.

@danmoseley

Copy link
Copy Markdown
Contributor Author

OK, Build Analysis is recognizing all failures, so this is good to merge if you're OK with that @jozkee

@jozkee
jozkee merged commit d2eca3b into dotnet:main Jun 24, 2024
@danmoseley
danmoseley deleted the fix.fsw.test branch June 24, 2024 20:44
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 25, 2024
@jozkee

jozkee commented Jun 9, 2025

Copy link
Copy Markdown
Member

/backport to release/8.0-staging

@github-actions github-actions Bot unlocked this conversation Jun 9, 2025
@github-actions

github-actions Bot commented Jun 9, 2025

Copy link
Copy Markdown
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/15537894547

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Test Failure] System.IO.Tests.InternalBufferSizeTests.FileSystemWatcher_InternalBufferSize

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.