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

Python 3.12 is leaky and python3-debug crashes on assertions #1360

Open
jiridanek opened this issue Dec 29, 2023 · 0 comments
Open

Python 3.12 is leaky and python3-debug crashes on assertions #1360

jiridanek opened this issue Dec 29, 2023 · 0 comments
Assignees
Labels
blocked Cannot resolve due to external factor (see comments) task Minor work item - not a bug or feature

Comments

@jiridanek
Copy link
Contributor

jiridanek commented Dec 29, 2023

We test skrouterd binary (which embeds Python) with Address Sanitizer. To detect leaks in the router code, it is best when Python does not leak. Sadly, in Python 3.12 there appeared quite a number of leaks

this has a quick command to visualize leaks

$ python3-debug -X showrefcount -c 'import ctypes'
[1670 refs, 1210 blocks]

In previous versions of python, setting PYTHONMALLOC="malloc_debug" used to make it stop leaking (as reported by asan).

Wanting to use python3-debug, I found that the version currently in Fedora 39 crashes due to

and I also saw this, it has been tamed somewhat now so it only prints scary messages and does not crash

and this, when changing PYTHONMALLOC to either malloc or pymalloc

@jiridanek jiridanek added the task Minor work item - not a bug or feature label Dec 29, 2023
@jiridanek jiridanek self-assigned this Dec 29, 2023
@jiridanek jiridanek added the blocked Cannot resolve due to external factor (see comments) label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Cannot resolve due to external factor (see comments) task Minor work item - not a bug or feature
Projects
None yet
Development

No branches or pull requests

1 participant