Comments (5)
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.
from nix.
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
from nix.
No luck with GC_DONT_GC=1
this time
from nix.
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 nixpkgs = conf.nixpkgs or inputs.nixpkgs;
to nixpkgs = conf.nixpkgs or self.inputs.nixpkgs;
, I go from a segfault to an infinite recursion error, even though AFAICT inputs.nixpkgs
and self.inputs.nixpkgs
should be the same thing.
I'm also not sure why it gives me segfault or infinite recursion whereas this works. Maybe I'm barking up the wrong tree.
from nix.
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!
from nix.
Related Issues (20)
- [question] why `nix::ExprPath` requires an `InputAccessor` HOT 4
- Linux: nix binary and libraries include rpaths to system libdir
- nix 2.3.17 fails in test tests/add.sh sometimes HOT 1
- Install fails on OSX (intel) HOT 1
- Missing user profile directory on a fresh Nix install
- Format error when talking to newer daemon with older client HOT 3
- `coerceToString` can overflow the stack, the bad way HOT 4
- nix-shell no longer respects NIX_PATH HOT 3
- "/var is a symlink" error on macOS when using `nix-env -iA` under root HOT 1
- The path added by the nix shell has a lower priority than the nix profile HOT 2
- nix flake {update,metadata,...}: shows input's narHash
- Allow nix store path other than `/nix` without hacky workarounds during installation HOT 8
- nix-prefetch-url seems to uncompress archive if `content-encode: gzip` is set HOT 2
- Failed install nix on Macbook Pro 2016 MacOS Monterey HOT 3
- Document the performance report in sufficient detail (`NIX_SHOW_STATS=1`)
- Failed to upgrade Nix package manager [Ubuntu]
- Flake-less per-project `nixConfig` HOT 3
- Error when installing nix in Ubuntu 22.04 Toolbox container HOT 1
- Feature request: nix repl `:pos` command
- unexpected result due to paths stripping trailing / HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nix.