Skip to content

Local AI setup failure leaves tray app running with half-installed/unverified local inference #1276

Closed

Description

@larroy

Summary

When Local AI setup fails during inference verification (verify-local-ai-inference), the setup wizard reports "Setup failed" but the OpenClaw Tray app itself is left running in a half-installed state: the llama-server engine/model assets remain on disk, no rollback is attempted, and there is no indication to the user (or to app state) that local inference is unusable. The tray app should not be left running as if nothing happened when a required setup step fails.

Root cause of the observed failure

The specific trigger in this run is a llama-server crash during model warm-up:

[56914] cmn common_init_: warming up the model with an empty run - please wait ...
[56914] CUDA error: shared object initialization failed
[56914] D:\a\llama.cpp\llama.cpp\ggml\src\ggml-cuda\ggml-cuda.cu:107: CUDA error
  current device: 0, in function ggml_cuda_flash_attn_ext_mma_f16_case at .../fattn-mma-f16.cuh:1945
  cudaFuncSetAttribute(..., nbytes_shared_total)
srv operator(): instance name=qwen3.6-35b-a3b-mtp-q4-k-m exited with status -1073740791

This matches ggml-org/llama.cpp#28112 — an intermittent cudaFuncSetAttribute failure (shared object initialization failed) in the flash-attention MMA-F16 kernel on NVIDIA GB10/Blackwell (sm_121) GPUs under Windows ARM64. Hardware/environment matches closely:

  • GPU: NVIDIA RTX Spark N1X (Blackwell, GB10-class)
  • Host: Windows ARM64
  • VRAM: 53 GB free, ~21 GB used by the model (not VRAM-starved)
  • Host RAM: 19.7 GB total, ~6.2 GB free at load time — matches the "structurally scarce" host RAM noted as a suspected factor upstream

That upstream issue is unresolved (no fix yet, reported ~30% failure rate), so this crash should be treated as expected/recoverable on this hardware class rather than a one-off.

Problem this issue tracks (app-side, not the upstream CUDA bug)

Independent of the upstream fix, verify-local-ai-inference failing currently leaves the app in a bad state:

  1. RollbackOnFailure defaults to false (src/OpenClaw.SetupEngine/default-config.json:54), so SetupPipeline.RunAsync (src/OpenClaw.SetupEngine/SetupPipeline.cs:211-223) skips RollbackFailedStep/RollbackCompletedSteps and just returns PipelineOutcome.Failed.
  2. The tray app process keeps running normally after this failure — there's no distinct "local inference unavailable" state surfaced in the UI/tray icon beyond the one-time setup-failed dialog.
  3. Partially-installed llama-server engine binaries/model files remain on disk with no indication they're non-functional, and no automatic retry/backoff for what is a known-intermittent upstream crash.

Expected behavior

  • A failed verify-local-ai-inference step should either roll back the partial local-AI install (so the app doesn't sit in a half-installed state) or clearly mark local AI as disabled/unavailable in ongoing app state, distinct from "healthy."
  • Given the upstream crash is intermittent, consider an automatic bounded retry of the verification step before surfacing failure to the user.
  • The tray app should not silently continue running with local AI advertised as available when the last verification failed.

Repro

  1. On a Windows ARM64 host with an NVIDIA GB10/Blackwell-class GPU (e.g. RTX Spark N1X) with limited host RAM, run OpenClaw setup with Local AI enabled.
  2. Hit the intermittent flash-attention CUDA crash during warm-up (see Misc. bug: Intermittent (~30%) CUDA "shared object initialization failed" at cudaFuncSetAttribute in fattn-mma-f16 on GB10/sm_121 (Windows arm64) ggml-org/llama.cpp#28112) — roughly 1 in 3 attempts per that upstream report.
  3. Observe: setup wizard shows "Setup failed", but the tray app keeps running with local-AI artifacts left on disk in an unverified/broken state.

Environment

  • App: OpenClaw Tray (Dev)
  • Setup engine build referenced in logs: llama-server build 10655 (cb300598d), engine dir b10655\win-arm64
  • GPU: NVIDIA RTX Spark N1X (Blackwell), driver 616.55, CUDA UMD 13.4
  • OS: Windows ARM64

Logs

  • %LOCALAPPDATA%\OpenClawTray-Dev\LocalAI\logs\llama-server.stdout.log
  • %LOCALAPPDATA%\OpenClawTray-Dev\LocalAI\logs\llama-server.stderr.log
  • %APPDATA%\OpenClawTray-Dev\Logs\Setup\setup-engine-*.jsonl

Related

Activity

  1. added
    P2
    impact:ux-friction
    on Sep 1, 2026
  2. clawsweeper commented on Sep 1, 2026

    @clawsweeper

    Thanks for the context here. I did a careful shell check against current main, and this is already implemented.

    The current released setup UI already rolls back a failed Local AI verification by default, removes artifacts created in that run, and navigates to a failure state before gateway configuration can proceed. The reported RollbackOnFailure: false default applies to non-UI configuration; the UI explicitly overrides it unless launched with the debugging opt-out.

    So I’m closing this as already implemented rather than keeping a duplicate issue open.

    Review details

    Best possible solution:

    Keep the current default transactional rollback for graphical setup, reserving no-rollback runs for explicit debugging only.

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

    No. The stated graphical setup path is source-disproven on current main: it enables rollback by default, cleans completed Local AI steps after verification failure, and shows a failure screen.

    Is this the best way to solve the issue?

    Yes. The existing default rollback is the narrowest maintainable solution to the reported half-installed state; automatic retry is optional reliability tuning, not required to correct that state.

    Security review:

    Security review: No proposed patch is under security review.

    AGENTS.md: found and applied where relevant.

    What I checked:

    • UI setup overrides the non-UI rollback default: The setup window applies UI defaults from parsed arguments, whose default enables rollback; the only opt-out is the explicit --no-rollback-on-failure debugging flag. Existing tests assert both behaviors. (src/OpenClaw.SetupEngine.UI/SetupWindow.xaml.cs:170, f46400aab24e)
    • Failed verification triggers reverse cleanup: On any failed step with rollback enabled, the pipeline cleans the failed step and completed steps in reverse order. The completed Local AI model and runtime steps remove their installed artifacts. (src/OpenClaw.SetupEngine/SetupPipeline.cs:212, f46400aab24e)
    • Failure cannot proceed into gateway setup: Inference verification is ordered before WSL and gateway setup, and the progress page routes a failed pipeline result to the Setup failed completion state. (src/OpenClaw.SetupEngine/SetupPipeline.cs:67, f46400aab24e)
    • Current Local AI surface distinguishes unhealthy states: The tray Local AI presentation maps failed runtime state to Error and only permits chat when both the runtime and model are verified or loaded. (src/OpenClaw.Tray.WinUI/Presentation/LocalAiPageViewModel.cs:56, f46400aab24e)
    • Current-source provenance: Blame maps the relevant current-release lines to the checked-out release snapshot. Its boundary marker means this checkout cannot establish original line introduction, but it does identify the shipped implementation snapshot and timestamp. (src/OpenClaw.SetupEngine/SetupPipeline.cs:212, f46400aab24e)
    • Release inclusion: The implementation snapshot is the current default branch and is contained in the shipped v2026.7.1-2 tag. (f46400aab24e)

    Likely related people:

    • Karen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    • Dallin Romney: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

    Codex review notes: model internal, reasoning high; reviewed against f46400aab24e; fix evidence: release v2026.7.1-2, commit f46400aab24e.

  3. locked as resolved and limited conversation to collaborators on Sep 4, 2026
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

    P2impact:ux-friction

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions