CI: Retry powershell commands on transient AccessViolationExceptions#3457
Draft
smalis-msft wants to merge 11 commits into
Draft
CI: Retry powershell commands on transient AccessViolationExceptions#3457smalis-msft wants to merge 11 commits into
smalis-msft wants to merge 11 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a Flowey CI step to disable Windows PowerShell engine event logging on Windows runners to mitigate transient powershell.exe startup crashes that cause test flakiness.
Changes:
- Introduces a new Flowey node to harden PowerShell event logging via registry settings.
- Wires the hardening node into the Windows test job’s pre-run dependencies.
- Adds explicit CI workflow steps to run the hardening node before starting test services.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| flowey/flowey_lib_hvlite/src/lib.rs | Exposes the new hardening module from the crate. |
| flowey/flowey_lib_hvlite/src/harden_powershell_event_log.rs | Implements the Windows runner hardening step (registry + event source check). |
| flowey/flowey_lib_hvlite/src/_jobs/consume_and_test_nextest_vmm_tests_archive.rs | Ensures hardening runs before tests on Windows. |
| ci-flowey/openvmm-pr.yaml | Adds pipeline steps to run the hardening node before starting test services. |
| .github/workflows/openvmm-pr.yaml | Adds GitHub Actions steps to run the hardening node in multiple Windows jobs. |
| .github/workflows/openvmm-pr-release.yaml | Adds the hardening step to Windows release PR workflow jobs. |
| .github/workflows/openvmm-ci.yaml | Adds the hardening step to Windows CI workflow jobs. |
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.
Problem
Petri-based VMM tests intermittently fail on Windows CI runners with
powershell.execrashing during session initialization:The crash happens in
InitialSessionState.Bind_LoadProvidersbefore the user's command is dispatched, so retrying is idempotent.Approach
Bake a tightly-scoped retry into
PowerShellBuilder:support/powershell_buildergainsPowerShellBuilder::output(). These run the command and retry up to twice on the exact AV signature (exit0xDEAD+ stderr containing bothSystem.AccessViolationExceptionandEventLogLogProvider). Other failures are returned immediately.petri::run_host_ps(builder)is the PowerShell entry point used by allhyperv/powershell.rscmdlet wrappers. It pipes stdio + logs identically torun_host_cmdbut goes throughPowerShellBuilder::output(), so retry is automatic for every callsite.petri::run_host_cmd(Command)is unchanged for non-PowerShell tools (hvc.exe,vmgs).flowey_lib_hvlite::run_prep_stepslikewise calls.output()on the builder.The retry signature is precise enough that no false positives are expected, and the retried call is the same
Commandinvocation — no partial side effects to worry about.Alternatives considered
pwsh.exe(PowerShell 7): blocked — runner images don't have it preinstalled.EnableEventLogging=0): verified ineffective in CI run25811224088—LogProviderLifecycleEventfires regardless of that switch.