Skip to content

[Bug]: 2026.10.4→10.8 managed update spends 33 min activating, then cannot stop Gateway due to offline-maintenance state #186754

Open

Description

@ndirazar

Summary

A managed, owner-authorized update from OpenClaw 2026.10.4 to 2026.10.8 on Linux/systemd user service passed candidate validation, then spent about 33 minutes in activation and failed before package swap with managed-service-stop-failed. The updater had already delivered "Restarting OpenClaw…" to the requester, but the Gateway recovered on 2026.10.4 and the requested upgrade did not occur.

Observed sequence

  1. Initial CLI update attempt from an OpenClaw-hosted shell refused with managed-service-preflight (inside-gateway-process-tree); no restart was attempted.
  2. Owner invoked gateway update.run (managed handoff), run ID available locally.
  3. Candidate checks config, database-schema, node-runtime, and plugin-availability all passed. Candidate Gateway startup passed.
  4. During activation, service policy refresh was skipped: SERVICE_DEFINITION_UNKNOWN: [unsafe-permissions] The loaded service definition directory is group/world-writable. The selected systemd drop-in directory was mode 0775 and its drop-in file mode 0664; the main unit and its parent directories were not group-writable.
  5. The updater reported Gateway service stop timeout is 30000ms after policy refresh; preserving operator overrides and using lifecycle drain before stopping.
  6. It ultimately failed: managed-service-stop-failed; bounded diagnostic stderr says OpenClaw state at $OPENCLAW_STATE_DIR/state/openclaw.sqlite is undergoing offline maintenance; retry when it finishes.
  7. openclaw update status records requested 68.92s → staging 0.98s → validating 616.39s → activating 1978.73s. Recovery verified the Gateway serving 2026.10.4 with channels and HTTP ready. CLI still reports 2026.10.4; 2026.10.8 remains available.

The world/group-writable drop-in is an operator-side condition and will be corrected. I am not claiming it caused the SQLite maintenance refusal; both warnings were observed in this run.

Expected

If the existing state is in offline maintenance, detect or resolve the contention before a lengthy activation attempt, or fail promptly with an actionable owner/lease diagnostic. A "Restarting" notice should not imply the upgrade completed; the final failure notice should clearly state that the old version is still serving.

Environment

  • Linux x64, npm global install, stable channel
  • systemd user Gateway service, Node 24.22.1
  • OpenClaw 2026.10.4 → 2026.10.8
  • One observed production run; not independently reproduced
  • No evidence of data loss or continuing Gateway outage

Related but distinct: #178291 reports an offline-maintenance authority failure after target activation; this run failed before the package swap at the managed-service stop.

