tvix: segmentation fault in prim_lessThan when evaluating third_party.nix.outPath
#42
Opened by aspen at
to reproduce: nix eval -f third_party.nix.outPath
Top few frames of the backgrace from gdb:
#0 nix::prim_lessThan (state=..., pos=..., args=0x7ffffffe5c00, v=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/primops.cc:1757 #1 0x00007ffff7ee28be in nix::EvalState::callPrimOp (this=0x7ffff5ef4820, fun=..., arg=..., v=..., pos=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval.cc:1022 #2 0x00007ffff7ee216e in nix::EvalState::callFunction (this=0x7ffff5ef4820, fun=..., arg=..., v=..., pos=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval.cc:1040 #3 0x00007ffff7ee20ac in nix::ExprApp::eval (this=0x7fffc7fefc00, state=..., env=..., v=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval.cc:990 #4 0x00007ffff7ee25d4 in nix::EvalState::callFunction (this=<optimized out>, fun=..., arg=..., v=..., pos=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval.cc:1139 #5 0x00007ffff7f279bb in nix::prim_sort(nix::EvalState&, nix::Pos const&, nix::Value**, nix::Value&)::$_3::operator()(nix::Value*, nix::Value*) const (this=0x7ffffffe5eb8, a=0x80050001, b=0x7fffc917ca80) at /home/grfn/code/depot/third_party/nix/src/libexpr/primops.cc:1621 #6 std::__1::__insertion_sort<nix::prim_sort(nix::EvalState&, nix::Pos const&, nix::Value**, nix::Value&)::$_3&, std::__1::__wrap_iter<nix::Value**> >(std::__1::__wrap_iter<nix::Value**>, std::__1::__wrap_iter<nix::Value**>, nix::prim_sort(nix::EvalState&, nix::Pos const&, nix::Value**, nix::Value&)::$_3&) (__first=..., __last=..., __comp=...) at /nix/store/yyk37f0n3211wck017majwi1bizfv3z6-libc++-10.0.1/include/c++/v1/algorithm:3809 #7 std::__1::__stable_sort<nix::prim_sort(nix::EvalState&, nix::Pos const&, nix::Value**, nix::Value&)::$_3&, std::__1::__wrap_iter<nix::Value**> >(std::__1::__wrap_iter<nix::Value**>, std::__1::__wrap_iter<nix::Value**>, nix::prim_sort(nix::EvalState&, nix::Pos const&, nix::Value**, nix::Value&)::$_3&, std::__1::iterator_traits<std::__1::__wrap_iter<nix::Value**> >::difference_type, std::__1::iterator_traits<std::__1::__wrap_iter<nix::Value**> >::value_type*, long) (__first=..., __last=..., __comp=..., __len=<optimized out>, __buff=0x80050001, __buff_size=<optimized out>) at /nix/store/yyk37f0n3211wck017majwi1bizfv3z6-libc++-10.0.1/include/c++/v1/algorithm:4740 #8 0x00007ffff7f1b89e in std::__1::stable_sort<std::__1::__wrap_iter<nix::Value**>, nix::prim_sort(nix::EvalState&, nix::Pos const&, nix::Value**, nix::Value&)::$_3>(std::__1::__wrap_iter<nix::Value**>, std::__1::__wrap_iter<nix::Value**>, nix::prim_sort(nix::EvalState&, nix::Pos const&, nix::Value**, nix::Value&)::$_3) (__first=..., __last=..., __comp=...) at /nix/store/yyk37f0n3211wck017majwi1bizfv3z6-libc++-10.0.1/include/c++/v1/algorithm:4782 #9 nix::prim_sort (state=..., pos=..., args=<optimized out>, v=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/primops.cc:1628 #10 0x00007ffff7ee28be in nix::EvalState::callPrimOp (this=0x7ffff5ef4820, fun=..., arg=..., v=..., pos=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval.cc:1022 #11 0x00007ffff7ee216e in nix::EvalState::callFunction (this=0x7ffff5ef4820, fun=..., arg=..., v=..., pos=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval.cc:1040 #12 0x00007ffff7ee20ac in nix::ExprApp::eval (this=0x7fffc7fefd80, state=..., env=..., v=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval.cc:990 #13 0x00007ffff7f2ba71 in nix::EvalState::forceValue (this=0xbfb34cef22126500, v=..., pos=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval-inline.hh:34 #14 nix::EvalState::forceList (this=0xbfb34cef22126500, v=..., pos=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval-inline.hh:70 #15 0x00007ffff7f1af55 in nix::prim_length (state=..., pos=..., args=0x7ffffffe60d0, v=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/primops.cc:1526 #16 0x00007ffff7ee28be in nix::EvalState::callPrimOp (this=0x7ffff5ef4820, fun=..., arg=..., v=..., pos=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval.cc:1022 #17 0x00007ffff7ee216e in nix::EvalState::callFunction (this=0x7ffff5ef4820, fun=..., arg=..., v=..., pos=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval.cc:1040 #18 0x00007ffff7ee20ac in nix::ExprApp::eval (this=0x7fffc7fea500, state=..., env=..., v=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval.cc:990 #19 0x00007ffff7f1ccc8 in nix::EvalState::forceValue (this=<optimized out>, v=..., pos=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval-inline.hh:34 #20 nix::prim_lessThan (state=..., pos=..., args=0x7ffffffe6290, v=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/primops.cc:1757 #21 0x00007ffff7ee28be in nix::EvalState::callPrimOp (this=0x7ffff5ef4820, fun=..., arg=..., v=..., pos=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval.cc:1022 #22 0x00007ffff7ee216e in nix::EvalState::callFunction (this=0x7ffff5ef4820, fun=..., arg=..., v=..., pos=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval.cc:1040 #23 0x00007ffff7ee20ac in nix::ExprApp::eval (this=0x7fffc7fea4c0, state=..., env=..., v=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval.cc:990 #24 0x00007ffff7ee3de4 in nix::EvalState::evalBool (this=0x7ffff5ef4820, env=..., e=0x7ffff5ef4820) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval.cc:776 #25 nix::ExprIf::eval (this=0x7fffc7fd91b0, state=..., env=..., v=...) at /home/grfn/code/depot/third_party/nix/src/libexpr/eval.cc:1196
https://cl.tvl.fyi/c/depot/+/1696/1 appears to fix this.
aspen at 2020-08-09T01·54+00
- grfn closed this issue at 2020-08-09T02·41+00