fix: linkspan socket in sticky /tmp, not a shared csbridge/ dir#105
Merged
Conversation
The socket lived at /tmp/csbridge/<id>.sock and the SLURM job script ran
`mkdir -p /tmp/csbridge`. On a shared compute node the first user to launch
a session owns /tmp/csbridge (mode 0755); every later user's `mkdir -p` is a
no-op and linkspan's bind() on its socket fails with EACCES
("bind: permission denied").
Bind the socket at /tmp/csbridge-<id>.sock directly in the sticky,
world-writable /tmp so each user creates and owns their own socket with no
shared directory to clash over. The socket name already carries the unique
session id; linkspan needs no change (it binds whatever --socket it is given
and clears its own stale path).
yasithdev
marked this pull request as ready for review
July 18, 2026 18:29
Merged
yasithdev
added a commit
that referenced
this pull request
Jul 18, 2026
Bump to 0.1.0 and record the linkspan shared-socket-dir permission fix (#105).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
linkspan's unix socket lived at
/tmp/csbridge/<id>.sock, and the SLURM job script ranmkdir -p /tmp/csbridge. On a shared compute node, the first user to launch a session there ends up owning/tmp/csbridgeat mode0755. Every subsequent different user'smkdir -pis a silent no-op (the dir already exists), and linkspan'sbind()on the socket fails:Observed live on the Nexus cluster:
/tmp/csbridgeon nodec2wasdrwxr-xr-x 2000043 2000043, sonexus-yjayawardana(uid 2000047, only in the group — no group write) couldn't create his socket and every session on that node failed with exit1:0.Fix
Bind the socket at
/tmp/csbridge-<id>.sock— directly in the sticky, world-writable/tmp— instead of inside a sharedcsbridge/subdirectory. Each user creates and owns their own socket; the sticky bit stops others deleting it; there is no shared directory to clash over. Themkdir -pline is gone (nothing to create). The socket name already carries the unique session id, soslurmSupport'ssrun --overlap curl --unix-socket …channel follows automatically, and linkspan needs no change (it binds whatever--socketit's handed and clears its own stale path viaos.Remove).Test plan
npm run check-types— cleannpm test— 108/108 pass (updated thebuildSlurmScriptassertion to the new path)npm run package— builds--socket /tmp/csbridge-<id>.sock, nomkdir, no/tmp/csbridge/dir reference🤖 Generated with Claude Code