Open colemickens opened 4 years ago
I can reproduce the issue with nixpkgs commit ID c71518e75bf067fb639d44264fdd8cf80f53d75a.
The issue can also be reproduced in the nixpkgs repo when running nix dev-shell .#azure-cli
. nix build
and nix shell
work fine though.
It looks like the issue is on the nixpkgs side. The actionable issue for Nix itself is that there is no feedback about what is causing the stack overflow so it makes it hard to debug.
The problem is that it's hard to give a useful error message in case of a stack overflow. You can't throw an exception and clean up normally...
Had this also in case of a Python environment. Using pythonEnv.env
"solved" the issue. Note the env
is not supposed to be built. Then again, in another case I was able to use the pythonEnv
directly with nix develop
. Note azure-cli
is a Python application.
propagatedBuildInputs
the issue does not show up.azure-cli-*
propagatedBuildInputs
the issue does not show up.azure-cli*
inputs (azure-batch
) the issue does not show up.Both buildPython*
and python.buildEnv
call the function requiredPythonModules
to traverse all propagatedBuildInputs
to select only Python packages of interest. It's all I can think of without any trace.
I have the same issue with node and it seems like the error is the same as in #3462
I had same issue with nix-shell
and unstable version of nix 2.4pre20201102_550e11f
.
Found workaround here, but setting ulimit
in console didn't help in my case.
Then I tried set ulimit
for nix-daemon
, and it helped:
systemd.services.nix-daemon.serviceConfig.LimitSTACKSoft = "infinity";
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/to-flake-or-not-to-flake/10047/4
I marked this as stale due to inactivity. → More info
The problem is that it's hard to give a useful error message in case of a stack overflow. You can't throw an exception and clean up normally...
We'd have to check for stack overflows in C++ rather than through page mappings. "Prevention is better than cure" kind of situation. If we detect it in C++ we can throw a proper exception and print a trace.
Describe the bug With this minimal
flake.nix
:Note that
azure-cli
is uncommented. This is not an issue ifazure-cli
is not present.If you try to
nix --experimental-features 'nix-command flakes' develop
, then:Before I made this minimal repro, it was doing this:
Info