-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
aarch64-darwin segfault trying to build system #10138
Comments
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/rust-in-nix-discussion-thread/5092/21 |
No luck with |
IIRC: it's hard to detect stack overflows on darwin, the error message for that doesn't always work, so this might be an ordinary stack overflow instead of memory corruption. |
Thanks for your input, I think you're probably correct. This shows the basics idea of my flake setup, which has been working fairly well for the last year or so: {
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
nixpkgs-stable.url = "github:nixos/nixpkgs/release-23.11";
};
outputs = {
self,
nixpkgs,
...
} @ inputs: let
inherit (nixpkgs) lib;
hosts = {
mymachine.system = "aarch64-darwin";
othermachine = {
system = "aarch64-darwin";
nixpkgs = inputs.nixpkgs-stable;
};
};
in
lib.foldlAttrs (acc: hostname: conf: let
nixpkgs = conf.nixpkgs or inputs.nixpkgs;
in
lib.recursiveUpdate acc {
packages.${conf.system}.default = nixpkgs.legacyPackages.${conf.system}.hello;
}) {}
hosts;
} (This minimal example builds, whereas mine segfaults.) In my actually crashing flake, if I change I'm also not sure why it gives me segfault or infinite recursion whereas this works. Maybe I'm barking up the wrong tree. |
I noted that 2.20 seems to have some changes relevant to stack overflows; this seems to confirm the issue (with a much better error message): $ nix run github:nixos/nix/2.20-maintenance -- build .#darwinConfigurations.natepro.config.system.build.toplevel
warning: updating lock file '/Users/n8henrie/git/nixos/flake.lock':
• Updated input 'modules':
'path:/nix/store/4d3ygplv20ymmsx0az7yh136asmm1vr2-source/modules?lastModified=1&narHash=sha256-zPNgdnLrKUd2c0wMzH3wyivqivC5JQmAHMCEVz00ZG4%3D' (1970-01-01)
→ 'path:/nix/store/my2zyiknkk118jjblmf3gd3arcwf62hn-source/modules?lastModified=1&narHash=sha256-zPNgdnLrKUd2c0wMzH3wyivqivC5JQmAHMCEVz00ZG4%3D' (1970-01-01)
error:
… while evaluating the attribute 'config'
at /nix/store/8gsd9h76snq5sgcnwjip3c3p9wxbrjzm-source/lib/modules.nix:322:9:
321| options = checked options;
322| config = checked (removeAttrs config [ "_module" ]);
| ^
323| _module = checked (config._module);
… while calling the 'seq' builtin
at /nix/store/8gsd9h76snq5sgcnwjip3c3p9wxbrjzm-source/lib/modules.nix:322:18:
321| options = checked options;
322| config = checked (removeAttrs config [ "_module" ]);
| ^
323| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full trace)
error: stack overflow; max-call-depth exceeded
at /nix/store/8gsd9h76snq5sgcnwjip3c3p9wxbrjzm-source/lib/trivial.nix:438:10:
437| then f.__functionArgs or (functionArgs (f.__functor f))
438| else builtins.functionArgs f;
| ^
439| I suspect this is already covered in #8281 Thanks for pointing me in the right direction @yorickvP! |
Describe the bug
I get a segfault when trying to build my system config for unclear reasons.
Steps To Reproduce
Expected behavior
System should build or an error should be emitted.
nix-env --version
outputAdditional context
I'm refactoring my config to use
nixpkgs-unstable
instead ofrelease-23.11
.Output of:
is at https://gist.github.com/n8henrie/643baa4a337c7d7c46ebf22cd2b03e82
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: