Skip to content

Compiler hang in type inference: regression in Julia v1.11-rc3 #55809

@odow

Description

@odow

Reported on https://discourse.julialang.org/t/repl-hangs-at-compile/119562/4

Julia 1.11.0-rc3 installed via juliaup. Intel macOS, but discourse also reports that it happens on Windows.

oscar@Oscars-MBP /tmp % julia +1.11 --project=cosmo
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.0-rc3 (2024-08-26)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> versioninfo()
Julia Version 1.11.0-rc3
Commit 616e45539db (2024-08-26 15:46 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (x86_64-apple-darwin22.4.0)
  CPU: 8 × Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)

julia> import COSMO

julia> COSMO.Optimizer{Float64}()
^C^C^C^C^C^C^C^C^CWARNING: Force throwing a SIGINT
Internal error: during type inference of
(::Type{COSMO.Optimizer{Float64}})()
Encountered unexpected error in runtime:
InterruptException()
tmerge_types_slow at ./compiler/typelimits.jl:790
tmerge at ./compiler/typelimits.jl:704
tmerge at ./compiler/typelimits.jl:688
tmerge at ./compiler/typelimits.jl:676
tmerge at ./compiler/typelimits.jl:518
tmerge at ./compiler/typelimits.jl:478
tmerge at ./compiler/abstractlattice.jl:303
_getfield_tfunc at ./compiler/tfuncs.jl:1214
_getfield_tfunc at ./compiler/tfuncs.jl:1133 [inlined]
_getfield_tfunc at ./compiler/tfuncs.jl:1113
_getfield_tfunc at ./compiler/tfuncs.jl:1094 [inlined]
_getfield_tfunc at ./compiler/tfuncs.jl:1087 [inlined]
getfield_tfunc at ./compiler/tfuncs.jl:1053
jl_apply at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-x64-5.0/build/default-macmini-x64-5-0/julialang/julia-release-1-dot-11/src/./julia.h:2157 [inlined]
do_apply at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-x64-5.0/build/default-macmini-x64-5-0/julialang/julia-release-1-dot-11/src/builtins.c:831
builtin_tfunction at ./compiler/tfuncs.jl:2736
abstract_call_builtin at ./compiler/abstractinterpretation.jl:1820
abstract_call_known at ./compiler/abstractinterpretation.jl:2114
abstract_call at ./compiler/abstractinterpretation.jl:2282
abstract_call at ./compiler/abstractinterpretation.jl:2275
abstract_call at ./compiler/abstractinterpretation.jl:2420
abstract_eval_call at ./compiler/abstractinterpretation.jl:2435
abstract_eval_statement_expr at ./compiler/abstractinterpretation.jl:2451
abstract_eval_statement at ./compiler/abstractinterpretation.jl:2749
abstract_eval_basic_statement at ./compiler/abstractinterpretation.jl:3065
typeinf_local at ./compiler/abstractinterpretation.jl:3319
typeinf_nocycle at ./compiler/abstractinterpretation.jl:3401
# ... and it goes on ...

whereas

julia> versioninfo()
Julia Version 1.10.5
Commit 6f3fdf7b362 (2024-08-27 14:19 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (x86_64-apple-darwin22.4.0)
  CPU: 8 × Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)

julia> import COSMO

julia> COSMO.Optimizer{Float64}()
Empty COSMO - Optimizer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions