-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
buglanguageThe Nix expression language; parser, interpreter, primops, evaluation, etcThe Nix expression language; parser, interpreter, primops, evaluation, etcstale
Description
In nix-repl, if one begins evaluating some long-running evaluation, sends a SIGINT, and then tries it again, it is likely that they'll get an infinite recursion error, even if there is no infinite recursion.
I think this is because Nix's backholes thunks, but doesn't un-blackhole them while handling the interrupt. That opens the possibility of a blackholed thunk being encountered on the second evaluation, leading Nix to falsy conclude it's already started forcing this thunk on this evaluation, and thus infinite recursion is happening.
The solution would to unwind after the interrupt, un-blackholing all thunks on the stack.
Inspired by @zimbatm to extract this from NixOS/rfcs#14.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
buglanguageThe Nix expression language; parser, interpreter, primops, evaluation, etcThe Nix expression language; parser, interpreter, primops, evaluation, etcstale