dotnet / dotnet/macios

[CI] Windows processes exit 0xC0000142 and agents become unresponsive

Open
#26,490 1 comment 0 reactions 0 assignees View on GitHub
ci-failure ci-postmortem tests
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 12h
Merged PRs (30d)
123

Description

## Failure signature

Windows processes in Azure-hosted 1ES jobs terminate with `STATUS_DLL_INIT_FAILED`:

```text
0xC0000142
unsigned: 3221225794
signed: -1073741502
```

The process failure is followed by an unresponsive or lost Azure agent. The failures happen in injected policy or Configure work before repository source execution can produce a product diagnostic.

**Classification:** CI infrastructure failure.

## Confirmed occurrences

| PR / head | Run and job | Evidence | Retry outcome |
|---|---|---|---|
| #26424 / `f4789d0252494d550cb8de485aebcd4dae4fc322` | [15129243, SDLSources](https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=15129243&view=logs&j=bc38e8b8-e027-53cb-48e7-2adbd1070eca&t=dda153aa-3164-5f35-5796-224fc6cb32ec) | PowerShell exited `3221225794`; auto-injected Component Detection then occupied the job until its 120-minute limit, and the agent did not answer cancellation for five minutes | Failed-jobs attempt 2 succeeded on `AzurePipelines-EO 6` |
| #26477 / `29bb3aeaf5f38dbb8e6220efbd2826a524a9472e` | [15118908, Configure](https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=15118908&view=logs&j=5021ca8c-7c97-5288-bd62-77660ea42c66&t=6682e827-495d-547e-7ca3-4d73a1c2f8cd) | Agent Pool Validation's `node.exe` and checkout cleanup's `Agent.PluginHost.exe` exited `-1073741502`; Azure then stopped hearing from `Azure Pipelines 75` | An external API-diff stage attempt was skipped and did not rerun Configure. A failed-jobs retry has now created Configure job attempt 2 and is active |

This is **2 confirmed occurrences across 2 distinct monitored PRs**.

## Reproduction pattern and impact

- The exact NTSTATUS reproduces across unrelated PRs and different processes.
- Both occurrences are in Windows 1ES/Azure-hosted setup or policy work.
- The associated agent becomes unresponsive or is reported lost.
- Repository checkout or product compilation does not identify a source failure.

The failure blocks otherwise independent main or API-diff pipelines. In the #26477 run, no API comparison baseline was evaluated because Configure failed and both API-diff stage attempts were skipped.

## Investigation performed

- Inspected complete Azure build metadata, current and previous timelines, task issues, worker names, and retry attempts.
- Correlated the signed and unsigned exit-code representations with `0xC0000142`.
- Searched all open and closed `dotnet/macios` issues separately for the hexadecimal code, both decimal forms, `Agent.PluginHost`, agent-loss text, and DLL-initialization terms.
- Inspected #26349 and excluded it: that issue describes server-side timeline records not being persisted with zero task errors, not process exit `0xC0000142`.

## Observation window

- First observed: `2026-08-27T14:56:31Z`
- Latest observed: `2026-08-28T07:06:27Z`

## Workaround

A failed-jobs retry cleared the #26424 occurrence. For #26477, Configure attempt 2 is active. Retry accounting is **3 PR-lifetime / 3 current-head requests**, including an unrelated simulator retry and the ineffective external API-stage attempt.

Azure diagnostic artifacts are retention-limited; only minimal stable evidence is quoted here.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Azure build metadata, timelines, task issues, worker names, and retry attempts cited for runs 15129243 and 15118908. Compare the PowerShell, node.exe, and Agent.PluginHost failures and determine a reproducible remediation for the 0xC0000142 process exits and lost agents; done means the setup or policy jobs complete reliably without the agent becoming unresponsive.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
ci-cd, infrastructure, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.