-
-
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
Precompilation can't handle serialization of Task's enqued in Channels #52435
Comments
I see on
But it doesn't error on 1.9. |
@Liozou this seems like a distinct issue, it is interesting that 1.9 doesn't fail in this case. |
@gbaraldi pointed out that in 1.9 we didn't give the So adding a
|
there should be an explicit error for that:
|
We find the task through the serialization graph of queue, and we explicitly skip tasks at some point. |
Add a `nrunning` counter which identifies (when zero) when there is nothing running anymore. Allowing us to gate all tasks on all threads on reaching a quiescent state, not just thread 0. This should let us better support running precompile with threads (since we will be ensured that all of them are asleep in a consistent state before serialization tries to inspect the process state). We could additionally stop them afterwards to make sure there is no way for them to begin running, even if we forgot about some other event source, but that seems unnecessary paranoia for now. Note it is quite hard to encounter currently, as most places where precompile happens currently try to force the number of threads to 1. But this should become more relevant in the future as more threads are supported in more places. This also may help generally with being able to ensure the IO loop is running on at least one thread (as that is currently lacking in this PR and on master). And also help with being able to decide on a more advanced tree-wakeup strategy, as we start to track how many threads are in various states of running and sleeping, relative to the amount of work they find. Fixes #52435
Splitting this out into a separate issue.
From @Liozou
Then try to execute
julia -t1 --startup-file=no -e "using InteractiveUtils; versioninfo(); using PrecompileCrash"
I get:
Originally posted by @Liozou in #52363 (comment)
The text was updated successfully, but these errors were encountered: