Repository navigation
Closed
Labels
Known Build ErrorUse this to report build issues in the .NET Helix tabarch-x64area-System.Diagnostics.Processos-linuxLinux OS (any supported distro)runtime-coreclrspecific to the CoreCLR runtime
Milestone
Description
Build Information
Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=916912
Build error leg or test failing: net9.0-linux-Release-x64-coreclr_checked-Ubuntu.2204.Amd64.Open
Error Message
{
"ErrorMessage" : ["Expected:", "sleep", ".NET Long Runni"],
"BuildRetry" : true,
"ExcludeConsoleLog" : false
}- PR: [manual] Merge release/9.0-staging into release/9.0 (second pass) #111422
- Queue:
Libraries Test Run checked coreclr linux x64 Release - Job result: https://dev.azure.com/dnceng-public/public/_build/results?buildId=916912&view=logs&j=fe27627b-bd13-56b8-97c3-9bb28451d0b9&t=09d463f5-5a24-5ac9-897c-9929934ad820
- Log file: https://helixr1107v0xd1eu3ibi6ka.blob.core.windows.net/dotnet-runtime-refs-heads-release-90-staging-76ca6898836a48668c/System.Diagnostics.Process.Tests/1/console.1ee5f3c8.log?helixlogtype=result
- Output:
System.Diagnostics.Tests.ProcessTests.ProcessStart_OnLinux_UsesSpecifiedProgram [FAIL]
Assert.Equal() Failure: Strings differ
↓ (pos 0)
Expected: "sleep"
Actual: ".NET Long Runni"
↑ (pos 0)
Stack Trace:
/_/src/libraries/System.Diagnostics.Process/tests/ProcessTests.Unix.cs(354,0): at System.Diagnostics.Tests.ProcessTests.ProcessStart_OnLinux_UsesSpecifiedProgram()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
/_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs(57,0): at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Known issue validation
Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=916912
Error message validated: [Expected: sleep .NET Long Runni]
Result validation: ❌ Known issue did not match with the provided build.
Validation performed at: 1/14/2025 6:55:20 PM UTC
Report
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 0 | 0 | 0 |
Reacted by Copilot
Metadata
Metadata
Assignees
Labels
Known Build ErrorUse this to report build issues in the .NET Helix tabarch-x64area-System.Diagnostics.Processos-linuxLinux OS (any supported distro)runtime-coreclrspecific to the CoreCLR runtime
Activity
dotnet-policy-service commentedon Jan 14, 2025
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process
See info in area-owners.md if you want to be subscribed.
adamsitnik commentedon Jan 15, 2025
I've taken a look at the test implementation and I can't see any reason why it would fail like this (sleep is a native Linux utility, not a .NET command line tool).
runtime/src/libraries/System.Diagnostics.Process/tests/ProcessTests.Unix.cs
Lines 344 to 363 in 5a395ed
For now I am going to move it to Future. If it starts failing more often we can invest more time into that.
danmoseley commentedon Mar 22, 2026
Note
This analysis was generated with the assistance of GitHub Copilot.
Root Cause Analysis: Fork/Exec Race Condition
This appears to be a race condition between
fork()andexecve()in the child process.The test does:
On Linux,
Process.Startusesfork()+execve(). TheProcessobject (with the child PID) is returned afterfork()but potentially beforeexecve("sleep")completes in the child. During that window:/proc/<child_pid>/stat— thecommfield still shows the parent's process name (the .NET test runner), kernel-truncated to 15 chars →".NET Long Runni"/proc/<child_pid>/cmdline— still has the parent's argvGetUntruncatedProcessNametries to match argv[0]/argv[1] againststat.commas a prefix, fails because neither matches"sleep", and falls back to returningstat.comm=".NET Long Runni"This is intermittent because it only fails when the child hasn't completed
execveby the timeProcessNameis read — more likely under CPU pressure on CI machines.Possible Fixes
ProcessNameuntil it stops matching the parent's name (or matches the expected value)/proc/<pid>/exesymlink instead, which atomically reflects the exec'd binaryRelated
This is a duplicate of #106595 (same test, same failure mode).
danmoseley commentedon Mar 22, 2026
Note
This analysis was generated with the assistance of GitHub Copilot, using the known-issue-history skill.
Failure History
Issue #111431 has no meaningful hit count history (only 1 edit, all zeros). The tracking has been on the original issue #106595 instead, which shows:
Failure Periods (#106595)
This pattern is consistent with the fork/exec race condition described above — rare enough to be timing-dependent, but persistent enough that it won't resolve without a test fix.
[-][9.0] Process test expecting sleep but shows .NET long running process[/-][+]Process test expecting sleep but shows .NET long running process[/+]Fix fork/exec race in GetUntruncatedProcessName by using /proc/pid/ex…
Fix flaky Linux process name tests by polling after Process.Start (do…
Fix flaky Linux process name tests by polling after Process.Start (#1…