tvix: nix-build -A ops.pipelines.depot segfaults

#75
Opened by aspen at 2020-11-18T14·10+00

see https://buildkite.com/tvl/depot/builds/3689#51ea1a9a-ef58-4691-9073-e3497f903ee6 :

/nix/store/6737cq9nvp4k5r70qcgf61004r0l2g3v-bash-4.4-p23/bin/bash: line 6: 29550 Segmentation fault      (core dumped) nix-build -A ops.pipelines.depot -o depot.yaml

  1. unfortunately coredumpctl gdb doesn't help here:

    Cannot access memory at address 0x7fd025f16108
    Cannot access memory at address 0x7fd025f16100
    Failed to read a valid object file image from memory.
    Core was generated by `nix-build -A ops.pipelines.depot -o depot.yaml'.
    

    aspen at 2020-11-18T14·12+00

  2. #0  0x00007ffff7f31451 in nix::EvalState::evalBool (this=0x5a7810, env=..., e=0x7df7af)
        at /build/nix/src/libexpr/eval.cc:727
    #1  nix::ExprIf::eval (this=0x7dfaf0, state=..., env=..., v=...) at /build/nix/src/libexpr/eval.cc:1158
    #2  0x00007ffff7f3944b in nix::EvalState::forceValue (this=0x7ffff7fc719800, v=..., pos=...)
        at /build/nix/src/libexpr/eval-inline.hh:34
    #3  0x00007ffff7f2ddd9 in nix::ExprSelect::eval (this=<optimized out>, state=..., env=..., v=...)
        at /build/nix/src/libexpr/eval.cc:891
    #4  0x00007ffff7f3944b in nix::EvalState::forceValue (this=0x7ffff7fc719800, v=..., pos=...)
        at /build/nix/src/libexpr/eval-inline.hh:34
    #5  0x00007ffff7f2db84 in nix::ExprVar::eval (this=0x7e1790, state=..., env=..., v=...)
        at /build/nix/src/libexpr/eval.cc:838
    #6  0x00007ffff7f320b4 in nix::ExprOpNEq::eval (this=0x7e1800, state=..., env=..., v=...)
        at /build/nix/src/libexpr/eval.cc:1184
    #7  0x00007ffff7f3944b in nix::EvalState::forceValue (this=0x7ffff7fc719800, v=..., pos=...)
        at /build/nix/src/libexpr/eval-inline.hh:34
    #8  0x00007ffff7f2db84 in nix::ExprVar::eval (this=0x7e01a0, state=..., env=..., v=...)
        at /build/nix/src/libexpr/eval.cc:838
    #9  0x00007ffff7f31454 in nix::EvalState::evalBool (this=0x5a7810, env=..., e=0x7df7af)
        at /build/nix/src/libexpr/eval.cc:727
    #10 nix::ExprIf::eval (this=0x7e1700, state=..., env=..., v=...) at /build/nix/src/libexpr/eval.cc:1158
    #11 0x00007ffff7f3944b in nix::EvalState::forceValue (this=0x7ffff7fc719800, v=..., pos=...)
        at /build/nix/src/libexpr/eval-inline.hh:34
    #12 0x00007ffff7f2ddd9 in nix::ExprSelect::eval (this=<optimized out>, state=..., env=..., v=...)
        at /build/nix/src/libexpr/eval.cc:891
    #13 0x00007ffff7f31479 in nix::ExprIf::eval (this=0x7dc040, state=..., env=..., v=...)
        at /build/nix/src/libexpr/eval.cc:1158
    #14 0x00007ffff7f5f2dd in nix::EvalState::forceValue (this=<optimized out>, v=..., pos=...)
        at /build/nix/src/libexpr/eval-inline.hh:34
    #15 nix::prim_addErrorContext (state=..., pos=..., args=0x7ffffffeccc0, v=...)
        at /build/nix/src/libexpr/primops.cc:386
    #16 0x00007ffff7f2f74d in nix::EvalState::callPrimOp (this=0x5a7810, fun=..., arg=..., v=..., pos=...)
        at /build/nix/src/libexpr/eval.cc:973
    #17 0x00007ffff7f2ef93 in nix::EvalState::callFunction (this=0x7df7af, fun=..., arg=..., v=..., pos=...)
        at /build/nix/src/libexpr/eval.cc:991
    #18 0x00007ffff7f2eebe in nix::ExprApp::eval (this=<optimized out>, state=..., env=..., v=...)
        at /build/nix/src/libexpr/eval.cc:941
    #19 0x00007ffff7f3944b in nix::EvalState::forceValue (this=0x7ffff7fc719800, v=..., pos=...)
        at /build/nix/src/libexpr/eval-inline.hh:34
    #20 0x00007ffff7f2ddd9 in nix::ExprSelect::eval (this=<optimized out>, state=..., env=..., v=...)
        at /build/nix/src/libexpr/eval.cc:891
    #21 0x00007ffff7f2f455 in nix::EvalState::callFunction (this=<optimized out>, fun=..., arg=..., v=..., pos=...)
        at /build/nix/src/libexpr/eval.cc:1090
    #22 0x00007ffff7f2eebe in nix::ExprApp::eval (this=<optimized out>, state=..., env=..., v=...)
        at /build/nix/src/libexpr/eval.cc:941
    #23 0x00007ffff7f31479 in nix::ExprIf::eval (this=0x6a2500, state=..., env=..., v=...)
        at /build/nix/src/libexpr/eval.cc:1158
    #24 0x00007ffff7f2f455 in nix::EvalState::callFunction (this=<optimized out>, fun=..., arg=..., v=..., pos=...)
        at /build/nix/src/libexpr/eval.cc:1090
    #25 0x00007ffff7f3942a in nix::EvalState::forceValue (this=0x7ffff7fc719800, v=..., pos=...)
        at /build/nix/src/libexpr/eval-inline.hh:42
    #26 0x00007ffff7f2ddd9 in nix::ExprSelect::eval (this=<optimized out>, state=..., env=..., v=...)
        at /build/nix/src/libexpr/eval.cc:891
    #27 0x00007ffff7f32a43 in nix::ExprConcatStrings::eval (this=<optimized out>, state=..., env=..., v=...)
        at /build/nix/src/libexpr/eval.cc:1247
    #28 0x00007ffff7f3944b in nix::EvalState::forceValue (this=0x7ffff7fc719800, v=..., pos=...)
        at /build/nix/src/libexpr/eval-inline.hh:34
    #29 0x00007ffff7f2ddd9 in nix::ExprSelect::eval (this=<optimized out>, state=..., env=..., v=...)
        at /build/nix/src/libexpr/eval.cc:891
    #30 0x00007ffff7f3944b in nix::EvalState::forceValue (this=0x7ffff7fc719800, v=..., pos=...)
        at /build/nix/src/libexpr/eval-inline.hh:34
    

    aspen at 2020-11-22T19·22+00

  3. the bad address is the vtable entry for expr->eval

    aspen at 2020-11-22T19·51+00

  4. This is fixed, rather inexplicably

    aspen at 2020-11-28T15·41+00

  5. this went away somewhere around https://cl.tvl.fyi/c/depot/+/2133 but I can't possibly imagine why that would have fixed it.

    aspen at 2020-11-28T15·41+00

  6. grfn closed this issue at 2020-11-28T15·42+00