-
-
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
Race condition in threads initialization. #14091
Labels
multithreading
Base.Threads and related functionality
Comments
We're using libuv for our threads, right? Do we just need a |
yuyichao
added a commit
that referenced
this issue
Nov 22, 2015
a fix is also in #12904 by the way but I don't know when this branch is intended to be merged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When working on #14083, I'm getting a intermittent initialization SegFault during bootstrap. It seems to be caused by a race condition between setting up the thread states and using it.
The
jl_all_task_states[tid]
is set up inside each threads here. It is used ininit.c
at here and here. (The first use in particular is very early and is really easy to trigger for me during compilation ofinference0.ji
)sleep
ing for 1 second ininit.c
before the use make the issue disappear andsleep
ing for 2 second before the setup in addition to that make the issue happen 100% of the time so these appears to be not synchronized.Report as an issue instead of a PR since I haven't figure out how do we do thread synchronization yet (especially at this early stage).
@vtjnash
The text was updated successfully, but these errors were encountered: