Fix bad precompile statements via an output lock#44252
Merged
IanButterworth merged 2 commits intoJuliaLang:masterfrom Feb 21, 2022
Merged
Fix bad precompile statements via an output lock#44252IanButterworth merged 2 commits intoJuliaLang:masterfrom
IanButterworth merged 2 commits intoJuliaLang:masterfrom
Conversation
IanButterworth
commented
Feb 19, 2022
Member
Author
IanButterworth
left a comment
There was a problem hiding this comment.
Probably worth only locking if threading is possible
Member
Author
|
@KristofferC this is fixed in base build by only using one thread during precompile statement generation, but I think this is still needed for PackageCompiler as the user may be trying to sysimage multithreaded code that can't be run single threaded. Does that sound right? |
Member
|
That seems like it could indeed happen. Fixing it here seems like a better way than just doing it for the Base precompile script. |
Member
Author
|
Ok I'll merge. This seems pretty safe and the nthreads checks mean there should be no slowdown on julia build. |
KristofferC
pushed a commit
that referenced
this pull request
Feb 23, 2022
(cherry picked from commit c5bc69c)
33 tasks
staticfloat
pushed a commit
to JuliaCI/julia-buildkite-testing
that referenced
this pull request
Mar 2, 2022
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this pull request
Mar 8, 2022
50 tasks
Member
|
This needs a manual backport against |
45 tasks
78 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It seems like multithreading might cause statements to be outputted at the same time, so a file lock is needed?
Fixes the latest reports in #28808 but shouldn't close that issue as the core issue there appears to be a different bug.