-
Notifications
You must be signed in to change notification settings - Fork 2.2k
nemoclaw-start.sh Lacks Signal Handlers — SIGTERM Orphans Child Processes - IssueFinder - SN 05 #1427
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingstatus: triageFor new items that haven't been reviewed yet.For new items that haven't been reviewed yet.
Description
Description
Description
The nemoclaw-start.sh script has no signal handlers. When SIGTERM is received (e.g., Docker stop, K8s pod termination), child processes are orphaned rather than gracefully shut down. This can lead to data corruption in running agent tasks.
Affected Area
- File(s): scripts/nemoclaw-start.sh
- Service(s): Container lifecycle
Related GitHub Issue Check
- Matching open issue: [NemoClaw] nemoclaw-start.sh has no signal handlers — SIGTERM orphans child processes and skips graceful shutdown #1015
- Duplicate status: Confirmed existing
- Reasoning: Tracked at [NemoClaw] nemoclaw-start.sh has no signal handlers — SIGTERM orphans child processes and skips graceful shutdown #1015 — priority: high, security label.
Notes
Tracked at #1015 with contributor assigned.
Reproduction Steps
Reproduction Steps
- Start NemoClaw inside Docker (runs
nemoclaw-start.shas PID 1) - Send SIGTERM to the container:
docker stop <container-id>
- Observe: Docker waits the full stop timeout (10s default) then sends SIGKILL
- The gateway and child processes are not gracefully shut down
- Verify no trap is set:
grep -n 'trap' scripts/nemoclaw-start.sh
Environment
Environment
- OS: Linux (inside Docker container)
- NemoClaw Version: v0.1.0
- Branch: main
- Runtime: Bash (nemoclaw-start.sh as PID 1 / ENTRYPOINT)
- Container / Orchestration Info: Docker container
- Network Setup: N/A
Repository
- https://github.com/NVIDIA/NemoClaw
- Branch: main
Debug Output
# Verify nemoclaw-start.sh runs as PID 1:
docker exec <container-id> cat /proc/1/cmdline | tr '\0' ' '
# Expected: /usr/local/bin/nemoclaw-start /bin/bash
# Check if any signal trap is set:
grep -n 'trap' scripts/nemoclaw-start.sh
# No SIGTERM/SIGINT trap found — signals are not forwarded to children
# Test graceful shutdown:
docker stop --time=2 <container-id>
docker logs <container-id> 2>&1 | tail -5
# Should see abrupt termination, not graceful shutdown messagesLogs
# Docker stop output:
$ docker stop --time=2 nemoclaw-container
# ... waits 2 seconds, then SIGKILL ...
# No "Shutting down gateway..." or "Cleanup complete" messages
# Gateway process killed without cleanup — may leave stale PID files / socketsChecklist
- I confirmed this bug is reproducible
- I searched existing issues and this is not a duplicate
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingstatus: triageFor new items that haven't been reviewed yet.For new items that haven't been reviewed yet.