-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
gh-141786: Fix missing parent executor during JIT trace #142344
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
base: main
Are you sure you want to change the base?
Conversation
An executor's trace can point to another executor, forming a graph of traces / executors. Sometimes it is possible while recording a trace that the parent executor is freed / invalidated halfway. This leads to the bug described in the issue pythongh-141786, which if left unfixed could cause a memory leak. This patch checks for the validity of the parent executor as well as allowing JIT from the cold executor. While the cold executor is not linked, it is the executor responsible for creating side traces and we still want to JIT from it.
|
@Fidget-Spinner who the issue is currently assigned to has helped me with this PR. |
|
@devdanzin can we use your repro as a test case please? |
|
Sure, in this case and any others, whenever you want. |
|
@caje731 please add a test case to |
|
I should note that the following simple diff in the test: produces a breakage in the test: At this point I'm unsure if this is related to JIT optimizations, but superficially seems to be just a side-effect of the symbol-conflicts (ab)used in the test. |
An executor's trace can point to another executor, forming a graph of traces / executors. Sometimes it is possible while recording a trace that the parent executor is freed / invalidated halfway. This leads to the bug described in the issue gh-141786, which if left unfixed could cause a memory leak.
This patch checks for the validity of the parent executor as well as allowing JIT from the cold executor. While the cold executor is not linked, it is the executor responsible for creating side traces and we still want to JIT from it.