JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.62k stars 5.48k forks source link

Julia 1.11 RC 4 crashes on trying to access invalid file path #55957

Open donovaly opened 2 weeks ago

donovaly commented 2 weeks ago

This is a bug report as suggested in https://github.com/fonsp/Pluto.jl/issues/3036

When I press Ctrl+C in a REPL Julia crashes with:

fatal: error thrown and no exception handler available.
InterruptException()
_jl_mutex_unlock at C:/workdir/src\threading.c:949
jl_mutex_unlock at C:/workdir/src\julia_locks.h:80 [inlined]
ijl_task_get_next at C:/workdir/src\scheduler.c:526
poptask at .\task.jl:1012
wait at .\task.jl:1021
task_done_hook at .\task.jl:694
jfptr_task_done_hook_67126.1 at J:\Julia-1.11\lib\julia\sys.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:2157 [inlined]
jl_finish_task at C:/workdir/src\task.c:319
start_task at C:/workdir/src\task.c:1213

There is no such directory C:/workdir and it can also not be created as one would need admin permissions to do so. So also the error message is wrong.

At first, I though this crash only occurs when I set the environment variable JULIA_DEPOT_PATH. However, now at a second Win 10 PC where JULIA_DEPOT_PATH does not exists, I get exactly the same crash.

-- Julia Version 1.11.0-rc4 Commit b4b9add84d (2024-09-25 11:03 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Windows (x86_64-w64-mingw32) CPU: 12 × Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz WORD_SIZE: 64 LLVM: libLLVM-16.0.6 (ORCJIT, skylake) Threads: 1 default, 0 interactive, 1 GC (on 12 virtual cores)

fatteneder commented 2 weeks ago

Did you test if that problem is specific to 1.11-rc4? Or does it also appear with 1.11-rc3 or maybe 1.10?

tomaklutfu commented 2 weeks ago

I think this is not about missing files. C:/workdir/ is build time location for julia binaries. Because they are cached at build time into the binary, it just prints false locations in stack trace. Besides, Ctrl+C should throw an error and its the way a program stops some tasks in the middle of operation.

PallHaraldsson commented 2 weeks ago

Should there be a default exception handler for CTRL-C to print something more meaningful? I don't know how to do that or if you want to add another, to take over, I suppose it wouldn't rule that out?

donovaly commented 2 weeks ago

Did you test if that problem is specific to 1.11-rc4?

Yesterday I tested Julia 1.10.5 on another PC and get no error message when using Ctrl+C, then I uninstalled Julia 1.10.5 and installed Julia 1.11.0RC4 and got the exact same error message than on my first PC where I directly started with Julia 1.11.0RC4.

As a newbie I cannot assume if the problem is that Pluto writes that one should press Ctr+C in a REPL to end Pluto or if there is a bug in Julia 1.11.

C:/workdir/ is build time location for julia binaries. Because they are cached at build time into the binary, it just prints false locations in stack trace.

OK, but this wrong info makes it hard to understand what is going on. If possible, please output the real paths that users can investigate problems.