Skip to content

[DGX Spark][CLI&UX] an interrupted onboard leaves a per-gateway onboard.lock that blocks nemoclaw list and uninstall with no stale-lock diagnosis or remedy #10779

Closed

Description

@wangericnv

Description

Interrupting nemoclaw onboard leaves an onboard.lock file under the gateway's state directory. The lock survives the interrupted process, and afterwards unrelated NemoClaw commands on that gateway port refuse to run - including the read-only nemoclaw list and nemoclaw uninstall. The refusal message talks about migrating legacy state and does not say that a stale lock is present, that its owner is gone, or how to clear it, so there is no path forward from the message itself.

Removing the lock file restores normal operation immediately, which is what identifies it as the cause.

This is a different file and a different failure than the known interrupted-onboard lock problem on the portable host lock, which affects onboard --resume and retries 120 times before giving up. Here the lock is per-gateway-port, no retry happens, and the commands blocked are ordinary read and uninstall commands rather than a resume.

Platform scope: Reproduced on two separate DGX Spark aarch64 hosts running the same build; other platforms not tested.
Regression: Unknown — earlier versions not tested.
OpenShell issue: No

Environment

Device:        DGX Spark (two separate hosts, same result)
OS:            Ubuntu 24.04.4 LTS
Architecture:  aarch64
Node.js:       v22.23.2
npm:           10.9.8
Docker:        Docker version 29.2.1, build a5c7197
OpenShell CLI: openshell 0.0.106
NemoClaw:      nemoclaw v0.0.117
OpenClaw:      2026.7.1

Steps to Reproduce

1. Start an onboarding run against a chosen gateway port and let it reach the sandbox-creation step:

   NEMOCLAW_GATEWAY_PORT=18273 NEMOCLAW_NON_INTERACTIVE=1 NEMOCLAW_PROVIDER=ollama \
     NEMOCLAW_MODEL=qwen2.5:1.5b nemoclaw onboard --fresh --non-interactive --no-gpu \
     --name fxi --yes --yes-i-accept-third-party-software

2. Interrupt it with SIGINT once it prints "Creating sandbox".

3. Confirm the lock is present:
   ls -l "$HOME/.nemoclaw/gateways/18273/onboard.lock"

4. Run an ordinary command against that port:
   NEMOCLAW_GATEWAY_PORT=18273 nemoclaw uninstall --yes

5. On a second host, do the same and then run the read-only listing instead:
   NEMOCLAW_GATEWAY_PORT=18310 nemoclaw list

6. Remove the lock and repeat step 5:
   rm -f "$HOME/.nemoclaw/gateways/18310/onboard.lock"
   NEMOCLAW_GATEWAY_PORT=18310 nemoclaw list

Expected Result

Either the interrupted run does not leave a lock behind, or a lock whose owning run is no longer alive is
recognised as stale and reclaimed. Read-only commands such as nemoclaw list should not be blocked by an
onboarding lock at all. If a command genuinely must refuse, the message should say that a stale onboarding
lock is present, identify it, and state how to clear it.

Actual Result

Step 4 - uninstall refuses, exit 1:

  Cannot safely migrate legacy NemoClaw state for this gateway port: onboarding lock
  /home/{user}/.nemoclaw/gateways/18273/onboard.lock is present; finish or stop that run
  before migrating state
  [exit=1]

Step 5 - the read-only listing refuses with the same message, exit 1:

  Cannot safely migrate legacy NemoClaw state for this gateway port: onboarding lock
  /home/{user}/.nemoclaw/gateways/18310/onboard.lock is present; finish or stop that run
  before migrating state
  [exit=1]

Step 6 - after removing the lock file, the same command succeeds, exit 0:

  Incomplete onboarding:
    nochannel  interrupted at sandbox
  [exit=0]

There is no run left to "finish or stop" - the onboarding process has already exited.

Logs

Two-way control on one host, same command either side of the lock removal:

  lock kind: regular file
  ### list WITH the stale lock present
  exit=1
    Cannot safely migrate legacy NemoClaw state for this gateway port: onboarding lock
    /home/{user}/.nemoclaw/gateways/18310/onboard.lock is present; finish or stop that run
    before migrating state
  lock removed
  ### list WITHOUT the lock
  exit=0

Independent reproduction on the second host, blocking uninstall after a SIGINT during onboarding:

  starting a real onboarding on port 18273 and interrupting it before any sandbox is registered
    gateway dir appeared: YES
    reached the sandbox-creation step: 1
  $ NEMOCLAW_GATEWAY_PORT=18273 nemoclaw uninstall --yes
    Cannot safely migrate legacy NemoClaw state for this gateway port: onboarding lock
    /home/{user}/.nemoclaw/gateways/18273/onboard.lock is present; finish or stop that run
    before migrating state
  [exit=1]

