master segfaults on partially applied functions #12

Closed
opened 2024-10-13 17:19:09 +00:00 by ma27 · 1 comment
Member

Given the following Nix expression:

with import <nixpkgs> {};
{
  tmp = runCommand "foo" {};
}

Running ./result/bin/nix-eval-jobs test.nix gives me

warning: unknown setting 'allowed-users'
warning: unknown setting 'extra-allowed-users'
warning: unknown setting 'trusted-users'
warning: `--gc-roots-dir' not specified

and 0 as exit code (perhaps because of the signal handler from Lix?)

Backtrace of the coredump:

#0  0x00007ffff77a92f3 in nix::EvalState::coerceToString (this=0x7fffd4005860, pos=..., v=..., context=..., errorCtx=..., coerceMore=true, copyToStore=true, canonicalizePath=true) at src/libexpr/eval.cc:2269
#1  0x00007ffff77a944e in nix::EvalState::coerceToString (this=0x7fffd4005860, pos=..., v=..., context=..., errorCtx=..., coerceMore=<optimized out>, copyToStore=true, canonicalizePath=true)
    at src/libexpr/eval.cc:2328
#2  0x00007ffff77a944e in nix::EvalState::coerceToString (this=0x7fffd4005860, pos=..., v=..., context=..., errorCtx=..., coerceMore=<optimized out>, copyToStore=true, canonicalizePath=true)
    at src/libexpr/eval.cc:2328
#3  0x00007ffff77a944e in nix::EvalState::coerceToString (this=0x7fffd4005860, pos=..., v=..., context=..., errorCtx=..., coerceMore=<optimized out>, copyToStore=true, canonicalizePath=true)
    at src/libexpr/eval.cc:2328
#4  0x00007ffff77a944e in nix::EvalState::coerceToString (this=0x7fffd4005860, pos=..., v=..., context=..., errorCtx=..., coerceMore=<optimized out>, copyToStore=true, canonicalizePath=true)
    at src/libexpr/eval.cc:2328
#5  0x00007ffff77a944e in nix::EvalState::coerceToString (this=0x7fffd4005860, pos=..., v=..., context=..., errorCtx=..., coerceMore=<optimized out>, copyToStore=true, canonicalizePath=true)
    at src/libexpr/eval.cc:2328
#6  0x00007ffff77a944e in nix::EvalState::coerceToString (this=0x7fffd4005860, pos=..., v=..., context=..., errorCtx=..., coerceMore=<optimized out>, copyToStore=true, canonicalizePath=true)
    at src/libexpr/eval.cc:2328
[...]

This goes on for quite a while, so some kind of infinite recursion until the stack limit was exceeded?

Given the following Nix expression: ``` with import <nixpkgs> {}; { tmp = runCommand "foo" {}; } ``` Running `./result/bin/nix-eval-jobs test.nix` gives me ``` warning: unknown setting 'allowed-users' warning: unknown setting 'extra-allowed-users' warning: unknown setting 'trusted-users' warning: `--gc-roots-dir' not specified ``` and `0` as exit code (perhaps because of the signal handler from Lix?) Backtrace of the coredump: ``` #0 0x00007ffff77a92f3 in nix::EvalState::coerceToString (this=0x7fffd4005860, pos=..., v=..., context=..., errorCtx=..., coerceMore=true, copyToStore=true, canonicalizePath=true) at src/libexpr/eval.cc:2269 #1 0x00007ffff77a944e in nix::EvalState::coerceToString (this=0x7fffd4005860, pos=..., v=..., context=..., errorCtx=..., coerceMore=<optimized out>, copyToStore=true, canonicalizePath=true) at src/libexpr/eval.cc:2328 #2 0x00007ffff77a944e in nix::EvalState::coerceToString (this=0x7fffd4005860, pos=..., v=..., context=..., errorCtx=..., coerceMore=<optimized out>, copyToStore=true, canonicalizePath=true) at src/libexpr/eval.cc:2328 #3 0x00007ffff77a944e in nix::EvalState::coerceToString (this=0x7fffd4005860, pos=..., v=..., context=..., errorCtx=..., coerceMore=<optimized out>, copyToStore=true, canonicalizePath=true) at src/libexpr/eval.cc:2328 #4 0x00007ffff77a944e in nix::EvalState::coerceToString (this=0x7fffd4005860, pos=..., v=..., context=..., errorCtx=..., coerceMore=<optimized out>, copyToStore=true, canonicalizePath=true) at src/libexpr/eval.cc:2328 #5 0x00007ffff77a944e in nix::EvalState::coerceToString (this=0x7fffd4005860, pos=..., v=..., context=..., errorCtx=..., coerceMore=<optimized out>, copyToStore=true, canonicalizePath=true) at src/libexpr/eval.cc:2328 #6 0x00007ffff77a944e in nix::EvalState::coerceToString (this=0x7fffd4005860, pos=..., v=..., context=..., errorCtx=..., coerceMore=<optimized out>, copyToStore=true, canonicalizePath=true) at src/libexpr/eval.cc:2328 [...] ``` This goes on for quite a while, so some kind of infinite recursion until the stack limit was exceeded?
Author
Member

OK, it was a layer 8 issue and related to other mess ups of mine, not to the project's master. Sorry.

OK, it was a layer 8 issue and related to other mess ups of mine, not to the project's master. Sorry.
ma27 closed this issue 2024-10-13 18:24:34 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/nix-eval-jobs#12
No description provided.