Repository navigation
Description
Operating system
Linux
Orca version
1.4.56
Details
Operating system: Linux (CentOS 7, headless orca-ide serve via Xvfb, --no-sandbox --disable-gpu)
Orca version: 1.4.56
Setup: headless runtime started with orca-ide serve --pairing-address <host> --json, reached over an SSH tunnel by a desktop client and an iOS mobile client.
Summary
Opening a non-git folder as a worktree and starting an agent (Claude) in its terminal deadlocks the entire serve runtime, not just one tab. After it happens, every client (mobile, desktop, and the local orca-ide CLI) can still connect but gets zero response to any RPC — workspaces won't load and keyboard input does nothing. This looks related to #4436, but there the UI freezes while the backend keeps answering the CLI; here the backend (serve) itself stops answering all clients.
What happened
- Opened my home directory
/home5/Brian(a non-git folder) as a worktree via "open folder". - Started Claude in that worktree's terminal.
- Some time later, all RPCs stopped resolving. A connected mobile client could switch to the environment but showed no workspaces and accepted no input.
Reproduced twice on the same machine. The second time it recurred only ~12 minutes after a clean restart, so it is trigger-driven, not uptime-driven.
Evidence that this is an app-level deadlock (not a process freeze / resource exhaustion)
I ruled out several causes before concluding it's an internal hang in the request handlers:
- Not an OS process stop (SIGTSTP/
Tstate): allorca-ideprocesses wereSTAT=S, actively running. - Event loop is alive:
strace -p <electron-pid> -cover 3s showed the main thread cycling normally throughpoll/epoll_pwait(92% inpoll). It is not blocked in a syscall. - Requests are being read, never answered: while a request hung, the socket was
ESTABLISHEDwith Recv-Q 0 — the data was consumed by the app. Even a static asset (GET /web-index.html) returned 0 bytes and timed out. - Not fd exhaustion: 120 / 4096 open fds.
- Not accept-backlog saturation: Recv-Q 0, no backlog buildup.
- Not an NFS stall: no
D-state processes;/home5(NFS) read/write was fine.
So the HTTP/WS handlers appear to be stuck on a never-resolving promise, which is why a client can open a WS connection but no RPC ever returns.
The trigger and a recurrence loop
Both times, the last line written to serve.log before the freeze was the pty:history line for the non-git home-directory worktree:
[pty:history] worktreeId=<uuid>::/home5/Brian shell=bash histFile=/home5/Brian/.config/orca/terminal-history/<id>/bash_history
There's also a self-reinforcing loop: that worktree was persisted in ~/.config/orca/orca-data.json under workspaceSession.activeWorktreeIdsOnShutdown (plus worktreeMeta, tabsByWorktree, tabGroups, etc.). On the next client reconnect the PTY tab auto-restored and the runtime re-hung immediately, so restarting serve alone did not fix it.
Workaround / recovery
Restarting serve is not enough on its own. What worked:
- Stop
serve. - Remove the offending worktree's entries from
~/.config/orca/orca-data.json(in my case 11 entries acrossrepos,worktreeMeta, and theworkspaceSession.*maps). Keep a backup. - Restart
serve.
After that the worktree was gone from orca-ide worktree ps and everything worked again.
To avoid it entirely: don't open a non-git folder (especially a large tree like a home directory) as a worktree on this runtime.
Expectations
- Opening a non-git folder (or starting an agent in one) should never be able to wedge the whole runtime for all clients.
- If a single worktree/PTY handler hangs, it should be isolated to that tab, not block the global RPC layer.
- A worktree that hung the runtime probably shouldn't be auto-restored on reconnect without a safety check (the current behavior creates a boot-loop).
Activity
Bound the file-watcher initial crawl to prevent threadpool starvation (…
Run the file watcher off the main process; make git non-interactive (#…
Address review: worker error handling + awaited shutdown drain (#5308)
Run the file watcher off the main process to fix the serve deadlock (#…
fix: upgrade to v1.4.72-rc.3 + no-sandbox GPU fix
Run the file watcher off the main process to fix the serve deadlock (s…