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

Unreachable reached for Julia 1.2.0-rc1.0 and execution gets frozen for 1.3.0-DEV.498 #32488

Closed
fverdugo opened this issue Jul 3, 2019 · 12 comments
Assignees
Labels
domain:types and dispatch Types, subtyping and method dispatch kind:regression Regression in behavior compared to a previous version

Comments

@fverdugo
Copy link

fverdugo commented Jul 3, 2019

I have realized that the test suite of my package (Gridap.jl) does not pass for the latest julia versions.

  • For version 1.1.0 everything works fine.
  • For version 1.2.0-rc1.0 I get an "unreachable reached" error
  • For version 1.3.0-DEV.498 (2019-07-03), I do not get the "unreachable reached" error, but the code execution gets blocked (i.e. "frozen") in another place of the test suite.

Unfortunately, I do not have a small reproducer. But the concerned code can be easily executed since the package Gridap is registered, e.g.:

$ mkdir foodir
$ cd foodir
$ julia --project=.
(foodir) pkg> add Gridap#e86ad2f
(foodir) pkg> test Gridap

I hope someone can help!

Thanks a lot!
Francesc

I attach the output I get in my machine:

for v1.2.0

verdugo@debian:~/Documents$ mkdir foodir
verdugo@debian:~/Documents$ cd foodir/
verdugo@debian:~/Documents/foodir$ ~/Apps/julia/julia-1.2.0-rc1/bin/julia --project=.
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.2.0-rc1.0 (2019-05-30)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> versioninfo()
Julia Version 1.2.0-rc1.0
Commit 7097799cf1 (2019-05-30 02:22 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-4260U CPU @ 1.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, haswell)

(foodir) pkg> add Gridap#e86ad2f
...

(foodir) pkg> test Gridap
...

Test Summary: | Pass  Total
Utils         |   17     17
 20.356723 seconds (9.08 M allocations: 483.486 MiB, 1.73% gc time)
Test Summary: | Pass  Total
CellValues    |  694    694
 62.783464 seconds (99.31 M allocations: 4.917 GiB, 5.12% gc time)
Test Summary: | Pass  Total
Fields        |  229    229
 32.142239 seconds (49.94 M allocations: 2.473 GiB, 7.87% gc time)
Test Summary: | Pass  Total
RefFEs        |  107    107
 26.819316 seconds (39.42 M allocations: 1.983 GiB, 8.45% gc time)
Unreachable reached at 0x7f5af6691cf7

signal (4): Illegal instruction
in expression starting at /home/verdugo/.julia/packages/Gridap/Jnta9/test/IntegrationTests/TriangulationsTests.jl:10
_setup_basis at /home/verdugo/.julia/packages/Gridap/Jnta9/src/Integration/Triangulations.jl:157
Type at /home/verdugo/.julia/packages/Gridap/Jnta9/src/Integration/Triangulations.jl:125
Type at /home/verdugo/.julia/packages/Gridap/Jnta9/src/Integration/Triangulations.jl:120
unknown function (ip: 0x7f5af6691764)
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2197
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:323
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:411
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:362 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:772
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:884
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f5af36fae8f)
unknown function (ip: 0xffffffffffffffff)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:893
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:815
jl_eval_module_expr at /buildworker/worker/package_linux64/build/src/toplevel.c:181
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:640
jl_parse_eval_all at /buildworker/worker/package_linux64/build/src/ast.c:873
jl_load at /buildworker/worker/package_linux64/build/src/toplevel.c:879
include at ./boot.jl:328 [inlined]
include_relative at ./loading.jl:1094
include at ./Base.jl:31 [inlined]
include at /home/verdugo/.julia/packages/Gridap/Jnta9/test/IntegrationTests/runtests.jl:1
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2191
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:323
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:411
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:362 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:772
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:699
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:699
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:884
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f5af2d6be8f)
unknown function (ip: 0x27)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:893
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:815
jl_eval_module_expr at /buildworker/worker/package_linux64/build/src/toplevel.c:181
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:640
jl_parse_eval_all at /buildworker/worker/package_linux64/build/src/ast.c:873
jl_load at /buildworker/worker/package_linux64/build/src/toplevel.c:879
include at ./boot.jl:328 [inlined]
include_relative at ./loading.jl:1094
include at ./Base.jl:31 [inlined]
include at /home/verdugo/.julia/packages/Gridap/Jnta9/test/runtests.jl:1
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2191
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:323
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:411
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:362 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:772
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:699
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:699
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:884
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f5af42fb68f)
unknown function (ip: 0x2b)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:893
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:815
jl_eval_module_expr at /buildworker/worker/package_linux64/build/src/toplevel.c:181
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:640
jl_parse_eval_all at /buildworker/worker/package_linux64/build/src/ast.c:873
jl_load at /buildworker/worker/package_linux64/build/src/toplevel.c:879
include at ./boot.jl:328 [inlined]
include_relative at ./loading.jl:1094
include at ./Base.jl:31
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2191
include at ./client.jl:431
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2197
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:323
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:411
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:362 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:772
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:884
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f5affc5e90f)
unknown function (ip: 0xffffffffffffffff)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:893
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:815
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:764
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/toplevel.c:844
eval at ./boot.jl:330
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2191
exec_options at ./client.jl:271
_start at ./client.jl:464
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2191
jl_apply at /buildworker/worker/package_linux64/build/ui/../src/julia.h:1606 [inlined]
true_main at /buildworker/worker/package_linux64/build/ui/repl.c:96
main at /buildworker/worker/package_linux64/build/ui/repl.c:217
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_start at /home/verdugo/Apps/julia/julia-1.2.0-rc1/bin/julia (unknown line)
Allocations: 200382926 (Pool: 200353471; Big: 29455); GC: 463
ERROR: Package Gridap errored during testing

for v1.3.0:

verdugo@debian:~/Documents$ ~/Apps/julia/julia-4b6ab68900/bin/julia --project=.
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.3.0-DEV.498 (2019-07-03)
 _/ |\__'_|_|_|\__'_|  |  Commit 4b6ab68900 (0 days old master)
|__/                   |

julia> versioninfo()
Julia Version 1.3.0-DEV.498
Commit 4b6ab68900 (2019-07-03 06:45 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-4260U CPU @ 1.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, haswell)
(Documents) pkg> add Gridap#e86ad2f
...

(Documents) pkg> test Gridap
...

Test Summary: | Pass  Total
Utils         |   17     17
 18.985908 seconds (9.11 M allocations: 476.847 MiB, 1.74% gc time)
Test Summary: | Pass  Total
CellValues    |  694    694
 65.932679 seconds (97.75 M allocations: 4.795 GiB, 5.39% gc time)
Test Summary: | Pass  Total
Fields        |  229    229
 33.801075 seconds (48.69 M allocations: 2.395 GiB, 8.23% gc time)
Test Summary: | Pass  Total
RefFEs        |  107    107
 47.038895 seconds (36.13 M allocations: 1.796 GiB, 7.41% gc time)
Test Summary: | Pass  Total
Integration   |   49     49
 24.528734 seconds (24.94 M allocations: 1.301 GiB, 7.73% gc time)
Test Summary: | Pass  Total
Geometry      |   74     74
  2.973502 seconds (2.02 M allocations: 107.156 MiB, 14.88% gc time)
Test Summary: | Pass  Total
Algebra       |    8      8
  2.388068 seconds (3.07 M allocations: 156.204 MiB, 8.82% gc time)
Test Summary: | Pass  Total
FESpaces      |   64     64
 66.457208 seconds (67.17 M allocations: 3.405 GiB, 9.03% gc time)
Test Summary: | Pass  Total
MultiField    |   47     47
104.340714 seconds (89.67 M allocations: 4.571 GiB, 9.39% gc time)

# execution gets frozen here!!
@fverdugo
Copy link
Author

fverdugo commented Jul 3, 2019

For completeness, this is the specific commit of my package for which I have obtained the results above:
gridap/Gridap.jl@e86ad2f

@KristofferC
Copy link
Sponsor Member

Just as a note, you can give add Gridap#e86ad2f as the reproducer, or create another branch with that commit and tell us to add Gridap#problematic_branch.

@fverdugo
Copy link
Author

fverdugo commented Jul 3, 2019

Just as a note, you can give add Gridap#e86ad2f as the reproducer, or create another branch with that commit and tell us to add Gridap#problematic_branch.

Done!

@JeffBezanson
Copy link
Sponsor Member

Does this use threads?

@fverdugo
Copy link
Author

fverdugo commented Jul 3, 2019

Does this use threads?

Not, or at least not in my library. However, I cannot guarantee in the dependencies....

@Keno Keno self-assigned this Jul 3, 2019
@Keno
Copy link
Member

Keno commented Jul 3, 2019

I'm seeing various errors in dependencies on master:

ERROR: LoadError: UndefVarError: Libdl not defined
Stacktrace:
 [1] check_deps() at /home/keno/.julia/packages/LightXML/k3mJ4/deps/deps.jl:13
 [2] top-level scope at /home/keno/.julia/packages/LightXML/k3mJ4/src/LightXML.jl:11
 [3] include at ./boot.jl:328 [inlined]
 [4] include_relative(::Module, ::String) at ./loading.jl:1094
 [5] include(::Module, ::String) at ./Base.jl:31
 [6] top-level scope at none:2
 [7] eval at ./boot.jl:330 [inlined]
 [8] eval(::Expr) at ./client.jl:433
 [9] top-level scope at ./none:3
in expression starting at /home/keno/.julia/packages/LightXML/k3mJ4/src/LightXML.jl:11

Can you share a complete manifest that reproduces?

@fverdugo
Copy link
Author

fverdugo commented Jul 3, 2019

@Keno
Copy link
Member

Keno commented Jul 4, 2019

Reduced:

struct SArray{S <: Tuple, T, N, L}
data::NTuple{L,T}
end
A = Tuple{Type{T} where T<:(SArray{Tuple{_A}, Int64, 1, _A} where _A), Tuple{Vararg{Int64, D}} where D}
B = Tuple{Type{SArray{S, T, N, L}}, Tuple{Vararg{T, L}}} where L where N where T where S
typeintersect(A, B) # hangs

@Keno
Copy link
Member

Keno commented Jul 4, 2019

Looks like the problem may be a left over free typevar in the following:

A′ = Type{T} where T<:(SArray{Tuple{_A}, Int64, 1, _A} where _A)
B′ = Type{SArray{S, T, N, L}} where L where N where T where S

julia> typeintersect(A′, B′)
Type{SArray{Tuple{_A},Int64,1,L}} where L

@Keno
Copy link
Member

Keno commented Jul 4, 2019

Probably @JeffBezanson is the right person to look at that particular issue.

@fverdugo
Copy link
Author

fverdugo commented Jul 5, 2019

Reduced:

struct SArray{S <: Tuple, T, N, L}
data::NTuple{L,T}
end
A = Tuple{Type{T} where T<:(SArray{Tuple{_A}, Int64, 1, _A} where _A), Tuple{Vararg{Int64, D}} where D}
B = Tuple{Type{SArray{S, T, N, L}}, Tuple{Vararg{T, L}}} where L where N where T where S
typeintersect(A, B) # hangs

@Keno great work! Impressive how you have found a so small MWE taking into account the complexity of the given code.

@JeffBezanson JeffBezanson added kind:regression Regression in behavior compared to a previous version domain:types and dispatch Types, subtyping and method dispatch labels Jul 5, 2019
JeffBezanson added a commit that referenced this issue Jul 5, 2019
Issue was caused by 74305bf, so this
reverts part of the new logic from there.
@fverdugo
Copy link
Author

fverdugo commented Jul 7, 2019

@JeffBezanson just a question please:

My code failed with 1.2, and 1.3 for different reasons. Both of them have been fixed?

Thanks!

JeffBezanson added a commit that referenced this issue Jul 17, 2019
Issue was caused by 74305bf, so this
reverts part of the new logic from there.
(cherry picked from commit a9ad6c2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:types and dispatch Types, subtyping and method dispatch kind:regression Regression in behavior compared to a previous version
Projects
None yet
Development

No branches or pull requests

4 participants