-
-
Notifications
You must be signed in to change notification settings - Fork 922
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
Concurrency issues when preparing IR for interpretation #1793
Comments
Yeah CFG and LinearCFG are two separate passes. The race seems logical but it also makes me wonder what the best solution is? IRScope data is highly mutable for performance reasons. cloning it all would be expensive. We can sychronize where you suggest and it will probably remove the race (I don't think prepareForinterp and prepareForCompile could possibly overlap for the same method), but we could also perhaps make JIT a worker thread. If we did this then we would limit JIT'ing to a single thread but we would not need to sychronize. I am unclear if that is an issue or not but I think it might remove some more concurrency issues. |
After chatting with Tom on IM, I am wondering if this is happening because the JIT is trying to compile the same method in different threads? |
It pretty much has to be or two methods are modifying the same CFG which would be a much much worse problem :) I definitely think controlling JIT by a single worker or coordinated worker pool is the right way to go now. When we get to profiled optimizations and de-optimization this can of worms will just appear in another place if we use synchronized methods. Also this is two threads JIT'ing the same method which is an undesirable outcome. |
This has been solved for now. Closing. |
Saw this during a spec run today. Actually fired a few times in the same run. This is running with JIT enabled; it's possible the JIT's re-tweaking of the IR is conflicting here?
The text was updated successfully, but these errors were encountered: