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

[release/7.0] Process.Unix: while reaping all processes, handle encountering direct children. #80433

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jan 10, 2023

Backport of #79817 to release/7.0

/cc @adamsitnik @tmds

Customer Impact

Customers reported (#79540) unexpected process termination caused by a bug introduced in .NET 7. It affects only .NET processes that run on Unix with pid == 1 (they are responsible for reaping orphaned processes), which start a process which quits before the parent process calls Process.Kill a Process.WaitForExit().

Testing

@tmds has verified the fix #79817 (comment)

Risk

The risk is relatively low, as it's very defensive and rather simple.

… children.

The process that runs as pid 1 is responsible for reaping orphaned processes.
Since .NET 7, .NET applications running as pid 1 assume this responsibility.

The code meant for reaping orphaned processes didn't account for encountering
direct children. These child processes get reaped without updating
the internal state. When the code later tries to reap such a child process
it causes a FailFast because the process is missing.
@ghost
Copy link

ghost commented Jan 10, 2023

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

Issue Details

Backport of #79817 to release/7.0

/cc @adamsitnik @tmds

Customer Impact

Testing

Risk

IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.

Author: github-actions[bot]
Assignees: -
Labels:

area-System.Diagnostics.Process

Milestone: -

@carlossanlop
Copy link
Member

carlossanlop commented Jan 10, 2023

Do you see anything concerning in the CI?

@adamsitnik
Copy link
Member

Most of the failures are unrelated:

Git fetch failed with exit code: 128

Publishing build artifacts failed with an error: Not found PathtoPublish

But to be honest I would prefer to wait for the CI to recover and all legs just get green.

Copy link
Member

@jeffhandley jeffhandley left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks, @adamsitnik and @tmds. We will await Tactics review.

@carlossanlop
Copy link
Member

@adamsitnik please send email to Tactics requesting approval. The Code Complete date has been moved by Tactics to Friday 13th (less than 2 days from now). We want to make sure we merge backports before that time so we can monitor the base servicing branches for any unexpected problems.

@carlossanlop
Copy link
Member

The git issue was temporary and seems to be gone. The other issue is a problem with openssl affecting mostly Apple OSs but there was a fix merged to this branch last night. I'll close and reopen so that we get a cleaner CI rebased on top of that fix.

@adamsitnik
Copy link
Member

please send email to Tactics requesting approval

It has already been approved (email title "RE: [release/7.0] Process.Unix: while reaping all processes, handle encountering direct children")

Thank you for re-running the CI legs!

@ericstj ericstj added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jan 12, 2023
@ericstj ericstj modified the milestones: 7.0.3, 7.0.x Jan 12, 2023
@carlossanlop
Copy link
Member

Approved by Tactics (7.0.3).
Signed off by area owners.
No OOB changes needed for System.Diagnostics.Process (does not have IsPackable=true).
CI failure in the latest run is an intermittent network infra issue, unrelated.
Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit a8e690e into release/7.0 Jan 12, 2023
@carlossanlop carlossanlop deleted the backport/pr-79817-to-release/7.0 branch January 12, 2023 21:27
@ghost ghost locked as resolved and limited conversation to collaborators Feb 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants