Skip to content

fix(extensions): harden plugin rpc bridge against stdin flush hangs and manifest request timeouts - #668

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/666-plugin-rpc-bridge-resilience
Aug 30, 2026
Merged

fix(extensions): harden plugin rpc bridge against stdin flush hangs and manifest request timeouts#668
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/666-plugin-rpc-bridge-resilience

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #666

Summary of Changes

  • Unbounded stdin flush protection: Wrapped _stdin.flush() in JsonRpcStdioClient.sendRequest with a 3-second timeout and clean request error/removal, preventing permanent UI freezes when OS pipe buffers fill up during child process hangs.
  • Watchdog deadlock instant abort: When SandboxWatchdog detects a ping timeout (deadlock), PluginRpcBridge now immediately fails in-flight requests with PluginDeadlockException and disposes local handles without waiting for full RPC request timeout.
  • Dynamic analytical query timeouts from manifest: Added timeout_seconds to ResourceLimits. ExtensionDriverSession now passes the manifest-configured timeout (e.g. 600s for ClickHouse) to PluginRpcBridge instead of restricting queries to the default 30s.
  • Handshake timeout & stderr diagnostics: Increased default handshake timeout to 6 seconds and appended recent stderr lines from SandboxStderrPipe to the thrown PluginProtocolTimeoutException.
  • Automatic dead-bridge cleanup: Added onProcessExited hook to PluginRpcBridge so ExtensionDriverSession immediately drops terminated processes from _bridges upon exit.
  • Comprehensive tests: Added unit tests covering onProcessExited, handshake timeout stderr output, PluginDeadlockException, and ResourceLimits timeout parsing.

@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 7c40ecd into dev Aug 30, 2026
4 checks passed
@ZhuchkaTriplesix ZhuchkaTriplesix mentioned this pull request Aug 30, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/666-plugin-rpc-bridge-resilience branch August 30, 2026 19:01
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.

1 participant