Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[CI][Windows] Publisher bootstrap Add-Type fails when environment block exceeds 65535 bytes

Aperta
#26,946 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp, powershell
Ambito
ci-cd, testing

Direzione di ricerca

Start with tools/devops/automation/scripts/test-powershell-core-native.ps1 and inspect the Add-Type invocation at line 24, then review the two linked publisher task logs. Determine how to let the fixture initialize when the inherited environment block exceeds 65,535 bytes; the issue does not identify which variables cause the oversized block. Done means the fixture runs past initialization and reaches its native exit-code assertions in the affected Windows CI publisher.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

ci-postmortem copilot
Apple platform

All Apple targets are affected indirectly: this fails in the Windows CI test-results publisher, before its native-bootstrap fixture can execute. It is not an Apple application runtime failure.

Framework version

net11.0-* (main PR #26930) and net10.0-* (release/10.0.1xx backport #26942). The failing operation is CI PowerShell/C# fixture initialization, not a managed framework test.

Affected platform version

Windows PowerShell Desktop 5.1, established by the exact checked-out script's mandatory edition/version guard before the failing line. Exact Windows OS and PowerShell patch versions are unavailable from these publisher error logs.

The reported maximum process environment block is 65,535 bytes; the two failures report 243,887 and 244,990 bytes. These are the task's reported sizes, not an environment dump or independent variable-size measurement.

Description

Recurring CI infrastructure failure: 2 publisher tasks across 2 distinct monitored PRs.

Test native PowerShell bootstrap failures stops at Add-Type, line 24 of tools/devops/automation/scripts/test-powershell-core-native.ps1. The compiler process cannot start because its environment block exceeds the Windows limit. This occurs before Get-PowerShellVersion and the expected native exit-code 1/0 assertions at line 39, so it is not evidence that native exit propagation failed.

PR / queued source Build / exact publisher job Stage/job/task attempt Reported bytes Observed failure boundary
#26930 / 099816777ca38eac865f67de947e7cfd00192cda 15747841 / publisher 1, task b5cf0d2e-5215-58e4-92cf-6e3360fda5dd, log 3027 1/1/1 243,887 Task Failed 2026-10-20 19:15:09.8433333 UTC; publisher job Failed at 19:15:49.9933333
#26942 / 568453c0b63c6f046d15d9cb43f812ff1ebaf191 15749908 / publisher 2, task 82f32dde-3ff8-527c-0403-7998fb8eca3b, log 3166 2/2/1 244,990 Task Failed 2026-10-20 21:53:07.03 UTC; publisher job/shared parent were still nonterminal in the captured snapshot

First and latest recorded CI failure instants are the task boundaries above. The publisher-2 stage/job belongs to an already observed external Windows retry wave; its dependent publisher is not another retry request. No monitor rerun or source change was submitted.

Own-job source provenance: both publisher PR-reset steps were skipped. Their own successful checkout logs instead verify provider merge commits 16d1a46584d5d811bcec79f79fcb3f008ad5a0d4 (log 3025, first run) and 2c67ce5916d8aaebcc9ff6374860c920bd169f36 (log 3164, second run). Both contain the exact same fixture blob fa44f4ac936d963c40cfc1481454194072718ae9. The queued PR sources are not substituted for these actual checkouts, and source-reset proof from test/reservation jobs is not borrowed.

The task uses powershell.exe; the exact fixture's Desktop-5.1 guard passes before Add-Type. A separate successful Install PowerShell Core step does not prove these assertions ran under Core, that installation was cold, or that a permanent MSI/PATH/worker fix was validated.

Steps to Reproduce
  1. Inspect either linked CI publisher job and its own failed native-bootstrap task log.
  2. Confirm the source checkout and fixture blob above, and the failure at Add-Type line 24.
  3. Observe the environment-block limit error before any expected/actual native exit-code assertion result is emitted.

The environmental trigger is an oversized inherited process environment. Which variable or combination produced that size is not established. No environment contents were dumped, no worker was probed, and no shared CI configuration/environment was changed. This is a CI-observation reproduction, not a request to rerun an unresolved pipeline or alter a shared worker.

Did you find any workaround?

No verified workaround or permanent fix. The monitor's all-actor retry-history/grouping counters remain incomplete, so it did not submit an exploratory retry. A successful fixture in another job does not repair or invalidate this publisher-specific failure.

Before filing, complete separate searches across open and closed issues for the stable signature, exact task name, environment-block/65,535 error, and Add-Type/PowerShell component returned no candidates. No existing canonical issue was found.

Relevant log output
Add-Type : The environment block used to start a process cannot be longer than 65535 bytes.
Your environment block is 243887 bytes.
System.InvalidOperationException,Microsoft.PowerShell.Commands.AddTypeCommand
PowerShell exited with code '1'.

The second task reports the same error with 244990 bytes. No native exit-code fixture result was reached in either failure. This is not the separate pwsh.exe-not-found or SSH-network-timeout failure.

Worker identifiers, IP addresses, credentials, environment contents and raw command lines are intentionally omitted. Artifact retention is limited; the linked task logs and exact source commits are the primary evidence. Helix and application NUnit/TRX results are not applicable to this fixture-initialization failure.

[!NOTE]
Generated by GitHub Copilot.

Lingua principale
C#
Stelle
2.9k
Fork
578
Merge medio
2g 12h
PR unite (30g)
189

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di dotnet/macios

Tutte le issue di dotnet/macios

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.