Uh oh!
There was an error while loading. Please reload this page.
Process.Unix: while reaping all processes, handle encountering direct children. - #79817
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.
ghost
commented
Dec 19, 2022
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process Issue DetailsThe 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. Fixes #79540. @adamsit ptal
|
tmds
commented
Dec 19, 2022
I've not been able to run the reproducer from the issue. I'll build a .NET dll for .NET 7 that @JaroslavMajera can use to verify this fixes the issue. |
JaroslavMajera
commented
Dec 19, 2022
You can omit errors. They are quite "normal" from headless chromium. The reproducer tries to start chromium in cycle and just kill/stop chromium and again and again. Failure is pretty random. Sometimes it fails after 10 seconds and sometimes it takes minutes. The most important part from logs are start dispose to end dispose. |
tmds
commented
Dec 19, 2022
Can you try using the |
JaroslavMajera
commented
Dec 19, 2022
I am already on holiday. I will try to test it as soon as possible. Is it ok? |
danmoseley
commented
Dec 19, 2022
I think you meant @adamsitnik |
tmds
commented
Dec 19, 2022
Sure, when you have time for it. |
tmds
commented
Dec 21, 2022
I tried again, and it occurred several times within 1-2 minutes after starting the container. With the fix, the container ran continuously for 50 minutes (and then I terminated it manually). @dotnet/area-system-diagnostics-process this is up for review. |
adamsitnik
left a comment
There was a problem hiding this comment.
LGTM, big thanks for your help and the fix @tmds!
adamsitnik
commented
Dec 23, 2022
@jeffhandley@carlossanlop I would like to backport this fix to 7.0, but after waiting a couple of weeks (to test it). What is the deadline for next 7.0 patch release? |
jeffhandley
commented
Dec 24, 2022
We will have a servicing window January 10-16. |
tmds
commented
Jan 10, 2023
@adamsitnik will you start a backport PR? |
adamsitnik
commented
Jan 10, 2023
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3884447954 |
adamsitnik
commented
Jan 10, 2023
The backport PR is ready for Tactics review (#80433, label applied, approved, email sent). |
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.
Fixes#79540.
@adamsit ptal
cc @JaroslavMajera