Pkg.jl icon indicating copy to clipboard operation
Pkg.jl copied to clipboard

Unhandled InterruptException during precompilation

Open Octogonapus opened this issue 3 years ago • 5 comments

I interrupted the automatic precompilation with ^C and the subsequent InterruptException was not handled, causing Julia to crash:

Precompiling project...
  Progress [========================>                ]  6/10
  ✓ PrettyTables
  ◒ Flux
^Cfatal: error thrown and no exception handler available.
InterruptException()
jl_mutex_unlock at /buildworker/worker/package_linux64/build/src/locks.h:134 [inlined]
jl_task_get_next at /buildworker/worker/package_linux64/build/src/partr.c:475
poptask at ./task.jl:760
wait at ./task.jl:768 [inlined]
task_done_hook at ./task.jl:494
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2237 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2419
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1703 [inlined]
jl_finish_task at /buildworker/worker/package_linux64/build/src/task.c:208
start_task at /buildworker/worker/package_linux64/build/src/task.c:850
unknown function (ip: (nil))
julia> versioninfo()
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
  JULIA_NUM_THREADS = 16
  JULIA_EDITOR = /usr/bin/code
  JULIA_PKG_SERVER =

Octogonapus avatar Jun 25 '21 17:06 Octogonapus

@vtjnash i don't believe this is a Pkg issue. Any idea?

IanButterworth avatar Jul 04 '21 08:07 IanButterworth

Seen in 1.6.3

Precompiling project...
  Progress [========>                                ]  14/76
  ◓ ModernGL
  ◒ GPUArrays
  ◓ MutableArithmetics
  ✓ ChainRulesCore
...
^Cfatal: error thrown and no exception handler available.
InterruptException()
jl_task_get_next at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
poptask at ./task.jl:760
wait at ./task.jl:769
task_done_hook at ./task.jl:494
jl_apply_generic at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_finish_task at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
start_task at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)

IanButterworth avatar Oct 23 '21 17:10 IanButterworth

I think that the interruption has to be disabled until a known safe point if this is supposed to work reliably.

KristofferC avatar Mar 05 '22 14:03 KristofferC

That sounds reasonable, but I don't know where to start. I don't really know how to tell what a non-safe point is.

IanButterworth avatar Mar 05 '22 14:03 IanButterworth

You need to detect and handle it explicitly if you intend this to work. See how runtests.jl does it in the Base tests, for example.

vtjnash avatar Mar 05 '22 16:03 vtjnash

just to say, this also happens on 1.8.3:

Precompiling project...
  Progress [==>                                      ]  3/70
  ◒ Parsers
  ◑ Colors
  ◐ Interpolations
  ◒ HTTP
  ✓ Glib_jll
  ◑ GeometryBasics
^Cfatal: error thrown and no exception handler available.
InterruptException()
jl_mutex_unlock at /cache/build/default-amdci5-6/julialang/julia-release-1-dot-8/src/julia_locks.h:129 [inlined]
ijl_task_get_next at /cache/build/default-amdci5-6/julialang/julia-release-1-dot-8/src/partr.c:569
poptask at ./task.jl:921
wait at ./task.jl:930
task_done_hook at ./task.jl:634
jfptr_task_done_hook_35125.clone_1 at /home/ubuntu/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/default-amdci5-6/julialang/julia-release-1-dot-8/src/gf.c:2365 [inlined]
ijl_apply_generic at /cache/build/default-amdci5-6/julialang/julia-release-1-dot-8/src/gf.c:2547
jl_apply at /cache/build/default-amdci5-6/julialang/julia-release-1-dot-8/src/julia.h:1839 [inlined]
jl_finish_task at /cache/build/default-amdci5-6/julialang/julia-release-1-dot-8/src/task.c:254
start_task at /cache/build/default-amdci5-6/julialang/julia-release-1-dot-8/src/task.c:942

ericphanson avatar Dec 14 '22 18:12 ericphanson

One of the effects of this is creating orphaned pidfiles.

Cc. @oxinabox

IanButterworth avatar Oct 27 '23 12:10 IanButterworth