[Nix#8530] throwing/asserting in tryEval has exponential complexity after evaluating certain values #137
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#137
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Upstream-Issue: NixOS/nix#8530
Describe the bug
Under the same conditions:
builtins.throw ""
worksbuiltins.throw x
hangsbuiltins.trace x (builtins.throw "")
worksbuiltins.seq x (builtins.throw "")
hangsbuiltins.seq x (builtins.trace "a" builtins.throw "")
prints "a" and hangsassert false; x
worksbuiltins.seq x (assert false; x)
hangsI tried on Nix 2.10, 2.11, 2.12, 2.14, 2.15 and could reproduce on all of them
Steps To Reproduce
nix flake check
debugThrow
function indefault.nix
as neededExpected behavior
It never hangs.
nix-env --version
outputnix-env (Nix) 2.15.1
Additional context
I encountered this in the wild while working with Nix, I'll try to make a smaller example and will update this issue.
edit: I tried stripping some things down, and now it simply takes a long time to execute... perhaps this is a case of exponential complexity
Priorities
Add 👍 to issues you find important.