NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.29k stars 1.48k forks source link

eval-fail-infinite-recursion-lambda: Reduce recursion depth #10903

Closed edolstra closed 3 months ago

edolstra commented 3 months ago

Motivation

This prevents the test from failing in environments with a smaller configured stack size.

Context

This was reported on an Amazon Linux instance, maybe they have a smaller ulimit -s.

Priorities and Process

Add :+1: to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

roberth commented 3 months ago

Maybe we should take more control of that parameter? I'd be surprised if that's the hard limit, and they could run into this problem in normal use.

szucsitg commented 3 months ago

On AL2023 the hard limit is 10 mbyte for stack size, but changing it to unlimited still didn't make it successful. I'm not sure why it's that's the case.

edolstra commented 3 months ago

@szucsitg Note that if you're using the Nix daemon, it's not the stack size setting of the caller that is used here, but the systemd LimitSTACK unit setting. So you could try adding

[Service]
LimitSTACK=infinity

to /etc/systemd/system/nix-daemon.service.

If that works, we could add it to the upstream nix-daemon.service to make builds more reproducible.

szucsitg commented 3 months ago

Sorry, I just got time to test it. This way it works.