Skip to content
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 1 commit into from Mar 1, 2019

Conversation

LnL7
Copy link
Member

@LnL7 LnL7 commented Feb 9, 2019

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.

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.
@matthewbauer
Copy link
Member

This seems okay for now, but I wonder if Nix is doing something unsafe? It would be nice to track this down.

@LnL7
Copy link
Member Author

LnL7 commented Feb 9, 2019

Yeah, we should try to fix it but I think this is safe since nothing uses the objective-c before forking happens.

@matthewbauer
Copy link
Member

pinging @edolstra

@edolstra edolstra merged commit ad6dbec into NixOS:master Mar 1, 2019
@LnL7 LnL7 deleted the daemon-disable-fork-safety branch March 15, 2019 20:29
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
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants