Julia: Strange bug(Segmentation fault: 11) solely existed in julia v1.0

Created on 3 Mar 2019  路  6Comments  路  Source: JuliaLang/julia

This is previously posted at https://discourse.julialang.org/t/strange-bug-segmentation-fault-11-solely-existed-in-julia-v1-0/21392 .

It seems that no one would help with this.

I know it's quite difficult for it seems to be reproduced only if a project depends on both DataFrames.jl and MLStyle.jl .

CI: https://travis-ci.org/queryverse/Query.jl/jobs/500796102
codes: https://github.com/thautwarm/Query.jl/tree/12a1d3c214f42bb63bd18aaa936f127798d74f46

Most helpful comment

The code is reported fixed in more recent version (only seen in v1.0.x)

All 6 comments

Please always post an excerpt of the stacktrace so that people can triage if it is in the area of expertise.

signal (11): Segmentation fault
in expression starting at /home/travis/build/queryverse/Query.jl/src/table_query_macros.jl:53
jl_compile_linfo at /buildworker/worker/package_linux64/build/src/codegen.cpp:1191
emit_invoke at /buildworker/worker/package_linux64/build/src/codegen.cpp:3094
emit_expr at /buildworker/worker/package_linux64/build/src/codegen.cpp:3893
emit_ssaval_assign at /buildworker/worker/package_linux64/build/src/codegen.cpp:3615
emit_stmtpos at /buildworker/worker/package_linux64/build/src/codegen.cpp:3801 [inlined]
emit_function at /buildworker/worker/package_linux64/build/src/codegen.cpp:6262
jl_compile_linfo at /buildworker/worker/package_linux64/build/src/codegen.cpp:1159
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1796
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
#1 at /home/travis/.julia/packages/MLStyle/50jL0/src/toolz.jl:23
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1831
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
#1 at /home/travis/.julia/packages/MLStyle/50jL0/src/toolz.jl:23
$ at /home/travis/.julia/packages/MLStyle/50jL0/src/toolz.jl:8
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1831
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
gen_match at /home/travis/.julia/packages/MLStyle/50jL0/src/MatchCore.jl:217
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1831
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
@match at /home/travis/.julia/packages/MLStyle/50jL0/src/MatchCore.jl:226
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1831
jl_invoke_julia_macro at /buildworker/worker/package_linux64/build/src/ast.c:987
jl_expand_macros at /buildworker/worker/package_linux64/build/src/ast.c:1049
jl_expand_macros at /buildworker/worker/package_linux64/build/src/ast.c:1092
jl_expand_macros at /buildworker/worker/package_linux64/build/src/ast.c:1092
jl_expand_macros at /buildworker/worker/package_linux64/build/src/ast.c:1092
jl_expand_macros at /buildworker/worker/package_linux64/build/src/ast.c:1092
jl_expand_macros at /buildworker/worker/package_linux64/build/src/ast.c:1092
jl_expand_macros at /buildworker/worker/package_linux64/build/src/ast.c:1092
jl_parse_eval_all at /buildworker/worker/package_linux64/build/src/ast.c:822
jl_load at /buildworker/worker/package_linux64/build/src/toplevel.c:839
include at ./boot.jl:317 [inlined]
include_relative at ./loading.jl:1044
include at ./sysimg.jl:29 [inlined]

You can also try a debug build with assertions enabled, to narrow down the cause.

Furthermore if you can't reduce it to a MWE on your own please post a Manifest.toml that once can use to get the the same packages as you do and a script on how to trigger the segfault.

The code path that could lead to that assertion failure is going away shortly (in #31191), because it has known issues

@vchuravy
Manifest

Now I've removed the usage of state monads via bootstrap that automatically generated inline codes.

Unfortunately, the problem still exist.
https://travis-ci.org/thautwarm/MLStyle.jl/jobs/504833019#L152

I found that in MacOS the error message is quite short and clean:

signal (11): Segmentation fault: 11
in expression starting at /Users/travis/build/thautwarm/MLStyle.jl/test/MQuery/MQuery.MacroProcessor.jl:4
_platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
Allocations: 15672961 (Pool: 15669315; Big: 3646); GC: 31

I searched this, and I found some other cases a bit similar to mine.

https://github.com/GiovineItalia/Gadfly.jl/issues/1243
https://github.com/JuliaData/CSV.jl/issues/328

All of the problematic repos depends on DataFrames.jl...

The code is reported fixed in more recent version (only seen in v1.0.x)

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I appreciate your efforts!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

i-apellaniz picture i-apellaniz  路  3Comments

StefanKarpinski picture StefanKarpinski  路  3Comments

wilburtownsend picture wilburtownsend  路  3Comments

TotalVerb picture TotalVerb  路  3Comments

yurivish picture yurivish  路  3Comments