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

PhysicalConstants.jl fails to precompile on master. #43561

Closed
N5N3 opened this issue Dec 27, 2021 · 8 comments
Closed

PhysicalConstants.jl fails to precompile on master. #43561

N5N3 opened this issue Dec 27, 2021 · 8 comments
Labels
compiler:latency Compiler latency performance Must go faster regression Regression in behavior compared to a previous version
Milestone

Comments

@N5N3
Copy link
Member

N5N3 commented Dec 27, 2021

On master using PhysicalConstants seems run into a dead loop. (CPU usage is not 0)
On 1.7 everything seems OK.

@giordano
Copy link
Contributor

giordano commented Dec 27, 2021

For the record, this is getting stuck at https://github.com/JuliaPhysics/PhysicalConstants.jl/blob/221b3bee8dd001294ad7f3897bfb2f9e64809b4e/src/PhysicalConstants.jl#L87 for derived physical constants, for example https://github.com/JuliaPhysics/PhysicalConstants.jl/blob/221b3bee8dd001294ad7f3897bfb2f9e64809b4e/src/codata2014.jl#L39. If I comment out all those assertions, I can precompile the package, but doing measurement(CODATA2014.PlanckConstantOver2pi) still results in a dead lock:

julia> using PhysicalConstants.CODATA2014, Measurements

julia> measurement(CODATA2014.PlanckConstantOver2pi)
^C^C^C^C^C^C^CWARNING: Force throwing a SIGINT
Internal error: encountered unexpected error in runtime:
InterruptException()
⊑ at ./compiler/typelattice.jl:180
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
⊑ at ./compiler/typelattice.jl:187
tmerge at ./compiler/typelimits.jl:315
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
tmerge at ./compiler/typelimits.jl:417
smerge at ./compiler/typelattice.jl:311 [inlined]
stupdate! at ./compiler/typelattice.jl:377
typeinf_local at ./compiler/abstractinterpretation.jl:2091
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2149
_typeinf at ./compiler/typeinfer.jl:226
typeinf at ./compiler/typeinfer.jl:209
typeinf_edge at ./compiler/typeinfer.jl:826
abstract_call_method at ./compiler/abstractinterpretation.jl:570
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:117
abstract_call_known at ./compiler/abstractinterpretation.jl:1487
abstract_call at ./compiler/abstractinterpretation.jl:1543
abstract_call at ./compiler/abstractinterpretation.jl:1525
abstract_eval_statement at ./compiler/abstractinterpretation.jl:1664
typeinf_local at ./compiler/abstractinterpretation.jl:2053
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2149
_typeinf at ./compiler/typeinfer.jl:226
typeinf at ./compiler/typeinfer.jl:209
typeinf_edge at ./compiler/typeinfer.jl:826
abstract_call_method at ./compiler/abstractinterpretation.jl:570
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:117
abstract_call_known at ./compiler/abstractinterpretation.jl:1487
abstract_call at ./compiler/abstractinterpretation.jl:1543
abstract_call at ./compiler/abstractinterpretation.jl:1525
abstract_eval_statement at ./compiler/abstractinterpretation.jl:1664
typeinf_local at ./compiler/abstractinterpretation.jl:2053
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2149
_typeinf at ./compiler/typeinfer.jl:226
typeinf at ./compiler/typeinfer.jl:209
typeinf_edge at ./compiler/typeinfer.jl:826
abstract_call_method at ./compiler/abstractinterpretation.jl:570
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:117
abstract_call_known at ./compiler/abstractinterpretation.jl:1487
abstract_call at ./compiler/abstractinterpretation.jl:1543
abstract_call at ./compiler/abstractinterpretation.jl:1525
abstract_eval_statement at ./compiler/abstractinterpretation.jl:1664
typeinf_local at ./compiler/abstractinterpretation.jl:2053
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2149
_typeinf at ./compiler/typeinfer.jl:226
typeinf at ./compiler/typeinfer.jl:209
typeinf_edge at ./compiler/typeinfer.jl:826
abstract_call_method at ./compiler/abstractinterpretation.jl:570
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:117
abstract_call_known at ./compiler/abstractinterpretation.jl:1487
abstract_call at ./compiler/abstractinterpretation.jl:1543
abstract_call at ./compiler/abstractinterpretation.jl:1525
abstract_eval_statement at ./compiler/abstractinterpretation.jl:1664
typeinf_local at ./compiler/abstractinterpretation.jl:2053
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2149
_typeinf at ./compiler/typeinfer.jl:226
typeinf at ./compiler/typeinfer.jl:209
typeinf_ext at ./compiler/typeinfer.jl:907
typeinf_ext_toplevel at ./compiler/typeinfer.jl:940
typeinf_ext_toplevel at ./compiler/typeinfer.jl:936
jfptr_typeinf_ext_toplevel_12842 at /Users/mose/repo/julia/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /Users/mose/repo/julia/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/mose/repo/julia/src/gf.c:2486
jl_apply at /Users/mose/repo/julia/src/./julia.h:1789 [inlined]
jl_type_infer at /Users/mose/repo/julia/src/gf.c:295
jl_generate_fptr_impl at /Users/mose/repo/julia/src/jitlayers.cpp:301
jl_compile_method_internal at /Users/mose/repo/julia/src/gf.c:2020
_jl_invoke at /Users/mose/repo/julia/src/gf.c:2296 [inlined]
ijl_apply_generic at /Users/mose/repo/julia/src/gf.c:2486
jl_apply at /Users/mose/repo/julia/src/./julia.h:1789 [inlined]
do_call at /Users/mose/repo/julia/src/interpreter.c:126
eval_body at /Users/mose/repo/julia/src/interpreter.c:0
jl_interpret_toplevel_thunk at /Users/mose/repo/julia/src/interpreter.c:744
jl_toplevel_eval_flex at /Users/mose/repo/julia/src/toplevel.c:888
jl_toplevel_eval_flex at /Users/mose/repo/julia/src/toplevel.c:832
ijl_toplevel_eval at /Users/mose/repo/julia/src/toplevel.c:897 [inlined]
ijl_toplevel_eval_in at /Users/mose/repo/julia/src/toplevel.c:947
eval at ./boot.jl:368 [inlined]
eval_user_input at /Users/mose/repo/julia/usr/share/julia/stdlib/v1.8/REPL/src/REPL.jl:151
repl_backend_loop at /Users/mose/repo/julia/usr/share/julia/stdlib/v1.8/REPL/src/REPL.jl:245
start_repl_backend at /Users/mose/repo/julia/usr/share/julia/stdlib/v1.8/REPL/src/REPL.jl:230
#run_repl#47 at /Users/mose/repo/julia/usr/share/julia/stdlib/v1.8/REPL/src/REPL.jl:367
run_repl at /Users/mose/repo/julia/usr/share/julia/stdlib/v1.8/REPL/src/REPL.jl:354
jfptr_run_repl_56235 at /Users/mose/repo/julia/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /Users/mose/repo/julia/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/mose/repo/julia/src/gf.c:2486
#934 at ./client.jl:403
jfptr_YY.934_51291 at /Users/mose/repo/julia/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /Users/mose/repo/julia/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/mose/repo/julia/src/gf.c:2486
jl_apply at /Users/mose/repo/julia/src/./julia.h:1789 [inlined]
jl_f__call_latest at /Users/mose/repo/julia/src/builtins.c:757
#invokelatest#2 at ./essentials.jl:731 [inlined]
invokelatest at ./essentials.jl:729 [inlined]
run_main_repl at ./client.jl:388
exec_options at ./client.jl:318
_start at ./client.jl:506
jfptr__start_37757 at /Users/mose/repo/julia/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /Users/mose/repo/julia/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/mose/repo/julia/src/gf.c:2486
jl_apply at /Users/mose/repo/julia/src/./julia.h:1789 [inlined]
true_main at /Users/mose/repo/julia/src/jlapi.c:562
jl_repl_entrypoint at /Users/mose/repo/julia/src/jlapi.c:706
^C1.0545718e-34 ± 1.3e-42

Given the files referenced in the stacktrace I presume we should ping @aviatesk? Note that the Measurements.measurement method which goes wild is defined at https://github.com/JuliaPhysics/PhysicalConstants.jl/blob/221b3bee8dd001294ad7f3897bfb2f9e64809b4e/src/PhysicalConstants.jl#L68-L69.

@vtjnash vtjnash added compiler:latency Compiler latency performance Must go faster labels Dec 27, 2021
@vtjnash
Copy link
Member

vtjnash commented Dec 27, 2021

This might be akin to #43542, though the cause and solution are likely quite different

@N5N3
Copy link
Member Author

N5N3 commented Dec 28, 2021

Bisected to

63f62943e13d47c917e4136bc13c062a2b09fbe1 is the first bad commit
commit 63f62943e13d47c917e4136bc13c062a2b09fbe1
Author: Jameson Nash <vtjnash@gmail.com>
Date:   Fri Dec 17 16:59:21 2021 -0500

    Allow const declarations on mutable fields (#43305)

    Mark some builtin types also, although Serialization relies upon being
    able to mutilate the Method objects, so we do not yet mark those.

    Replaces #11430

    Co-authored-by: Matt Bauman <mbauman@gmail.com>

@vtjnash
Before that commit, it takes about 30s to precompile PhysicalConstants.jl on my pc. (For comparing, the time cost is 24s on 1.7.1)

@giordano
Copy link
Contributor

Before that commit, it takes about 30s to precompile PhysicalConstants.jl on my pc. (For comparing, the time cost is 24s on 1.7.1)

Wow, that's a lot:

julia> versioninfo()
Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.1.0)
  CPU: Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, cyclone)

(tmp) pkg> add PhysicalConstants
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
   Installed Unitful ─ v1.10.0
    Updating `/private/tmp/Project.toml`
  [5ad8b20f] + PhysicalConstants v0.2.1
    Updating `/private/tmp/Manifest.toml`
  [49dc2e85] + Calculus v0.5.1
  [38540f10] + CommonSolve v0.2.0
  [187b0558] + ConstructionBase v1.3.0
  [1914dd2f] + MacroTools v0.5.9
  [eff96d63] + Measurements v2.6.0
  [5ad8b20f] + PhysicalConstants v0.2.1
  [3cdcf5f2] + RecipesBase v1.2.1
  [ae029012] + Requires v1.2.0
  [f2b01f46] + Roots v1.3.13
  [efcf1570] + Setfield v0.8.1
  [1986cc42] + Unitful v1.10.0
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [9fa8497b] + Future
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [d6f4376e] + Markdown
  [de0858da] + Printf
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [e66e0078] + CompilerSupportLibraries_jll
  [4536629a] + OpenBLAS_jll
  [8e850b90] + libblastrampoline_jll
Precompiling project...
  14 dependencies successfully precompiled in 17 seconds

It took me 17 seconds to precompile PhysicalConstants.jl and all of its dependencies

@N5N3
Copy link
Member Author

N5N3 commented Dec 28, 2021

Well, I just run @time using PhysicalConstants on a fresh-built julia.
So I guess 24s includes time for dependencies

@giordano
Copy link
Contributor

I just opened a PR to Measurements.jl and found that CI is hanging on Julia nightly: https://github.com/JuliaPhysics/Measurements.jl/runs/4649844099?check_suite_focus=true. I just recompiled latest master of Julia and found that simple things like

julia> using Measurements

