Skip to content

Fix platform startup hangs and allow newer .NET patches - #687

Closed
boblangley wants to merge 5 commits into
masterfrom
fix/report-platform-startup-failures
Closed

boblangley wants to merge 5 commits into
masterfrom
fix/report-platform-startup-failures

Conversation

@boblangley

Copy link
Copy Markdown
Member

The launcher can wait indefinitely for ServiceControl after a bundled tool has already exited. Missing-runtime diagnostics are discarded when console output is hidden, so the user only sees “Waiting for ServiceControl to be available”.

Set DOTNET_ROLL_FORWARD=LatestPatch in each tool's process environment by default, preserving an explicit caller override. This lets the bundled ServiceControl applications use a newer installed patch without requiring the exact patch in their runtime configuration. It keeps the minimum runtime requirement and puts the policy in the package that launches the tools.

Monitor all four tool processes during startup and while the platform is running. An unexpected exit now fails Launch with the tool name, exit code, and recent stdout/stderr. Output is bounded to 8 KiB per stream and can still be shown live. On exit, cancel the readiness request, give children a shared five-second grace period, and stop remaining processes before removing configuration files. RavenDB's startup and shutdown tokens have separate lifetimes, and its temporary runtime policy is restored even when startup fails.

Addresses the quickstart startup report in the launcher itself. This replaces the sample-level workaround proposed in Particular/docs.particular.net#8592.

Validation:

  • Release solution build and package generation: no warnings or errors.
  • All seven active NUnit tests pass, including four new real-host diagnostic tests and both existing ServicePulse browser tests. The existing explicit network test remains excluded. Tests used clean data and an isolated .NET runtime through vstest.console.dll.
  • Real launcher smoke tests: .NET 10.0.13 starts ServiceControl, Audit, Monitoring, and ServicePulse without a caller roll-forward setting; all four APIs return HTTP 200. A 10.0.3-only .NET 10 installation fails with the missing-10.0.11 diagnostic instead of waiting indefinitely.
  • An explicit Disable policy is preserved. Killing Audit after startup produces an Audit-specific error and cleans up the other children.
  • Process-group Ctrl+C exits successfully with no forced RavenDB-kill message and no child processes left running. A second launch against the same database succeeds.

Local testing ran on macOS arm64 with .NET 10.0.13 and .NET 8.0.32 for the embedded RavenDB server. The repository CI covers Windows and Linux.

Comment thread src/Particular.PlatformSample/PlatformLauncher.cs Outdated
Keep the existing Launch signature and add LaunchWithResult so hosts can inspect an unexpected exit after cleanup. Report child exits through normal control flow and let callers choose their exit code. Cover cancellation, readiness, process exits, and genuine task faults.
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