-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Lock (codegen_lock
) during typedef to prevent concurrency violation.
#33776
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
Conversation
Oh, I probably should've tried running the tests earlier...:
|
Debugging Notes:
I've just pushed up two commits that:
|
Cool, so that does seem to have fixed (most of) the test failures. :)
Which from what i can tell is a hard timeout on the test. So it's very possible it's stuck, maybe in a deadlock. :( sigh... The other thing I learned from offline conversations yesterday that I didn't write up here yet, is that this was never supposed to work. The multithreading released in julia |
The test error was reported somewhere else so should be unrelated. |
Ah, thanks good to know. :) In that case, I think it would be really nice to get this, or something like it, merged. I know that |
As far as I can tell, this doesn't much affect parallel performance, and prevents this exception from triggering if you attempt to define new functions from multiple threads: ``` ERROR: TaskFailedException: cannot eval a new struct type definition while defining another type ```
… aliases the existing codegen_lock
30eb908
to
0830f8a
Compare
Rebased to give the tests another shot, but got the same failures. I'm not sure if my code is related. After talking more with my team about it, the feeling is that this is an important PR to merge. We recognize that 1.3 won't be able to eval or compile in parallel, but it should at least be thread-safe to attempt to do so. We just ask that julia locks around these sections rather than throwing an error. As one example of work this frustrates, this prevents us from running unrelated test files in parallel because the |
Replaced by #33553. |
As far as I can tell, this doesn't much affect parallel performance, and
prevents this exception from triggering if you attempt to define new
functions from multiple threads:
I'm opening this as a draft PR to provide an easier short-term fix for #33183, one that can be easily backported to
v1.3
(as an alternative to #33553)EDIT: Oops, dammit, I used the wrong github account again... >.<