Skip to content

[Bug]: "Reset remote relay" kills unrelated processes on Linux — lsof -U doesn't filter by socket path #8762

Description

@darl

Operating system

Linux

Orca version

v1.4.135

Details

Pressing "Reset remote relay" in the SSH settings killed my entire remote user session: systemd --user, every user service under it. Took a while to trace it back to orca.

The reset script resolves the PIDs to kill with lsof:

pid=$(lsof -t -U "$sock" 2>/dev/null | tr "\n" " ")
...
kill -TERM $pid; sleep 0.2; kill -KILL $pid

(src/main/ssh/ssh-relay-reset.ts, forceStopRelayForTarget)

On Linux, lsof can't match AF_UNIX sockets by path, so -U "$sock" silently degrades to "every process holding any unix socket". On my machine:

$ lsof -t -U ~/.orca-remote/relay-/relay-.sock | wc -l
43

Those 43 include systemd --user itself, so the TERM+KILL sweep takes down the whole session.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingos:linuxIssues affecting Linux

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions