Skip to content

aspnet: Fix server retry lifetime and Bombardier port propagation - #851

Merged
AlexWFMS merged 2 commits into
mainfrom
fix/aspnet-server-lifecycle
Nov 9, 2026
Merged

AlexWFMS merged 2 commits into
mainfrom
fix/aspnet-server-lifecycle

Conversation

@AlexWFMS

@AlexWFMS AlexWFMS commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Stopping an ASP.NET server process did not cancel its background retry task. A previous iteration could restart its server and compete with the next iteration for port 9876, while the profile still emitted success and performance metrics.

  • Share an owned server lifetime between the Kestrel and Orchard executors: cancel retries, stop the owned process tree, and await completion before replacement.
  • Observe background failures, retain shutdown stdout/stderr, and classify native startup errors as workload failures. Keep the existing outcome metric format and default failure policy.
  • Resolve Bombardier's URL from ServerPort using the existing parameter evaluator. The default remains 9876.

Validation

  • Release Main build: no warnings or errors.
  • 26 targeted unit tests and 3 profile tests passed, including URL resolution for ports 9876 and 9800.
  • Baseline/fix Azure comparisons on Windows Server 2022/2025 and Ubuntu covered repeated execution and failure outcomes. Focused final-helper Linux smoke verified restored server logs and Orchard native-start failure classification.

Review notes

Windows affinity support is handled separately by #850; this branch does not include that fix, and combined integration testing is still pending.

Orchard HTTP timeouts occurred in both original and modified builds, including original-duration controls; this PR does not claim to resolve them. The newly included profile port wiring has functional-test coverage, not a new end-to-end Azure run.

Cleanup now targets only processes owned by the executor, rather than killing unrelated processes by image name or port.

Cancel and await each owned server lifetime before replacement so intentional shutdown cannot trigger stale retries. Preserve process diagnostics and standard workload failure handling for Kestrel and Orchard, and resolve Bombardier URLs from the configured server port.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Clarify serialized lifecycle calls, completion versus readiness, and cancellation-independent shutdown.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@AlexWFMS
AlexWFMS enabled auto-merge (squash) November 9, 2026 22:15
@AlexWFMS
AlexWFMS merged commit 73e088d into main Nov 9, 2026
5 checks passed
@AlexWFMS
AlexWFMS deleted the fix/aspnet-server-lifecycle branch November 9, 2026 22:19
AlexWFMS added a commit that referenced this pull request Nov 9, 2026
Increment the patch version after the ASP.NET lifecycle fix in #851 so the updated framework and platform packages receive a new version.

Co-authored-by: Alex Williams-Ferreira <alexwill@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants