Skip to content
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

Don't require symbols in python 3.10+ #716

Closed
Tracked by #714
benfred opened this issue Oct 31, 2024 · 0 comments · Fixed by #718
Closed
Tracked by #714

Don't require symbols in python 3.10+ #716

benfred opened this issue Oct 31, 2024 · 0 comments · Fixed by #718

Comments

@benfred
Copy link
Owner

benfred commented Oct 31, 2024

We used to have a feature that let us profile python processes, even if there were no symbols available from python.

This meant that we didn't rely on a _PyRuntime or an interp_head symbol, and could fall back to scanning the BSS section of the python binary to find the location of the interpreter.

This functionality broke after python/cpython#4802 (found by bisecting the cpython source with a py-spy hacked up to ignore the symbols in #715 ) - meaning that we haven't had this functionality since python 3.10. The change in cpython moved the PyRuntime state from the BSS section to a named section , meaning that we are scanning the wrong sections in memory right now. Ironically this change was to make finding this global variable easier for tools like py-spy (which to be clear, I very much appreciate! there have been a bunch of changes like this and the recent debug_offsets changes that will make maintaining py-spy much easier in the future).

This is also one of the reasons that we are currently broken on windows in python 3.10+ -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant