Skip to content

[flutter_tools] Support heartbeat / liveness monitoring for long-running tool extension RPCs #193955

Closed as not planned

Description

@bkonyi

In #193748, ExtensionBuildManager.build invokes the build.build RPC on a tool extension isolate without a wall-clock timeout (timeout: null in ExtensionConnection.sendRequest) because complex native builds can legitimately run for many minutes.

While ExtensionConnection already monitors Isolate.addOnExitListener and Isolate.addErrorListener to fail in-flight requests immediately if an extension isolate crashes or exits, a silently deadlocked extension isolate during a long-running operation (build.build, artifact.downloadArtifacts, etc.) will hang indefinitely without a liveness mechanism.

We should consider introducing a heartbeat / progress notification mechanism between package:flutter_tools_extension and ExtensionConnection:

  1. Allow long-running extension RPC handlers (or the extension isolate runner) to emit periodic heartbeat or build progress notifications over the JSON-RPC channel.
  2. Support an optional inactivity/heartbeat timeout on ExtensionConnection.sendRequest that resets whenever a heartbeat or progress notification is received from the extension, rather than bounding total wall-clock execution time.

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    P2Important issues not at the top of the work list
    team-toolOwned by Flutter Tool team
    triaged-toolTriaged by Flutter Tool team
    on Oct 7, 2026
  2. self-assigned this
    on Oct 7, 2026
  3. bkonyi commented on Oct 27, 2026

    @bkonyi
    ContributorAuthor

    Closing as not planned. In-isolate heartbeats and cooperative cancellation are ineffective when an extension hangs on a wedged event loop or synchronous call. Instead, we rely on activity monitoring via existing progress/log notifications and host-side isolate termination on timeout.

  4. github-actions commented on Nov 10, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  5. locked as resolved and limited conversation to collaborators on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions