Skip to content
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

Segmentation fault when loading package #16905

Closed
KristofferC opened this issue Jun 13, 2016 · 8 comments · Fixed by #16908
Closed

Segmentation fault when loading package #16905

KristofferC opened this issue Jun 13, 2016 · 8 comments · Fixed by #16908
Assignees
Labels
compiler:precompilation Precompilation of modules

Comments

@KristofferC
Copy link
Member

KristofferC commented Jun 13, 2016

Pkg.clone("https://github.com/KristofferC/ContMechTensors.jl")
using ContMechTensors

signal (11): Segmentation fault
while loading no file, in expression starting on line 0
type_match_ at /home/kristoffer/julia/src/jltypes.c:3027
jl_type_match_ at /home/kristoffer/julia/src/jltypes.c:3221
jl_type_match at /home/kristoffer/julia/src/jltypes.c:3234
sigs_eq at /home/kristoffer/julia/src/typemap.c:518
jl_typemap_insert at /home/kristoffer/julia/src/typemap.c:948
jl_method_table_insert at /home/kristoffer/julia/src/gf.c:931
jl_deserialize_lambdas_from_mod at /home/kristoffer/julia/src/dump.c:1696
_jl_restore_incremental at /home/kristoffer/julia/src/dump.c:2308
_require_from_serialized at ./loading.jl:174
unknown function (ip: 0x7f43f05f08ce)
jl_call_method_internal at /home/kristoffer/julia/src/julia_internal.h:93
_require_from_serialized at ./loading.jl:202
require at ./loading.jl:332
unknown function (ip: 0x7f43f05f22ab)
jl_call_method_internal at /home/kristoffer/julia/src/julia_internal.h:93
jl_apply at /home/kristoffer/julia/src/julia.h:1384
eval_import_path at /home/kristoffer/julia/src/toplevel.c:411
jl_toplevel_eval_in_warn at /home/kristoffer/julia/src/builtins.c:571
eval at ./boot.jl:225
unknown function (ip: 0x7f43f0584720)
jl_call_method_internal at /home/kristoffer/julia/src/julia_internal.h:93
eval_user_input at ./REPL.jl:62
unknown function (ip: 0x7f41d8f3c586)
jl_call_method_internal at /home/kristoffer/julia/src/julia_internal.h:93
macro expansion; at ./REPL.jl:92
unknown function (ip: 0x7f41edf0a50f)
jl_call_method_internal at /home/kristoffer/julia/src/julia_internal.h:93
jl_apply at /home/kristoffer/julia/src/julia.h:1384
unknown function (ip: 0xffffffffffffffff)
Allocations: 5061447 (Pool: 5059731; Big: 1716); GC: 11
[1]    8125 segmentation fault (core dumped)  ~/julia/julia

Works on a ~3 week old master. Note that this package is basically the @generated-devil incarnate so that might have something to do with it.

@KristofferC KristofferC changed the title Segmentationfault when loading package Segmentation fault when loading package Jun 13, 2016
@ivarne
Copy link
Member

ivarne commented Jun 13, 2016

Clickable link to package: https://github.com/KristofferC/ContMechTensors.jl

Have you tried doing a git bisect to identify the commit that broke this?

@KristofferC
Copy link
Member Author

I'll do one.

@KristofferC
Copy link
Member Author

Having to rebuild LLVM makes bisecting slow.

@yuyichao yuyichao added the compiler:precompilation Precompilation of modules label Jun 13, 2016
@yuyichao
Copy link
Contributor

Gone with --compilecache=no Maybe dup of #16883

@KristofferC
Copy link
Member Author

KristofferC commented Jun 13, 2016

I don't think there are any recursively defined types. The only types are:

abstract AbstractTensor{order, dim, T <: Real} <: AbstractArray{T, order}

immutable SymmetricTensor{order, dim, T <: Real, M} <: AbstractTensor{order, dim, T}
   data::NTuple{M, T}
end

immutable Tensor{order, dim, T <: Real, M} <: AbstractTensor{order, dim, T}
   data::NTuple{M, T}
end

and some Unions of these types.

@yuyichao
Copy link
Contributor

Assertion failure in the deserializer

Thread 1 hit Breakpoint 3, 0x00007f9be452b300 in __assert_fail () from /usr/lib/libc.so.6
(rr) up
#1  0x00007f9be4f3457e in jl_deserialize_lambdas_from_mod (s=0x7ffd9c8cf710) at /home/yuyichao/projects/julia/master/src/dump.c:1695
1695            assert(jl_is_datatype(gf));
(rr) p jl_(gf)
Union{Type{ContMechTensors.Tensor{#order<:Any, #dim<:Any, T<:Real, M<:Any}}, Type{ContMechTensors.SymmetricTensor{#order<:Any, #dim<:Any, T<:Real, M<:Any}}}
$16 = void

@KristofferC
Copy link
Member Author

Bisect done:

first bad commit: [df90d8e] serialize kwftypes via their real type

cc @vtjnash

@vtjnash
Copy link
Member

vtjnash commented Jun 13, 2016

yes, that's what yichao's assertion failure also indicated. it needs to call first_arg_datatype on gf there to extract the right method table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:precompilation Precompilation of modules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants