Skip to content

Client debugger subscriptions fail during startup with a kernel clock timeout #147

Open

Description

@BartvHelvert

What happened

In run 2 of PR #135's diagnostics batch, SplitModeRuntimeTest never found a client debugger variable (last observed: []). Before the test started debugging, client startup had already failed several platform RPC subscriptions with TimedOutWaitingForClockException. In particular, FrontendXDebuggerManager's coroutine was cancelled. The backend subsequently logged DapDebugSession - Applying update for threads, but the client never drew the variables tree.

Waiting longer for variables cannot restore a cancelled subscription. The cause of the missing kernel transaction remains under investigation; the evidence does not identify a CodeBridge DAP adapter failure.

Steps to reproduce

Run :ui-test:test --tests '*SplitModeRuntimeTest' repeatedly on a busy Windows runner. Inspect client startup logs if the variables tree never appears.

CodeBridge commit

f95c92a01e03028fa17e8ee3cce71a92d9e3a258

IDE

IntelliJ IDEA / JetBrains Client 263.7307.200

Operating system

Windows 2025 GitHub Actions runner

IDE mode

Split mode (remote development)

Logs

Failing run. See ui-test-reports-windows-2025-1, TEST-me.helvert.codebridge.uitest.runtime.SplitModeRuntimeTest.xml, and both split-mode-runtime IDE logs in ui-test-ide-logs-windows-2025-1.

The client reports the first clock timeout at 21:27:43 and a failed XDependentBreakpointManagerApi#breakpointDependencies call at 21:28:02, with FrontendXDebuggerManager cancellation. The backend applies the debug thread update at 21:29:05.

Acceptance criteria

  • A busy split-mode startup preserves the client's debugger subscriptions.
  • Failed startup synchronization is distinguished from a missing adapter variable in test diagnostics.
  • The runtime UI test still verifies variables, step, resume, pause, and stop.

Activity

  1. added
    bug
    on Nov 9, 2026
  2. BartvHelvert commented on Nov 10, 2026

    @BartvHelvert
    OwnerAuthor

    Not a debugger problem: a startup-wide clock-timeout storm, and only the platform's half fails to recover

    From the client log of the known failure
    (run 42692759822,
    split-mode-runtime):

    21:27:21,338 SEVERE - PerformanceWatcherImpl - UI was frozen for 5029ms
    21:27:43,5xx SEVERE - ... Failure[fleet.kernel.rebase.TimedOutWaitingForClockException ...]
    

    The clock timeout is not confined to the debugger. In the seconds after that freeze, 25
    distinct RPCs
    failed the same way:

    4  DockerServiceViewUiUpdatesRpc#getUiRequestsFlow      2  StructureTreeApi#getShowPopupRequestFlow
    4  DockerServerRuntimeRpc#getServerRuntimeFlow          2  FileSwitcherApi#updateRecentFilesBackendState
    3  PluginManagerApi#updateCustomRepositories            2  RpcCompletionService#autopopupRequests
    3  FreezeReporterRemoteApi#getRegistrySettings          2  GitRepositoryApi#getRepositoriesEvents
    2  MarkdownCommandRunnerRemoteApi#frontendRunnerRequests
    2  XDebuggerManagerApi#initialize            <-- the one this issue is about
    2  XDebuggerManagerApi#getBreakpoints
    2  XBreakpointApi#getDefaultGroup
    2  XDependentBreakpointManagerApi#breakpointDependencies
    1  CodeBridgeApi#decorations
    1  CodeBridgeApi#customEditorTypes
    1  NotebookApi#notebookTypes
    

    So the debugger is not special. A long freeze during client startup puts the kernel clock behind,
    and everything that happens to be subscribing in that window dies with it.

    What separates the casualties

    CodeBridge's three are in that list — and the same log carries three Lost the …; retrying lines.
    Every client-side flow here reconnects: CodeBridgeTreeViewsActivity.retrying,
    CodeBridgeCustomEditors' while (isActive) { try … catch … delay(RETRY) },
    CodeBridgeWorkerHostsActivity, and the rest. They lost their subscription and took it again.

    XDebuggerManagerApi#initialize has no such loop. It fails once, nothing retries it, and the
    client's debugger is never initialised — which is why the variables tree stays empty for the whole
    90 seconds and the backend's later debug thread update has nowhere to land.

    That makes this a platform-side failure, triggered by a client freeze, that CodeBridge code is
    already structured to survive and the platform's debugger is not. Nothing in this repository is
    doing anything wrong, and nothing in this repository can retry someone else's subscription.

    What that means for #150

    The twenty-job batch on 349478fb passed 20/20, so the extra debugger tracing has not reproduced
    it. On this evidence it also would not have added much: the decisive line is
    XDebuggerManagerApi#initialize failing with TimedOutWaitingForClockException, which is already
    in the client log with no instrumentation at all, next to the UI was frozen for … that caused it.

    What would be worth keeping, if anything, is far smaller than the current diagnostic: on failure,
    report whether the client logged a clock timeout for any XDebugger* RPC. That turns a
    90-second empty-tree timeout into a one-line explanation, and it is a grep rather than a
    subscription trace.

    The underlying freeze is the thing to attack if this keeps happening — it is the same two-core
    Windows runner overload behind #140 and #113.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions