-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Conversation
… 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.
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process Issue DetailsBackport of #79817 to release/7.0 /cc @adamsitnik @tmds Customer ImpactTestingRiskIMPORTANT: 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.
|
Do you see anything concerning in the CI? |
Most of the failures are unrelated:
But to be honest I would prefer to wait for the CI to recover and all legs just get green. |
There was a problem hiding this 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.
@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. |
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. |
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! |
Approved by Tactics (7.0.3). |
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
aProcess.WaitForExit()
.Testing
@tmds has verified the fix #79817 (comment)
Risk
The risk is relatively low, as it's very defensive and rather simple.