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
nix-daemon: add variable to disable fork safety #2674
Merged
Merged
Conversation
This file contains 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
Since macOS 10.14 this has become an error, causing problems if the nix-daemon loads nix during substitution (this is a forked process). Workaround for NixOS#2523.
This seems okay for now, but I wonder if Nix is doing something unsafe? It would be nice to track this down. |
Yeah, we should try to fix it but I think this is safe since nothing uses the objective-c before forking happens. |
pinging @edolstra |
reckenrode
added a commit
to reckenrode/nixpkgs
that referenced
this pull request
Jan 5, 2024
With NixOS#277471 merged, nix crashes during `installCheckPhase` because libcurl tries to call `SCDynamicStoreCopyProxies` when IPv6 is enabled. This triggers a crash due to invoking an Objective-C `+initialize` method after `fork` is called. See http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html. See also NixOS/nix#2674, which addresses the issue in nix-daemon.
reckenrode
added a commit
to reckenrode/nixpkgs
that referenced
this pull request
Jan 5, 2024
With NixOS#277471 merged, nix crashes during `installCheckPhase` because libcurl tries to call `SCDynamicStoreCopyProxies` when IPv6 is enabled. This triggers a crash due to invoking an Objective-C `+initialize` method after `fork` is called. See http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html. See also NixOS/nix#2674, which addresses the issue in nix-daemon.
reckenrode
added a commit
to reckenrode/nixpkgs
that referenced
this pull request
Jan 5, 2024
Ensure that `OBJC_DISABLE_INITIALIZE_FORK_SAFETY=yes` is set when starting the Nix daemon during tests, or the fetchurl.sh test will crash trying to initialize libcurl. This is happening since IPv6 support was enabled in NixOS#277471. See also: - http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html. - NixOS/nix#2674
reckenrode
added a commit
to reckenrode/nixpkgs
that referenced
this pull request
Jan 5, 2024
Ensure that `OBJC_DISABLE_INITIALIZE_FORK_SAFETY=yes` is set when starting the Nix daemon during tests, or the fetchurl.sh test will crash trying to initialize libcurl. This is happening since IPv6 support was enabled in NixOS#277471. See also: - http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html - NixOS/nix#2674
reckenrode
added a commit
to reckenrode/nixpkgs
that referenced
this pull request
Jan 5, 2024
Ensure that `OBJC_DISABLE_INITIALIZE_FORK_SAFETY=yes` is set when starting the Nix daemon during tests, or the fetchurl.sh test will crash trying to initialize libcurl. This is happening since IPv6 support was enabled in NixOS#277471. See also: - http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html - NixOS/nix#2674
13 tasks
github-actions bot
pushed a commit
to NixOS/nixpkgs
that referenced
this pull request
Jan 5, 2024
Ensure that `OBJC_DISABLE_INITIALIZE_FORK_SAFETY=yes` is set when starting the Nix daemon during tests, or the fetchurl.sh test will crash trying to initialize libcurl. This is happening since IPv6 support was enabled in #277471. See also: - http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html - NixOS/nix#2674 (cherry picked from commit 8dd78e6)
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.
Since macOS 10.14 this has become an error, causing problems if the
nix-daemon loads nix during substitution (this is a forked process).
Workaround for #2523.