Activity

  1. self-assigned this
    on Sep 2, 2026
  2. assigned and unassigned on Sep 2, 2026
  3. jyaunches commented on Sep 2, 2026

    @jyaunches
    Contributor

    Accepted replacement architecture after closing #10845:

    Delivered behavior to target

    The legacy gateway-state migration gate must distinguish a provably stale onboarding lock from a lock that can still represent an active writer. A proven-stale lock does not block nemoclaw list or nemoclaw uninstall. Migration observes the lock but does not delete it.

    Architecture

    Add one onboard-specific observation/classification boundary:

    • absent: migration may proceed.
    • stale: migration may proceed; stale requires proven-local process death or a strong process-generation mismatch.
    • busy: migration stops with structured remediation. Reasons include active, foreign, unverifiable, publishing, unsafe, unreadable, changing, or oversized state.

    The observer owns one bounded, stable snapshot from a no-follow descriptor. It validates regular-file type and link count, parses the owner record, establishes host and PID-namespace provenance before any local process probe, and uses a strong process-generation identity rather than PID alone.

    Mutation boundary

    Observation does not grant deletion authority. The migration path must not unlink onboard.lock. Physical cleanup remains owned by onboarding acquisition, and normal release requires the descriptor retained by successful acquisition. There will be no PID-only fallback release and no rename-first, verify-after generic reclamation primitive.

    Scope boundary

    This issue does not redesign MCP lifecycle locks, Shields timer authority, destroy/rebuild locking, or generic lock storage. Those protocols have different containment, deadline, takeover, and recovery semantics and require separate accepted issues and concurrency proofs. Only neutral process evidence may be shared when the focused implementation needs it.

    Validation

    Focused coverage will include departed owner, exact PID reuse, active owner, missing strong identity, foreign host or PID namespace, legacy records, malformed/recent publication, oversized and changing records, symlink/FIFO/directory/hard-link paths, and proof that migration never removes the observed lock.

    This direction incorporates the useful safety findings from #10845 while replacing its expanded 30-file design with a small current-main implementation.

  4. added
    area: cli
    area: onboarding
    platform: dgx-spark
    on Sep 3, 2026
  5. added theissue type on Sep 3, 2026
  6. jyaunches commented on Sep 9, 2026

    @jyaunches
    Contributor

    DGX Spark validation passed for PR #10899 at commit 2fabbe18e934877536faf9889617d26084854d72.

    On Ubuntu 24.04 aarch64, the PR build wrote the new process-generation, host, and PID-namespace evidence into a production onboarding lock. While the lock owner was active, nemoclaw list exited 1 and reported the lock as active. After terminating that owner to simulate interrupted onboarding, I left the same lock unchanged. nemoclaw list then exited 0, migrated the legacy state, and preserved the stale lock file.

    The focused observer and migration suites also passed all 40 tests on the Spark.

    This run validates the issue's stale-lock migration path and its active-owner safety case. It used an isolated temporary HOME and did not create a sandbox or invoke uninstall; both affected commands use the migration gate changed by #10899. The temporary state was removed, and existing NemoClaw gateways were unchanged.

  7. jyaunches commented on Sep 9, 2026

    @jyaunches
    Contributor

    Accepted replacement scope for #10779:

    Decision

    Accept.

    This decision supersedes the automatic stale-lock classification architecture in #10779 (comment).

    Reason

    The reported interruption is infrequent. Automatic stale-owner classification adds disproportionate process-provenance, shared-host, PID-namespace, filesystem-race, and long-term test surface. The smaller supported outcome is to clean up a lock that this process owns during a handled interruption and to give an operator a safe recovery path after an abrupt process death.

    Placement

    • The onboarding signal lifecycle releases only the descriptor-owned onboarding lock before it re-raises SIGINT or SIGTERM.
    • The legacy gateway-state migration gate remains fail closed when any onboarding lock is present.
    • The migration error names the lock and tells the operator to confirm that no onboarding process in any environment sharing the state root is active before removing only that lock.
    • Migration does not classify or delete an onboarding lock.

    Accountable maintainer

    J. Yaunches (jyaunches).

    Validation plan

    • A subprocess test proves that a handled signal releases the lock owned by that process.
    • A negative test proves that release without a retained descriptor preserves a foreign lock, including a record that uses the local PID.
    • Migration tests prove that a present lock remains unchanged and that list and uninstall receive actionable recovery guidance.
    • Abrupt termination and unverifiable ownership remain fail closed. Automatic recovery after SIGKILL, host failure, or PID reuse is deferred.
  8. added a commit that references this issue on Sep 10, 2026
    270275f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: cliarea: onboardingplatform: dgx-spark

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions