-
-
Notifications
You must be signed in to change notification settings - Fork 275
segfault on python3.11 under coverage #977
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
Comments
That's strange. We are lately testing PyTables quite a lot with Python 3.11 and the test suite is passing flawlessly (e.g. https://github.com/PyTables/PyTables/actions/runs/3639270655). Is your example passing with 3.10? Can you tell us how did you compile PyTables locally for 3.11? |
this is with pytables compiled from conda-forge, and yes it passes with 3.10 |
I can also reproduce this by compiling the code in master on a regular python virtual environment (without conda), the problem only happens when running with coverage |
I have done some research, and I can reproduce the segfault with Python 3.11 under coverage. For what is worth, everything seems to work well under Python 3.10, and valgrind does not issue significant warnings:
Whereas for Python 3.11 and coverage:
Curiously enough, without coverage, valgrind do not finish normally with Python 3.11:
Even more interestingly, specifying python3.11 explicitly, valgrind seems happier:
And funny enough, both commands launch exactly the same interpreter:
Now, if I remove the existing /usr/bin/python and replace it by a symbolic link to python3:
So, back to normality. Now, using coverage, I am getting the issue again:
All of this seems to point to running Python3.11 through a wrapper makes the issue to appear. Provided that we cannot reproduce the issue with Python 3.10 and that 3.11 is very young, my bet is that 3.11.0 is the guilty here (unless PyTables had an issue that went unnoticed since Python 2.x). At any rate, I'd be curious to check with 3.11.1 as soon as it is available. |
FWIW, Python 3.11.1 has been actually released 2 days ago, so I gave it a try, and still the same issue:
|
Until a better solution arises, I have found a workaround by setting the
Alternatively, you can override the default of At any rate, after experimenting with different values of |
@FrancescAlted I wonder how much difference would make to use a pure python implementation of the LRU cache for the node cache. The Python standard library now has nice tools to implement it. |
No, I don't remember well. What I do remember is that, when I was implementing the LRU cache, I was kind of a performance zealot and I wanted to get all the performance from extensions. But I bet now that using regular standard library would lead to similar numbers. |
Thanks. |
repro:
The text was updated successfully, but these errors were encountered: