Treat a missing ps as no running processes - #805
Merged
Conversation
process.Start was unguarded, so a machine without ps raised Win32Exception, and a non-zero exit threw as well. Both propagate out of ProcessCleanup's static constructor, which turns them into a TypeInitializationException on every launch and every kill for the life of the process. A minimal container without procps is the ordinary way to get there, and one that does not set DOTNET_RUNNING_IN_CONTAINER gets no help from the disabled check either. The right answer is the one the timeout path already gives: no running processes, traced, carry on. Testable because Windows is a machine with no ps. The code is only used on Linux and macOS, but nothing about it refuses to run here, and here the executable is genuinely absent - so the test drives the real failure rather than a simulation of it. It fails without the guard.
This was referenced Aug 26, 2026
This was referenced Aug 27, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
process.Start was unguarded, so a machine without ps raised Win32Exception, and
a non-zero exit threw as well. Both propagate out of ProcessCleanup's static
constructor, which turns them into a TypeInitializationException on every launch
and every kill for the life of the process.
A minimal container without procps is the ordinary way to get there, and one
that does not set DOTNET_RUNNING_IN_CONTAINER gets no help from the disabled
check either. The right answer is the one the timeout path already gives: no
running processes, traced, carry on.
Testable because Windows is a machine with no ps. The code is only used on Linux
and macOS, but nothing about it refuses to run here, and here the executable is
genuinely absent - so the test drives the real failure rather than a simulation
of it. It fails without the guard.