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

Add retries to ModulesAreDisposedWhenProcessIsDisposed #68104

Merged
merged 2 commits into from
Apr 20, 2022

Conversation

danmoseley
Copy link
Member

Fix #68035

It seems that EnumProcessModules is prone to returning ERROR_PARTIAL_COPY when invoked on a process that is in the process of starting (in some terms). We already have 50ms of retries inside the product for this; possibly that should be more retries, and only for ERROR_PARTIAL_COPY. However I'm reluctant to to modify that without more evidence. Meantime, just adding retries to this one test that calls it immediately after starting a process.

@ghost
Copy link

ghost commented Apr 16, 2022

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

Issue Details

Fix #68035

It seems that EnumProcessModules is prone to returning ERROR_PARTIAL_COPY when invoked on a process that is in the process of starting (in some terms). We already have 50ms of retries inside the product for this; possibly that should be more retries, and only for ERROR_PARTIAL_COPY. However I'm reluctant to to modify that without more evidence. Meantime, just adding retries to this one test that calls it immediately after starting a process.

Author: danmoseley
Assignees: -
Labels:

area-System.Diagnostics.Process

Milestone: -

@danmoseley
Copy link
Member Author

Failure is the indomitable #67349

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @danmoseley !

…sts.cs

Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
@danmoseley
Copy link
Member Author

failures are #68293

@danmoseley danmoseley merged commit 1b329a0 into dotnet:main Apr 20, 2022
@danmoseley danmoseley deleted the partial.read branch April 20, 2022 21:36
directhex pushed a commit to directhex/runtime that referenced this pull request Apr 21, 2022
* Add retries to ModulesAreDisposedWhenProcessIsDisposed

* Update src/libraries/System.Diagnostics.Process/tests/ProcessModuleTests.cs

Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>

Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
@ghost ghost locked as resolved and limited conversation to collaborators May 21, 2022
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.

System.Diagnostics.Tests.ProcessModuleTests.ModulesAreDisposedWhenProcessIsDisposed test is failing
2 participants