Repository navigation
Create the extension socket directory before listening - #111
Merged
ernestrc merged 3 commits intoSep 20, 2026
Merged
Conversation
newUnixListener created <dataDir>/sockets only after bind(2) failed with ENOENT. On Windows, AF_UNIX reports a missing parent directory as WSAENETDOWN instead, so the directory was never created, every retry failed, and the home workspace's extensions never started. Create the directory before the first bind; the retry loop keeps its stale-socket handling. Linux and macOS behave the same: the ENOENT path only ever created this directory, and MkdirAll on an existing one is a no-op. A new test starts a listener under a data directory that does not exist yet (unstablebuild#68). Signed-off-by: Eric Brooks <[email protected]>
ernestrc
approved these changes
Sep 20, 2026
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
ernestrc
added a commit
that referenced
this pull request
Sep 30, 2026
Part of Windows support (#68, coordinated on #81). Found by running a locally built `rune.exe` on Windows 11; graphics stay with #82. The firstmover lock is a unix socket. When a leader dies without removing it, the next process gets an address-in-use error from `bind(2)` and falls back to following, then to a coup once the dead leader stays unresponsive. That check used `syscall.EADDRINUSE`, which on Windows is an invented Go errno rather than the Winsock `WSAEADDRINUSE` that bind returns, so the error was treated as unexpected and the service gave up. After any run that did not exit cleanly, every storage user failed on the next launch: session history, window size and position, installed packages. Windows now also matches `WSAEADDRINUSE`, and the lock directory is created before the first bind, since Windows reports a missing parent directory as `WSAENETDOWN` rather than `ENOENT` (same shape as #111). Signed-off-by: Eric Brooks <[email protected]> Signed-off-by: ernestrc <[email protected]> Co-authored-by: ernestrc <[email protected]>
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.
Part of Windows support (#68, coordinated on #81). Found by running a locally built
rune.exeonWindows 11; graphics stay with #82.
newUnixListenercreated<dataDir>/socketsonly afterbind(2)failed withENOENT. OnWindows, AF_UNIX reports a missing parent directory as
WSAENETDOWNinstead, so the directory wasnever created, every retry failed, and the home workspace's extensions never started. The directory
is now created before the first bind; the retry loop keeps its stale-socket handling unchanged.
Linux and macOS behave the same: the
ENOENTpath only ever created this directory, andMkdirAllon an existing one is a no-op. A new test starts a listener under a data directory thatdoes not exist yet and checks the socket lands in
<dataDir>/sockets.Verified natively: with this, #110 and the other Windows slices applied locally, a first launch on a fresh data directory logs zero errors
and the socket file is created.