-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
LocalStore::addTempRoot(): Handle ENOENT #8544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add comments in the test explaining what is supposed to happen / why that excises the feature?
These things are quite subtle so I think making it super clear and spelled-out helps :).
If the garbage collector has acquired the global GC lock, but hasn't created the GC socket yet, then a client attempting to connect would get ENOENT. Note that this only happens when the GC runs for the first time on a machine. Subsequently clients will get ECONNREFUSED which was already handled. Fixes NixOS#7370.
3823f7a
to
c5fdbda
Compare
Co-authored-by: John Ericson <[email protected]>
Also name the _NIX_TEST_GC_SYNC environment variables logically.
This is necessary on macOS since addTempRoot() relies on errno.
5cabab5
to
d005bad
Compare
Backport failed because this pull request contains merge commits. You can either backport this pull request manually, or configure the action to skip merge commits. |
@edolstra should we do |
It is good to propogate the underlying error so whether or not we use a proccess to deal with path length issues is not observable. Also, as these helper functions got more and more complex, the code duplication got worse and worse. Deduplicate.
It is good to propagate the underlying error so whether or not we use a process to deal with path length issues is not observable. Also, as these wrapper functions got more and more complex, the code duplication got worse and worse. The new `bindConnectProcHelper` function deduplicates them.
Did |
Backport failed because this pull request contains merge commits. You can either backport this pull request manually, or configure the action to skip merge commits. |
1 similar comment
Backport failed because this pull request contains merge commits. You can either backport this pull request manually, or configure the action to skip merge commits. |
It is good to propagate the underlying error so whether or not we use a process to deal with path length issues is not observable. Also, as these wrapper functions got more and more complex, the code duplication got worse and worse. The new `bindConnectProcHelper` function deduplicates them.
It is good to propagate the underlying error so whether or not we use a process to deal with path length issues is not observable. Also, as these wrapper functions got more and more complex, the code duplication got worse and worse. The new `bindConnectProcHelper` function deduplicates them.
`bind`: give same treatment as `connect` in #8544, dedup
LocalStore: :addTempRoot(): Handle ENOENT (cherry picked from commit 7115edc) Change-Id: Ie6b1596049c3fde09b98f2f0727899f98e48e6b1
`bind`: give same treatment as `connect` in NixOS#8544, dedup (cherry picked from commit 2867424) Change-Id: I1ac5fc43fa10ec5f37a226730c3d84033fdbfd52
Backport to Nix-2.18 here: #13896. There was an attempt by @roberth to backport this to 2.18 and 2.15 above (#8544 (comment)) but that failed. |
Motivation
If the garbage collector has acquired the global GC lock, but hasn't created the GC socket yet, then a client attempting to connect would get ENOENT. Note that this only happens when the GC runs for the first time on a machine. Subsequently clients will get ECONNREFUSED which was already handled.
Fixes #7370.
Context
Checklist for maintainers
Maintainers: tick if completed or explain if not relevant
tests/**.sh
src/*/tests
tests/nixos/*
Priorities
Add 👍 to pull requests you find important.