Activity

  1. added
    clawsweeper:intake:bug
    clawsweeper:intake:needs-repro
    P1
    clawsweeper:needs-maintainer-review
    clawsweeper:no-new-fix-pr
    impact:ux-friction
    issue-rating: 🦪 silver shellfish
    maturity:stable
    and removed
    clawsweeper:intake:bug
    clawsweeper:intake:needs-repro
    on Oct 28, 2026
  2. clawsweeper commented on Oct 28, 2026

    @clawsweeper
    Contributor

    Codex review: this still needs some work.

    Summary
    Keep this issue open: it documents a failed official-release update at the managed service-stop boundary, and existing maintenance fixes do not establish that this incident is resolved.

    Reproducibility: no. high-confidence current-main reproduction is established: the report records one production failure, and source inspection confirms relevant boundaries without identifying the failing caller.

    Next step
    Identify the rejecting service-stop call and maintenance holder from sanitized receipts, then establish a failing installed-driver regression before selecting a repair.

    Review details

    Best possible solution:

    The existing updater should complete or defer safely with holder diagnostics and clearly report that the old version remains serving when activation fails.

    Do we have a high-confidence way to reproduce the issue?

    No high-confidence current-main reproduction is established: the report records one production failure, and source inspection confirms relevant boundaries without identifying the failing caller.

    Is this the best way to solve the issue?

    Diagnose the installed updater's service-stop path before choosing a repair; candidate-only Doctor fixes or weakening live maintenance exclusion would not establish a solution.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The historical maintenance holder, rejecting call site, and source of the prolonged activation remain unidentified.
    • The writable systemd drop-in warning is a separate observed condition whose causal relationship is unproven.
    • Current-main bounded waits and diagnostics have not been exercised through the reported installed-driver update path.

    Codex review notes: model internal, reasoning medium; reviewed against b0966db12046.

    Label changes

    Label changes:

    • add P1: An owner-authorized update between official releases failed after prolonged activation, leaving the requested upgrade incomplete despite successful recovery.
    • add impact:ux-friction: The restart notice preceded failure and the operator remained on the old version; no continuing outage or first-run blockage is established.
    • add maturity:stable: The primary owner is the M4 CLI surface's Updates and Upgrades category, with managed restart and recovery expectations defined by the update contract.
    • add issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.
    • add clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.
    • add clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.

    Label justifications:

    • P1: An owner-authorized update between official releases failed after prolonged activation, leaving the requested upgrade incomplete despite successful recovery.
    • impact:ux-friction: The restart notice preceded failure and the operator remained on the old version; no continuing outage or first-run blockage is established.
    • maturity:stable: The primary owner is the M4 CLI surface's Updates and Upgrades category, with managed restart and recovery expectations defined by the update contract.
    Evidence reviewed

    Acceptance criteria:

    • Establish a failing regression at the identified service-stop boundary with a real native maintenance owner.
    • Replay the published 2026.10.4 driver against the candidate in an isolated Linux/systemd npm installation.
    • Verify bounded contention reporting, holder diagnostics, and preservation of requester revocation and cancellation.
    • Verify failed activation leaves or restores the old Gateway and reports that the requested upgrade did not complete.

    What I checked:

    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed October 28, 2026, 8:46 AM ET / 12:46 UTC.

  3. steipete commented on Oct 28, 2026

    @steipete
    Contributor

    Thanks for the detailed timeline, @ndirazar. The phase durations made this tractable.

    The 33 minutes in activation matches a known limit in the 2026.10.4 updater: the Gateway's lifecycle drain could use the whole 30-minute step budget before the stop was even attempted. #173788 caps that drain at 30 seconds. It landed on main on 2026-10-16, after 2026.10.8 was cut, so it isn't in 2026.10.8 either. It ships in the next release from main.

    We could not reproduce the "undergoing offline maintenance" refusal on current main. The backup and validation steps release their maintenance claim before activation, so we haven't identified what held it in your run. Two other gaps you hit are real, and a fix is in progress:

    • the plain systemctl stop has no timeout of its own
    • the final notice doesn't say that the previous version is still serving, which phase failed, or why

    The fix will also put the recorded maintenance holder into that failure reason.

    If you still have the run locally, the lastRun section of openclaw update status --json, plus the Gateway journal lines around the refusal (journalctl --user -u <your gateway unit> --since "<time of the run>"), would show which process held maintenance. Please redact paths as needed.

  4. steipete commented on Oct 28, 2026

    @steipete
    Contributor

    The fix is merged in #186792 (473d221):

    • The service stop now has a deadline. systemctl stop, for both user and system units, is bounded by the effective stop timeout plus 5 seconds. If it runs out, the update records the reason and goes to its normal recovery instead of waiting.
    • The final notice says what happened. It names the failed phase in plain words and the reason code. When recovery is verified, it also says which version is still serving.
    • An offline-maintenance holder is now named. When the stop is blocked by offline maintenance, the reason includes the process that holds it, and redaction no longer strips it out.

    Together with #173788 (the 30-second drain cap), this ships in the next release from main. If an update fails the same way on that release, the notice and openclaw update status --json will show which process held offline maintenance. Please paste that here.

  5. dougbtv commented on Oct 28, 2026

    @dougbtv
    Contributor

    We hit a related managed-update failure today on Linux x64 with an npm-global install and systemd user Gateway, updating stable 2026.10.4 to 2026.10.8. Candidate admission, snapshots, Doctor, plugin/config convergence, candidate Gateway startup, and state cleanup all passed. Activation then failed before the package swap with global-install-failed: package-swap exited 1 because State schema inspection failed during shared database discovery. The updater preserved 2026.10.4; no data loss was observed. We had about 5 GiB free, so this was not a simple capacity shortfall. The Gateway was deliberately stopped afterward, so its later recovery-verification failure is not evidence of the original activation cause. This appears related to the old installed-driver update path, but distinct from the offline-maintenance service-stop failure described in this issue.

  6. steipete commented on Oct 28, 2026

    @steipete
    Contributor

    Thanks, @dougbtv. You're right that this is distinct from the offline-maintenance stop failure.

    "State schema inspection failed during shared database discovery" comes from the pre-swap activation checkpoint. At that point the installed 2026.10.4 updater runs its own inspection worker against your shared state/openclaw.sqlite and the agent databases it registers. That sentence is a wrapper. The same step can fail for very different reasons: an unreadable or corrupt database or filesystem error, a worker that exited, was signalled or timed out, a lock held past the 30 s busy timeout, or running out of scratch space for the snapshot. Each needs a different fix. Both 10.4 and 10.8 keep the underlying cause in the run record (#164169), so it should be recoverable:

    1. The failed run's lastRun from openclaw update status --json, especially the failed step's failureFacts, stderrTail, termination, signal and timing.
    2. The complete diagnostic, including any Caused by: line and the last progress event, not just the first sentence.
    3. If either points at storage: the size of state/openclaw.sqlite and its -wal file, plus free space on both the state filesystem and the temp/snapshot filesystem (df -h ~/.openclaw "${TMPDIR:-/tmp}"). The snapshot can fill a smaller /tmp even when the state disk has 5 GiB free.

    Redact paths and credentials as needed.

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

    P1clawsweeper:needs-maintainer-reviewclawsweeper:no-new-fix-primpact:ux-frictionissue-rating: 🦪 silver shellfishmaturity:stable

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions