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

Evaluating nixos linux .iso on darwin causes segfault #8412

Closed
hraban opened this issue May 29, 2023 · 4 comments
Closed

Evaluating nixos linux .iso on darwin causes segfault #8412

hraban opened this issue May 29, 2023 · 4 comments
Labels

Comments

@hraban
Copy link
Member

hraban commented May 29, 2023

Describe the bug

When evaluating the nixos .iso derivation for linux, on darwin, you get a segfault.

Steps To Reproduce

$ nix-build -E '(import "${(builtins.fetchTarball { url = "https://github.com/NixOS/nixpkgs/archive/e10802309bf9ae351eb27002c85cfdeb1be3b262.tar.gz";     sha256 = "wQgnxz0PdqbyKKpsWl/RU8T8QhJQcHfeC6lh1xRUTfk="; })}/nixos/release-combined.nix" {}).nixos.iso_minimal.x86_64-linux'
Segmentation fault: 11

Expected behavior

A regular error, like e.g. what you get on aarch64-linux:

error: a 'x86_64-linux' with features {} is required to build '/nix/store/cxf71mrmakzj5dk4hq3z3rly053hdl3l-audit-disable.drv', but I am a 'aarch64-linux' with features {benchmark, big-parallel, gccarch-armv8-a, kvm, nixos-test}

(that's good)

nix-env --version output
nix-env (Nix) 2.13.3

Additional context

 - system: `"aarch64-darwin"`
 - host os: `Darwin 22.4.0, macOS 13.3.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.13.3`
 - channels(user): `""`
 - channels(root): `""`
 - nixpkgs: `/nix/store/5ra5hcd4k79sd9b7qrfk3qy1qjf1p34f-source`

I concocted that one-liner to build by assimilating instructions from https://r13y.com/

Priorities

Add 👍 to issues you find important.

@hraban hraban added the bug label May 29, 2023
@abathur
Copy link
Member

abathur commented May 29, 2023

I didn't think too deeply about this, but I do see the same segfault on x86_64-darwin. It's over 125k lines, but I've attached a verbose segfault.log. I ran it a few times to make sure it failed at the same spot (at least per log output) each time.

$ nix-build -vvvvvv -E '(import "${(builtins.fetchTarball { url = "https://github.com/NixOS/nixpkgs/archive/e10802309bf9ae351eb27002c85cfdeb1be3b262.tar.gz";     sha256 = "wQgnxz0PdqbyKKpsWl/RU8T8QhJQcHfeC6lh1xRUTfk="; })}/nixos/release-combined.nix" {}).nixos.iso_minimal.x86_64-linux' &> segfault.log
Segmentation fault: 11

@hraban
Copy link
Member Author

hraban commented May 30, 2023

Same build log from aarch64 darwin:
darwin-aarch64-segfault.log

@roberth
Copy link
Member

roberth commented May 30, 2023

Probably fixed / worked around in #7725.
Could you try with Nix 2.15.1?

@hraban
Copy link
Member Author

hraban commented May 31, 2023

nice 👍 no more segfault with latest Nix. I didn't think to check, my bad.

@hraban hraban closed this as completed May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants