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

CUSolver finalizer tries to take ReentrantLock #1923

Closed
vchuravy opened this issue May 25, 2023 · 1 comment
Closed

CUSolver finalizer tries to take ReentrantLock #1923

vchuravy opened this issue May 25, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@vchuravy
Copy link
Member

push!(idle_dense_handles, cuda.context, new_handle) do

Maybe we could use a lock-free queue instead?

error in running finalizer: ErrorException("task switch not allowed from inside gc finalizer")
ijl_error at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/rtutils.c:41
ijl_switch at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/task.c:530
try_yieldto at ./task.jl:861
wait at ./task.jl:931
wait at ./condition.jl:124
slowlock at ./lock.jl:112
lock at ./lock.jl:103 [inlined]
lock at ./lock.jl:183
push! at /home/vchuravy/.julia/packages/CUDA/HzJ3E/lib/utils/cache.jl:55 [inlined]
#1559 at /home/vchuravy/.julia/packages/CUDA/HzJ3E/lib/cusolver/CUSOLVER.jl:63
unknown function (ip: 0x7ff3d86cfe82)
_jl_invoke at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined]
ijl_apply_generic at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/gf.c:2549
jl_apply at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/julia.h:1839 [inlined]
run_finalizer at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/gc.c:280
jl_gc_run_finalizers_in_list at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-8/src/gc.c:367

cc: @evelyne-ringoot

@maleadt
Copy link
Member

maleadt commented Apr 27, 2024

This has been fixed by the recent handlecache rework.

@maleadt maleadt closed this as completed Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants