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

handle signals gracefully? #192

Open
StefanKarpinski opened this issue Apr 19, 2022 · 8 comments
Open

handle signals gracefully? #192

StefanKarpinski opened this issue Apr 19, 2022 · 8 comments

Comments

@StefanKarpinski
Copy link
Member

As reported in JuliaLang/Pkg.jl#3060, Downloads doesn't handle ctrl-C or other signals gracefully at all and tends to crash. Even if you luck out and it doesn't crash, it tends to end up in a corrupted state such that future downloads will fail. @vtjnash, any advice on how to handle signals more gracefully here?

@xgdgsc
Copy link

xgdgsc commented Nov 7, 2022

Is it fixed by the latest commit? I see crashes everyday when I forgot to activate . before add and want to cancel the add.

@StefanKarpinski
Copy link
Member Author

On Julia master, Downloads now has try/catch blocks in all callbacks, which might help, but I don't know if that fixes this issue or not. Have you tried using a nightly Julia? Let me know if it is better.

@xgdgsc
Copy link

xgdgsc commented Nov 10, 2022

Tried Version 1.9.0-DEV.1787 (2022-11-09) . Still crashes on ctrl+c.

(@v1.9) pkg> add Plots
    Updating registry at `~/.julia/registries/General.toml`
^Cfatal: error thrown and no exception handler available. ]  28.4 %%
InterruptException()
_jl_mutex_unlock at /cache/build/default-amdci4-2/julialang/julia-master/src/threading.c:796
jl_mutex_unlock at /cache/build/default-amdci4-2/julialang/julia-master/src/julia_locks.h:81 [inlined]
ijl_task_get_next at /cache/build/default-amdci4-2/julialang/julia-master/src/partr.c:385
poptask at ./task.jl:963
wait at ./task.jl:972
task_done_hook at ./task.jl:672
jfptr_task_done_hook_38006.clone_1 at /home/sgao/Documents/Apps/julia-dd62fac340/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/default-amdci4-2/julialang/julia-master/src/gf.c:2450 [inlined]
ijl_apply_generic at /cache/build/default-amdci4-2/julialang/julia-master/src/gf.c:2632
jl_apply at /cache/build/default-amdci4-2/julialang/julia-master/src/julia.h:1868 [inlined]
jl_finish_task at /cache/build/default-amdci4-2/julialang/julia-master/src/task.c:320
start_task at /cache/build/default-amdci4-2/julialang/julia-master/src/task.c:1100

@StefanKarpinski
Copy link
Member Author

@vtjnash, any idea how to handle this better?

@xgdgsc
Copy link

xgdgsc commented Nov 12, 2022

Same as JuliaLang/julia#34184 (comment) ?

@vtjnash
Copy link
Member

vtjnash commented Nov 12, 2022

In theory, this means a task recently exited and nobody cared about the result (as of yet). In practice, it seems quite common. Does this mean Julia programs are not good about "task nursery" concepts? Or just that sync is delayed? It is unclear.

@ViralBShah
Copy link
Member

ViralBShah commented Jun 3, 2023

Would be nice if this particular issue could be fixed. I was using the package manager through a slow and unrepsonsive internet connection and had to keep ctrl-c'ing and Julia kept crashing.

@jpsamaroo
Copy link
Member

This situation could presumably be greatly improved by JuliaLang/julia#49541

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants