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

Assertion during loading of precompile .ji #29859

Closed
Keno opened this issue Oct 30, 2018 · 0 comments · Fixed by #35378
Closed

Assertion during loading of precompile .ji #29859

Keno opened this issue Oct 30, 2018 · 0 comments · Fixed by #35378
Assignees
Labels
compiler:precompilation Precompilation of modules

Comments

@Keno
Copy link
Member

Keno commented Oct 30, 2018

I'm seeing this assertion during precompile deserialization:

julia> using Revise

julia> using XLA
[ Info: Recompiling stale cache file /home/keno/.julia/compiled/v1.1/XLA/qVZMu.ji for XLA [62031404-ea4d-59fc-b017-b9812f5c6528]
┌ Warning: Package XLA does not have LinearAlgebra in its dependencies:
│ - If you have XLA checked out for development and have
│   added LinearAlgebra as a dependency but haven't updated your primary
│   environment's manifest file, try `Pkg.resolve()`.
│ - Otherwise you may need to report an issue with XLA
└ Loading LinearAlgebra into XLA from project dependency, future warnings for XLA are suppressed.
julia-debug: /home/keno/julia-1.0/src/julia.h:765: jl_svecref: Assertion `i < jl_svec_len(t)' failed.

The backtrace is:

#4  0x00007f7f8b4d4222 in jl_svecref (t=0x7f7f78924010, i=0) at /home/keno/julia-1.0/src/julia.h:765
#5  0x00007f7f8b4d5433 in jl_intref (arr=0x7f7f78924008, idx=1) at /home/keno/julia-1.0/src/typemap.c:182
#6  0x00007f7f8b4d57f2 in mtcache_hash_lookup (a=0x7f7eef4e06d0, ty=0x7f7f7df1c0f0 <jl_system_image_data+528240>, tparam=0 '\000',
    offs=0 '\000') at /home/keno/julia-1.0/src/typemap.c:251
#7  0x00007f7f8b4d68e6 in jl_typemap_intersection_visitor (map=0x7f7eef4e06d0, offs=0, closure=0x7f7f5dffd510)
    at /home/keno/julia-1.0/src/typemap.c:542
#8  0x00007f7f8b4d0bb8 in jl_method_table_insert (mt=0x7f7f7df1c1b0 <jl_system_image_data+528432>, method=0x7f7ef13664f0,
    simpletype=0x7f7f78924008) at /home/keno/julia-1.0/src/gf.c:1612
#9  0x00007f7f8b50099d in jl_insert_methods (list=0x56176a640cc0) at /home/keno/julia-1.0/src/dump.c:2174
#10 0x00007f7f8b504777 in _jl_restore_incremental (f=0x7f7f5dffd7f0, mod_array=0x7f7f7b2630f0)
    at /home/keno/julia-1.0/src/dump.c:3104
#11 0x00007f7f8b504a5a in jl_restore_incremental (fname=0x7f7f7a777058 "/home/keno/.julia/compiled/v1.1/XLA/qVZMu.ji",
    mod_array=0x7f7f7b2630f0) at /home/keno/julia-1.0/src/dump.c:3149
#12 0x00007f7f64e6632b in japi1__include_from_serialized_2109732566 (path=<optimized out>, depmods=<optimized out>)
    at loading.jl:617

The ->indices ordered dict is not yet initialized because we're deserializing (i.e. it's jl_nothing).
The method it's trying to invalidate backedges for is from the package we're currently deserializing:

#8  0x00007f7f8b4d0bb8 in jl_method_table_insert (mt=0x7f7f7df1c1b0 <jl_system_image_data+528432>, method=0x7f7ef13664f0,
    simpletype=0x7f7f78924008) at /home/keno/julia-1.0/src/gf.c:1612
1612	                jl_typemap_intersection_visitor(d[i]->specializations, 0, &env.match);
(rr) list
1607	        else {
1608	            assert(jl_is_array(oldvalue));
1609	            jl_method_t **d = (jl_method_t**)jl_array_ptr_data(oldvalue);
1610	            size_t i, n = jl_array_len(oldvalue);
1611	            for (i = 0; i < n; i++) {
1612	                jl_typemap_intersection_visitor(d[i]->specializations, 0, &env.match);
1613	            }
1614	        }
1615	    }
1616	    if (env.invalidated && JL_DEBUG_METHOD_INVALIDATION) {
(rr) p jl_(d[i])
XLA.convert(...)
@JeffBezanson JeffBezanson added the compiler:precompilation Precompilation of modules label Oct 31, 2018
@JeffBezanson JeffBezanson added this to the 1.0.x milestone Nov 4, 2018
vtjnash added a commit to vtjnash/julia that referenced this issue Feb 25, 2020
vtjnash added a commit that referenced this issue Mar 11, 2020
vtjnash added a commit that referenced this issue Mar 11, 2020
vtjnash added a commit that referenced this issue Apr 2, 2020
vtjnash added a commit that referenced this issue Apr 2, 2020
KristofferC pushed a commit that referenced this issue May 10, 2020
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.

3 participants