Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
thautwarm opened this issue Mar 3, 2019 · 6 comments
Closed

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

thautwarm opened this issue Mar 3, 2019 · 6 comments

Comments

@thautwarm
Copy link
Member

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

@vchuravy
Copy link
Member

vchuravy commented Mar 5, 2019

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.

@vtjnash
Copy link
Member

vtjnash commented Mar 5, 2019

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

@thautwarm
Copy link
Member Author

@vchuravy
Manifest

@thautwarm
Copy link
Member Author

thautwarm commented Mar 11, 2019

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.

GiovineItalia/Gadfly.jl#1243
JuliaData/CSV.jl#328

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

@vtjnash
Copy link
Member

vtjnash commented Nov 25, 2019

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

@vtjnash vtjnash closed this as completed Nov 25, 2019
@thautwarm
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants