Fix ASP.NET workloads crashing on Windows due to Linux-only process commands#731
Closed
AlexWFMS wants to merge 2 commits into
Closed
Conversation
…ommands
AspNetServerExecutor and AspNetOrchardServerExecutor unconditionally invoked the
Unix-only commands pkill and fuser (and, for Orchard, nohup). On Windows these
fail to start (''The system cannot find the file specified''), so the workload
crash-loops until VC hits its restart-on-crash cap and the experiment fails --
despite SupportedPlatforms declaring win-x64/win-arm64.
Replace them with platform-aware branches: keep pkill/fuser/nohup on Unix and use
taskkill (and a direct server-executable launch for Orchard) on Windows. Update
the Windows unit tests accordingly; the Linux tests are unchanged.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Clarify that the Bombardier-based profile runs on Windows and Linux while the Wrk-based profiles are Linux-only (Wrk has no Windows build), which matches the now-functional cross-platform server executors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
Superseded by #732, which was opened from a branch on the upstream repo (the team's standard flow) instead of a personal fork. Closing this one. |
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.
Summary
AspNetServerExecutorandAspNetOrchardServerExecutorinvoked Linux-only process commands unconditionally, so the ASP.NET workloads crashed on Windows even though both executors declare[SupportedPlatforms("linux-arm64,linux-x64,win-arm64,win-x64")].KillServerInstancesAsyncranpkillandfuser(Unix-only). On Windows these fail to start (Win32Exception: The system cannot find the file specified), so the workload crash-loops until Virtual Client hits its restart-on-crash cap and the run fails withSystem.AggregateException.AspNetOrchardServerExecutor.StartServerInstancesadditionally launched the server vianohup(Unix-only) — the same failure mode.Fix
Make process cleanup and the Orchard server launch platform-aware:
KillServerInstancesAsync— keeppkill/fuseron Unix; usetaskkill /F /IM <image>on Windows (killing the process also frees the listening port).AspNetOrchardServerExecutor.StartServerInstances— keepnohupon Unix; launch the self-contained server executable directly on Windows.The Unix code paths are unchanged.
taskkillis consistent with the existing Windows kill path inProcessExtensions.SafeKill. I intentionally did not switch toProcessManager.GetProcesses(...)+SafeKill: the testInMemoryProcessManagerdoes not overrideGetProcesses, so that path would call the realProcess.GetProcessesByName("dotnet")during unit tests and could kill the test host's owndotnetprocesses.Testing
Unit tests — updated the Windows expectations in
AspNetServerExecutorTestsandAspNetOrchardServerExecutorTests(Linux tests unchanged). All ASP.NET tests pass (14/14).End-to-end on Azure VMs — self-contained build run on a Windows and a Linux VM with
PERF-WEB-ASPNET-BOMBARDIER.json, telemetry shipped to Kusto:pkill/ "cannot find the file" crashesWindows now runs the full ASP.NET Kestrel + Bombardier workload to completion. Both platforms produce near-identical benchmark results.
Documentation
Added a Platform Support section to
aspnetbench.mdclarifying that the Bombardier-based profile is cross-platform (Windows + Linux) while the Wrk-based profiles are Linux-only (Wrk has no Windows build).