-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Make any_gc_flag threadsafe #38200
Make any_gc_flag threadsafe #38200
Conversation
The failure is unrelated. |
Also #38201 to get a better error for this case. |
Should that one be merged first, so that we can verify that it's the finalizer I suspected, or is this change worth having anyway? |
finalizers can't acquire locks, as this would block forward progress of the application:
from https://build.julialang.org/#/builders/61/builds/4993/steps/5/logs/stdio |
From which task/thread are finalizers being run? If they run on the thread that just lost the last reference to object due to be finalized, as I guessed and asked about in #38200 (comment), they must be synchronized, i.e. maybe acquire a lock. |
The failure in |
|
Most of this is included in #38405, closing this then. |
I don't know the intrinsics of Julia's garbage collection, but maybe it's the remoterefs to
chan
running out of scope on the worker processes that cause the failures:If the corresponding closures are executed on threads 1 and 2, and both issue the finalizers for (their local copy of)
chan
to run, there are to threads executingsend_del_client
and thus callingnotify(any_gc_flag)
. Is my guess correct?Ref #38134
Ref JuliaLang/Distributed.jl#73
cc @vtjnash @vchuravy