You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "me2seeks (via GitHub)" <gi...@apache.org> on 2026/09/09 10:36:08 UTC

[I] bug(runtime-host): live connection teardowns discard their initiating failure [maka]

me2seeks opened a new issue, #5104:
URL: https://github.com/apache/maka/issues/5104

   ### What happened
   
   Desktop repeatedly loses and reconnects its connection to a Runtime Host process that remains alive. During each reconnect window, renderer control-plane reads accumulate and then fail together with `RuntimeHostHandlerUnavailableError`; active Session observation and transcript projection are torn down and rebuilt, producing visible read failures and flicker.
   
   In the captured Windows source run, the Electron main process and Runtime Host candidate process both remained alive for more than 120 minutes with unchanged PIDs and one Host generation. The error windows occurred inside that interval, with no candidate exit, idle shutdown, or `Failed to restore Session observations` loop. This establishes connection-level churn, not process-level churn.
   
   The initiating side of each connection teardown cannot currently be established because accepted Host connection failures are discarded:
   
   - `RuntimeHostConnectionSession.run()` catches unexpected accepted-session failures and calls `#teardown()` without recording the error.
   - `BoundedSerialOutboundWriter` invokes its failure callback without the error, so queue overflow, encoding, and transport write failures lose their original cause before the connection is aborted.
   - A later `host.diagnostics.query` therefore contains no record explaining why the previous connection ended, even though the Host process and its bounded diagnostic buffer survive the reconnect.
   
   This diagnostic loss is independently reproducible on current `origin/main` (`fcff80f58`): make `beginOperation()` reject for an accepted connection, observe that the connection tears down, and observe zero Host-side error records.
   
   Expected: abnormal accepted-connection teardown records one bounded, redacted initiating failure in the existing Runtime Host diagnostic log before aborting the transport. A clean peer EOF remains a normal close and must not be reported as an internal Host failure.
   
   Actual: the client sees downstream `read_eof` / `connection_lost`, but the live Host has discarded the initiating server-side failure.
   
   This issue does not yet claim which abnormal path caused the reported Windows churn. In particular, an ordinary domain handler throw is already converted by `dispatchOperation` to a per-request `internal_failure`; it is not sufficient by itself to tear down the connection. The missing evidence must be retained before changing connection-failure policy.
   
   ### How to reproduce
   
   1. Construct `RuntimeHostConnectionSession` over an in-memory or loopback transport.
   2. Supply an accepted connection and a `beginOperation()` implementation that throws an error containing a secret-shaped value.
   3. Send a valid `turn.query` request.
   4. Observe that `onTeardown` fires and the connection closes.
   5. Observe that no Host diagnostic is recorded on `fcff80f58`.
   
   A regression expecting one redacted `connection session failed` record fails before the proposed fix with `0 !== 1`.
   
   Reported Windows signature:
   
   ```text
   RuntimeHostRequestInterruptedError
     dispatch: not_dispatched
     reason: connection_lost
     cause: RuntimeHostTransportError code=read_eof
   
   RuntimeHostHandlerUnavailableError:
     Runtime Host handler remained unavailable after the reconnection window
   ```
   
   ### Environment
   
   - Reported Maka source commit: `9cb5cc93c`; reproduced diagnostic gap: `fcff80f58`
   - Reported OS: Windows, win32 x64
   - Reproduction OS: Linux
   - Surface: Desktop / Runtime Host
   - Reported Electron / Node.js: 43.4.1 / 24.18.1
   
   ### Logs, screenshots, or additional context
   
   Related but separate:
   
   - #3917 fixed a proven subscription-response/write-queue reconnect cascade and bounded handler replacement waits.
   - #4764 fixed stale observation restoration when `subscription.open` returns `not_found`.
   - #5095 covers SQLite missing Sessions incorrectly becoming `subscription.open` / `internal_failure`.
   - The transcript range-capacity `RangeError` is raised by local transcript assembly after page requests complete; it is not evidence that the connection response pump failed.
   
   The first repair should preserve the original `BoundedSerialOutboundWriter` failure object and record abnormal accepted-session failures through the existing bounded/redacted Host log. A Windows rerun can then identify whether the recurring initiator is outbound capacity, transport write failure, admission, service binding, or another connection-level invariant.
   
   Automated report prepared by OpenAI Codex at the contributor's request.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [I] bug(runtime-host): live connection teardowns discard their initiating failure [maka]

Posted by "me2seeks (via GitHub)" <gi...@apache.org>.
me2seeks commented on issue #5104:
URL: https://github.com/apache/maka/issues/5104#issuecomment-5600472099

   take


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [I] bug(runtime-host): live connection teardowns discard their initiating failure [maka]

Posted by "me2seeks (via GitHub)" <gi...@apache.org>.
me2seeks closed issue #5104: bug(runtime-host): live connection teardowns discard their initiating failure
URL: https://github.com/apache/maka/issues/5104


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org