Julia: Precompilation error on 0.6

Created on 31 May 2017  ·  3Comments  ·  Source: JuliaLang/julia

I am experiencing a signal (6) during precompilation of the following two modules. This is on v0.6.0-rc2 built with make debug.

__precompile__()

module A

  import Base: cmp, hash, >

  export hash, typeA

  type fmpz end 

  type typeA end 

  >(x::fmpz, y::Int) = cmp(x, y) > 0 

  function hash(a::typeA, h::UInt)
    d = den(a)
    return h
  end 
end

```julia
__precompile__()

module B
using A

import A: hash

type typeB
y::typeA
end

hash(x::typeB) = hash(x.y)
end

```julia
~/julia/julia-git ((v0.6.0-rc2))$ ./usr/bin/julia-debug
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.0-rc2.0 (2017-05-18 02:31 UTC)
 _/ |\__'_|_|_|\__'_|  |  
|__/                   |  x86_64-linux-gnu

julia> using B
INFO: Precompiling module B.
julia-debug: /home/thofmann/julia/julia-git/src/gf.c:1326: jl_method_instance_add_backedge: Assertion `callee->min_world <= caller->min_world && callee->max_world >= caller->max_world' failed.

signal (6): Aborted
while loading no file, in expression starting on line 0
raise at /build/eglibc-oGUzwX/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56
abort at /build/eglibc-oGUzwX/eglibc-2.19/stdlib/abort.c:89
__assert_fail_base at /build/eglibc-oGUzwX/eglibc-2.19/assert/assert.c:92
__assert_fail at /build/eglibc-oGUzwX/eglibc-2.19/assert/assert.c:101
jl_method_instance_add_backedge at /home/thofmann/julia/julia-git/src/gf.c:1326
jl_insert_backedges at /home/thofmann/julia/julia-git/src/dump.c:2229
_jl_restore_incremental at /home/thofmann/julia/julia-git/src/dump.c:3282
jl_restore_incremental at /home/thofmann/julia/julia-git/src/dump.c:3321
_include_from_serialized at ./loading.jl:157
_require_from_serialized at ./loading.jl:200
_require at ./loading.jl:491
require at ./loading.jl:398
unknown function (ip: 0x7f842be096cb)
jl_call_fptr_internal at /home/thofmann/julia/julia-git/src/julia_internal.h:337
jl_call_method_internal at /home/thofmann/julia/julia-git/src/julia_internal.h:356
jl_apply_generic at /home/thofmann/julia/julia-git/src/gf.c:1930
jl_apply at /home/thofmann/julia/julia-git/src/julia.h:1422
eval_import_path_ at /home/thofmann/julia/julia-git/src/toplevel.c:401
eval_import_path at /home/thofmann/julia/julia-git/src/toplevel.c:428
jl_toplevel_eval_flex at /home/thofmann/julia/julia-git/src/toplevel.c:493
jl_toplevel_eval at /home/thofmann/julia/julia-git/src/toplevel.c:598
jl_toplevel_eval_in at /home/thofmann/julia/julia-git/src/builtins.c:496
eval at ./boot.jl:235
unknown function (ip: 0x7f842bc62b8f)
jl_call_fptr_internal at /home/thofmann/julia/julia-git/src/julia_internal.h:337
jl_call_method_internal at /home/thofmann/julia/julia-git/src/julia_internal.h:356
jl_apply_generic at /home/thofmann/julia/julia-git/src/gf.c:1930
eval_user_input at ./REPL.jl:66
unknown function (ip: 0x7f842bd0d10f)
jl_call_fptr_internal at /home/thofmann/julia/julia-git/src/julia_internal.h:337
jl_call_method_internal at /home/thofmann/julia/julia-git/src/julia_internal.h:356
jl_apply_generic at /home/thofmann/julia/julia-git/src/gf.c:1930
macro expansion at ./REPL.jl:97 [inlined]
#1 at ./event.jl:73
unknown function (ip: 0x7f840f6955af)
jl_call_fptr_internal at /home/thofmann/julia/julia-git/src/julia_internal.h:337
jl_call_method_internal at /home/thofmann/julia/julia-git/src/julia_internal.h:356
jl_apply_generic at /home/thofmann/julia/julia-git/src/gf.c:1930
jl_apply at /home/thofmann/julia/julia-git/src/julia.h:1422
start_task at /home/thofmann/julia/julia-git/src/task.c:267
unknown function (ip: 0xffffffffffffffff)
Allocations: 3155595 (Pool: 3154319; Big: 1276); GC: 4
Aborted (core dumped)

This showed up after https://github.com/JuliaLang/julia/commit/5e709e46458f8a1cc566d75718b385a63ac9d917.

bug precompile

Most helpful comment

Yeah, 44 of them hit the same assertation as we did.

All 3 comments

To see how common this kind of thing might be, I'm currently running a pkgeval comparison on 0.6.0-rc3 looking at the release julia executable vs julia-debug. Not that many packages test with julia-debug regularly.

There were a lot more failures on julia-debug than I thought there would be:
https://gist.github.com/e7ad8a255d7c682efb5f12e3d19d5500

I didn't look through every single log, but looks like a bunch of assertion failures.

Yeah, 44 of them hit the same assertation as we did.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TotalVerb picture TotalVerb  ·  3Comments

StefanKarpinski picture StefanKarpinski  ·  3Comments

omus picture omus  ·  3Comments

musm picture musm  ·  3Comments

StefanKarpinski picture StefanKarpinski  ·  3Comments