julia> (1 ± 2) + (3 ± 4)
^C^C^C^C^C^CWARNING: Force throwing a SIGINT
Internal error: encountered unexpected error in runtime:
InterruptException()
jl_is_tuple_type at /Users/mose/repo/julia/src/./julia.h:1287 [inlined]
jl_tuple1_isa at /Users/mose/repo/julia/src/subtype.c:2006
jl_typemap_entry_assoc_exact at /Users/mose/repo/julia/src/typemap.c:976
jl_typemap_assoc_exact at /Users/mose/repo/julia/src/./julia_internal.h:1300 [inlined]
jl_lookup_generic_ at /Users/mose/repo/julia/src/gf.c:2426 [inlined]
ijl_apply_generic at /Users/mose/repo/julia/src/gf.c:2482
is_lattice_equal at ./compiler/typelattice.jl:263
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_lattice_equal at ./compiler/typelattice.jl:265
is_argtype_match at ./compiler/inferenceresult.jl:7 [inlined]
cache_lookup at ./compiler/inferenceresult.jl:213
abstract_call_method_with_const_args at ./compiler/abstractinterpretation.jl:598
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:126
abstract_call_known at ./compiler/abstractinterpretation.jl:1487
abstract_call at ./compiler/abstractinterpretation.jl:1543
abstract_call at ./compiler/abstractinterpretation.jl:1525
abstract_eval_statement at ./compiler/abstractinterpretation.jl:1664
typeinf_local at ./compiler/abstractinterpretation.jl:2053
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2149
_typeinf at ./compiler/typeinfer.jl:226
typeinf at ./compiler/typeinfer.jl:209
abstract_call_method_with_const_args at ./compiler/abstractinterpretation.jl:622
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:126
abstract_call_known at ./compiler/abstractinterpretation.jl:1487
abstract_call at ./compiler/abstractinterpretation.jl:1543
abstract_call at ./compiler/abstractinterpretation.jl:1525
abstract_eval_statement at ./compiler/abstractinterpretation.jl:1664
typeinf_local at ./compiler/abstractinterpretation.jl:2053
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2149
_typeinf at ./compiler/typeinfer.jl:226
typeinf at ./compiler/typeinfer.jl:209
abstract_call_method_with_const_args at ./compiler/abstractinterpretation.jl:622
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:126
abstract_call_known at ./compiler/abstractinterpretation.jl:1487
abstract_call at ./compiler/abstractinterpretation.jl:1543
abstract_call at ./compiler/abstractinterpretation.jl:1525
abstract_eval_statement at ./compiler/abstractinterpretation.jl:1664
typeinf_local at ./compiler/abstractinterpretation.jl:2053
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2149
_typeinf at ./compiler/typeinfer.jl:226
typeinf at ./compiler/typeinfer.jl:209
abstract_call_method_with_const_args at ./compiler/abstractinterpretation.jl:622
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:126
abstract_call_known at ./compiler/abstractinterpretation.jl:1487
abstract_call at ./compiler/abstractinterpretation.jl:1543
abstract_call at ./compiler/abstractinterpretation.jl:1525
abstract_eval_statement at ./compiler/abstractinterpretation.jl:1664
typeinf_local at ./compiler/abstractinterpretation.jl:2053
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2149
_typeinf at ./compiler/typeinfer.jl:226
typeinf at ./compiler/typeinfer.jl:209
typeinf_edge at ./compiler/typeinfer.jl:826 [inlined]
abstract_call_method at ./compiler/abstractinterpretation.jl:570
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:117
abstract_call_known at ./compiler/abstractinterpretation.jl:1487
abstract_call at ./compiler/abstractinterpretation.jl:1543
abstract_call at ./compiler/abstractinterpretation.jl:1525
abstract_eval_statement at ./compiler/abstractinterpretation.jl:1664
typeinf_local at ./compiler/abstractinterpretation.jl:2053
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2149
_typeinf at ./compiler/typeinfer.jl:226
typeinf at ./compiler/typeinfer.jl:209
typeinf_ext at ./compiler/typeinfer.jl:907
typeinf_ext_toplevel at ./compiler/typeinfer.jl:940
typeinf_ext_toplevel at ./compiler/typeinfer.jl:936
jfptr_typeinf_ext_toplevel_10110 at /Users/mose/repo/julia/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /Users/mose/repo/julia/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/mose/repo/julia/src/gf.c:2486
jl_apply at /Users/mose/repo/julia/src/./julia.h:1789 [inlined]
jl_type_infer at /Users/mose/repo/julia/src/gf.c:295
jl_generate_fptr_impl at /Users/mose/repo/julia/src/jitlayers.cpp:301
jl_compile_method_internal at /Users/mose/repo/julia/src/gf.c:2020
_jl_invoke at /Users/mose/repo/julia/src/gf.c:2296 [inlined]
ijl_apply_generic at /Users/mose/repo/julia/src/gf.c:2486
jl_apply at /Users/mose/repo/julia/src/./julia.h:1789 [inlined]
do_call at /Users/mose/repo/julia/src/interpreter.c:126
eval_body at /Users/mose/repo/julia/src/interpreter.c:0
jl_interpret_toplevel_thunk at /Users/mose/repo/julia/src/interpreter.c:744
jl_toplevel_eval_flex at /Users/mose/repo/julia/src/toplevel.c:888
jl_toplevel_eval_flex at /Users/mose/repo/julia/src/toplevel.c:832
ijl_toplevel_eval at /Users/mose/repo/julia/src/toplevel.c:897 [inlined]
ijl_toplevel_eval_in at /Users/mose/repo/julia/src/toplevel.c:947
eval at ./boot.jl:368 [inlined]
eval_user_input at /Users/mose/repo/julia/usr/share/julia/stdlib/v1.8/REPL/src/REPL.jl:151
repl_backend_loop at /Users/mose/repo/julia/usr/share/julia/stdlib/v1.8/REPL/src/REPL.jl:245
start_repl_backend at /Users/mose/repo/julia/usr/share/julia/stdlib/v1.8/REPL/src/REPL.jl:230
#run_repl#47 at /Users/mose/repo/julia/usr/share/julia/stdlib/v1.8/REPL/src/REPL.jl:367
run_repl at /Users/mose/repo/julia/usr/share/julia/stdlib/v1.8/REPL/src/REPL.jl:354
jfptr_run_repl_55691 at /Users/mose/repo/julia/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /Users/mose/repo/julia/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/mose/repo/julia/src/gf.c:2486
#934 at ./client.jl:403
jfptr_YY.934_34804 at /Users/mose/repo/julia/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /Users/mose/repo/julia/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/mose/repo/julia/src/gf.c:2486
jl_apply at /Users/mose/repo/julia/src/./julia.h:1789 [inlined]
jl_f__call_latest at /Users/mose/repo/julia/src/builtins.c:757
#invokelatest#2 at ./essentials.jl:731 [inlined]
invokelatest at ./essentials.jl:729 [inlined]
run_main_repl at ./client.jl:388
exec_options at ./client.jl:318
_start at ./client.jl:506
jfptr__start_46562 at /Users/mose/repo/julia/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /Users/mose/repo/julia/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/mose/repo/julia/src/gf.c:2486
jl_apply at /Users/mose/repo/julia/src/./julia.h:1789 [inlined]
true_main at /Users/mose/repo/julia/src/jlapi.c:562
jl_repl_entrypoint at /Users/mose/repo/julia/src/jlapi.c:706
4.0 ± 4.5

hang

@N5N3
Copy link
Member Author

N5N3 commented Dec 28, 2021

Could confirm, and after reverting #43305 the above code is able to finish normally.

@JeffBezanson JeffBezanson added the regression Regression in behavior compared to a previous version label Jan 3, 2022
@KristofferC KristofferC added this to the 1.8 milestone Jan 6, 2022
@N5N3
Copy link
Member Author

N5N3 commented Jan 19, 2022

Fixed by #43812

@N5N3 N5N3 closed this as completed Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:latency Compiler latency performance Must go faster regression Regression in behavior compared to a previous version
Projects
None yet
Development

No branches or pull requests

5 participants