Skip to content

Bridge run-state uses bare PIDs on an NFS-shared $HOME, so two login nodes collide #938

Description

@fujibee

Child of #906. The ring the reporter said they could not find in the tracker.

What the code does

instance-id.sh:148, _agmsg_pid_alive, is entirely localkill -0 on POSIX, tasklist on Windows. It has no concept of which host a PID belongs to.

The launcher's run files carry no host in their names either:

codex-bridge.<team>.<name>.pid
codex-bridge.<team>.<name>.appserver
codex-bridge.<team>.<name>.thread

With $HOME on NFS and two login nodes mounting it, node B reads node A's pidfile and judges that PID in its own PID space, which answers a different question than the one being asked. The reporter measured the pid and appserver files being rewritten from the other node.

The same absence lets two hosts resume the same codex thread, so one rollout takes appends from both.

Directions, not a decision

Put the hostname — and, if a reused hostname is a concern, the boot id — into the run file names or into the owner line inside them, and refuse to draw conclusions from a PID written by a different host.

This is the cross-host half of #485.

Related: #906 (the report), #485, #935 (ring 1).

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions