Tests passing on 1.6, segfault on 1.7

I’m seeing some strange behavior here. I have some tests that pass for Julia 1.6, and also pass locally for Julia 1.7.0, but cause a segfault on 1.7 in Github actions (I think that’s 1.7.2?).

Especially surprising is that the error is very low-level,

signal (11): Segmentation fault
in expression starting at /home/runner/work/MeasureTheory.jl/MeasureTheory.jl/test/runtests.jl:29
typekeyvalue_hash at /buildworker/worker/package_linux64/build/src/jltypes.c:1150 [inlined]
lookup_typevalue at /buildworker/worker/package_linux64/build/src/jltypes.c:720
jl_inst_arg_tuple_type at /buildworker/worker/package_linux64/build/src/jltypes.c:1587
arg_type_tuple at /buildworker/worker/package_linux64/build/src/gf.c:1845 [inlined]
jl_lookup_generic_ at /buildworker/worker/package_linux64/build/src/gf.c:2373 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2425
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1788 [inlined]
do_apply at /buildworker/worker/package_linux64/build/src/builtins.c:713
vcat at ./abstractarray.jl:1772

My code in the package is much higher-level than this. Could this be a Julia bug?

I can’t reproduce this when testing MeasureTheory#master on my local Julia 1.7.2.
However I get this instead (twice):

Error During Test at /home/guillaume/.julia/packages/MeasureBase/OhpR8/src/interface.jl:30
  Got exception outside of a @test
  TypeError: non-boolean (Static.True) used in boolean context

Thanks @gdalle . That’s very weird, and I want to address it. Let’s come back to it after we figure out the segfault issue

When this has happened to me before, I’ve pasted the output of the package resolution that appears in the log in a file, and run a diff tool comparing with the local resolution to try to spot any differences in package versions. If the difference is due to a difference in package versions, this works quite well.

1 Like

Good idea, I’ll try that

EDIT: Nope, identical aside from directory names

Try running with --check-bounds=yes, and if that still fails, running with rr (e.g. --bug-report=help)

2 Likes

But 1.7 is also going to be soon replaced with 1.8, so you might want to check also if you can get the bug to still happen there

1 Like