Skip to content

fix(daemon): isolate RPC resets and add persistent diagnostics - #279

Draft
BANANASJIM wants to merge 1 commit into
masterfrom
fix/rpc-reset-diagnostics
Draft

BANANASJIM wants to merge 1 commit into
masterfrom
fix/rpc-reset-diagnostics

Conversation

@BANANASJIM

Copy link
Copy Markdown
Owner

What

Keep the replay daemon serving subsequent RPCs when an accepted client connection resets during request reception, and add opt-in persistent diagnostics for intermittent connection failures.

Why

Refs #278, including the single-PickPixel report. The report includes both persistent failures after a script and isolated descriptor-query failures followed by successful queries. Their root cause is still unconfirmed.

The server currently lets receive-side ConnectionResetError escape its accept loop and silently discards response-send errors. This draft fixes the confirmed connection-isolation defect and collects evidence for the remaining failures.

How

  • Handle read errors per connection, and log failures in JSON, parse-error, and binary response transmission.
  • Record request method/ID, handler completion, response completion, and elapsed time without logging request parameters or tokens in those records.
  • Set RDC_DAEMON_LOG before launching a daemon to retain diagnostic records and enable faulthandler; log PID, Python/platform, and the actual RenderDoc version/module path.
  • Keep native stderr in a separate .stderr companion file. Windows does not preserve CRT append metadata across subprocess handle inheritance, so separate files avoid competing writers overwriting diagnostics.
  • Document a one-shot PowerShell capture workflow. RPCs and scripts are not automatically retried.

Test plan

  • Ruff lint/format, mypy (92 source files), and generated reference/command freshness checks.
  • Full unit suite on Linux / Python 3.14.3: 3089 passed, 6 skipped, 92.39% coverage.
  • 14 new regression/diagnostic cases covering receive/send reset isolation, binary-send failures, phase logs, opt-in configuration, token omission, and log retention.
  • Regression sensitivity: the original server fails the receive-reset recovery and send-failure diagnostic tests.
  • Real TCP smoke: three aborted client connections, each followed by a successful status response from the same daemon; both log files retained.
  • Repository pre-commit pixi run check on Python 3.14.2 and pre-push e2e smoke with RenderDoc 1.41: 26 passed, 0 failed.
  • Windows CI and actual Windows connection/window behavior.
  • Reporter capture on RenderDoc 1.46, including the intermittent one-PickPixel sequence.

This remains a draft pending Windows and reporter-capture verification; it does not claim to resolve an unknown native PickPixel fault or close #278.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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.

Windows: intermittent RPC connection resets (WinError 10054) while replay daemon remains alive

1 participant