CI: PowerShell startup intermittently fails with `procargs` errno 5 on macOS
- Dominant language
- C#
- Stars
- 2.1k
- Forks
- 579
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 257
Description
### Android framework version
N/A — this is an Azure Pipelines agent/PowerShell startup failure that occurs before the test-slicing script runs.
### Affected platform version
Azure Pipelines macOS agent in the `MSBuild Emulator Tests macOS > MSBuild+Emulator 7` lane.
Observed in [public build 1579507](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1579507&view=results), task `Slice unit tests with filter`.
### Description
The `PowerShell@2` task failed while starting PowerShell, before executing the test-slicing script. The startup path reported a failed macOS `procargs` call (`errno 5`) and threw `Microsoft.PowerShell.ManagedPSEntry+StartupException`.
This appears to be an intermittent hosted-agent/process-startup failure rather than a test failure. It made the `MSBuild+Emulator 7` CI lane fail without running its assigned tests.
### Steps to Reproduce
No deterministic local reproduction is currently known.
1. Run the public `dotnet-android` pipeline on the macOS hosted agents.
2. Observe the `Slice unit tests with filter` PowerShell task in an MSBuild emulator lane.
3. In the affected run, PowerShell fails during startup before the script executes.
### Did you find any workaround?
Rerun the affected CI job or pipeline.
### Relevant log output
```text
Call to 'procargs' failed with errno 5
Microsoft.PowerShell.ManagedPSEntry+StartupException
PowerShell exited with code 'null'.
```
The failure occurred in [build 1579507](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1579507&view=results), `MSBuild Emulator Tests macOS > MSBuild+Emulator 7 > Slice unit tests with filter`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Azure Pipelines macOS lane, specifically the `MSBuild+Emulator 7` `Slice unit tests with filter` PowerShell@2 task and public build 1579507 logs. Investigate the intermittent `procargs` errno 5 startup failure and define a reliable mitigation so the task starts and assigned tests run instead of requiring a rerun.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, macos, powershell
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100