Skip to content

charly box build hangs indefinitely (futex_wait, idle plugin servers, no timeout, no dump) #588

Closed

Description

@atrawog

Summary

charly box build <box> can hang INDEFINITELY — no timeout, no progress, no log output. Reproduced twice today (2026-09-11) on the same box (android-emulator), both times at the [image-build] step of a charly check run.

Evidence

Run 1 (calver 2026.254.1625) and run 2 (calver 2026.254.1701), both launched from a disposable spike bed:

  • charly check run prints [image-build] START (charly box build) and then NOTHING for 27+ minutes (normally ~2m warm; the heavy android stack ~20m cold).
  • The step log stays at 2 lines: status: RUNNING / command: charly box build.
  • The process tree at hang time:
    • bed charly check run → charly box build android-emulator (PID 3571575) — state S, wchan futex_wait (blocked in a Go mutex/channel wait)
    • ~16 child __plugin serve processes (plugin-cdp, plugin-appium, plugin-crabbox, plugin-cstream, plugin-openclaw, plugin-kube, plugin-spice, plugin-vnc, plugin-mcp, plugin-dbus, plugin-wl, plugin-record, plugin-punktfunk, plugin-adb, plugin-deploy-pod, ...), ALL at 0.0% CPU — idle, not working
  • No .build file activity for 25+ minutes; no buildah/podman build process running; the store was healthy at the time (103.7GB, podman system df clean, corruption cleared) — so this is NOT the store-bloat class.
  • SIGQUIT on the box-build child did not surface a goroutine dump into the step log (the child's stderr is a PIPE consumed by the parent; the dump was lost) — that is itself a diagnosability gap.

Impact

Suspected mechanism (to confirm)

The build appears to eagerly spawn the full composed plugin-server set and then block on one that never becomes ready/never answers (all idle). Candidates: a heavy plugin in the android stack (openclaw/kube/mcp/crabbox/cstream/appium) failing to initialize silently, or a plugin-RPC handshake deadlock. The build has NO overall deadline and NO readiness probe for its plugin children.

Asks (root fixes)

  1. Bound it: the box build must have a total deadline for plugin readiness/RPC (the same class as the rebuild-readiness deadline in plugin-check fix(hooks): key late staging on ANY index-mutating verb, not just add/stage #44) — a hung plugin must fail the step with a named error, not hang forever.
  2. Diagnosability: on a hang, capture and surface a goroutine dump (or a plugin-child readiness report) into the step log — today the SIGQUIT dump is swallowed by the stderr pipe, so the next occurrence is undiagnosable.
  3. Readiness: log each plugin server's startup/ready transition during a build, so the non-responding plugin is identifiable from the log alone.

Activity

  1. atrawog commented on Sep 11, 2026

    @atrawog
    ContributorAuthor

    ADDITIONAL EVIDENCE (2026-09-11, later): the same hang affects charly check live, not just charly box build.

    REPRO

    cd <umbrella> && setsid bash -c 'timeout 600 env CHARLY_REPO_OVERRIDE=opencharly/plugin-adb=<checkout> \
      charly check live check-android-emulator-pod --filter adb > /tmp/adb-live2.log 2>&1; echo EXIT=\$? >> ...'
    
    • Output after 4m40s: only the dev-build WARNING + Resolved @github.com/opencharly/plugin-vm -> v2026.253.1809 (latest tag). NO step output, NO error, no EXIT line.
    • Process: state S, 0.0% CPU, and exactly ONE __plugin serve child alive — i.e. charly is blocked waiting on plugin resolution/invocation, with the target deployment (charly-check-android-emulator-pod, up 13h) perfectly healthy.
    • No activity in ~/.cache/charly/plugins for 3+ minutes.

    So the class is: charly blocks indefinitely on a plugin wait with no deadline — observed at box build (image-build step) AND at check live (plugin resolution/invocation). Both times the process is idle, the children are idle, and there is no timeout, no progress log, and no dump.

    This strengthens ask #1 (a total deadline on plugin readiness/invocation) and ask #2 (surface a goroutine/child-readiness dump on hang): the hang is not specific to the build path, so the bound belongs at the plugin-invocation/readiness seam, not in the build.

  2. aitrawog commented on Oct 6, 2026

    @aitrawog
    Contributor

    RESOLVED — fixed by charly#591 (merged 2026-09-11T19:52:07Z), whose title names this
    issue verbatim: "bound the plugin readiness read so a non-answering plugin can no
    longer hang charly forever (#588)".

    The unbounded plugin serve readiness read is now bounded, so the futex_wait /
    idle-plugin-server hang this issue reports cannot recur.

    Agent: issue-triage · session 01a11139-cee6-76a9-a880-9b07eb6f1cab
    Assisted-by: pi ollama-cloud/deepseek-v4.1-flash (analysed on a live system)

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions