-
Notifications
You must be signed in to change notification settings - Fork 459
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 tests fail because failed GIL interaction #1939
Comments
I would like to spend some time looking into this. I want to say that there isn't an issue and we could use PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF to disable this check. But that may not be ideal either. |
Python-3.11 is affected as well. |
It would be interesting to find out why this error isn't triggered in our CI, we test on both Python 3.11 and 3.12 when building the wheels. Maybe Python is compiled in a different way on Gentoo? Which version of Pybind11 are you using? OCIO is using a pretty old version I think at this point and newer versions are untested. |
Versions used are:
I'll update to I can write a Dockerfile if that helps you reproduce it. |
Thanks for the information @negril, we are using Pybind11 2.9.2 so it could be interesting on our side to try with 2.11.1. |
Strangely enough, after explicitly using Pybind11 2.11.1 and Python 3.12 on macOS, Debug build, I can't get any of these assertions to trigger, even after adding obviously wrong acquire / release sequences in the code. Otherwise I can't see anything obviously wrong we are doing in the Pybind11 code for the time being. Maybe a Docker image could help yeah, @meimchu did you manage to reproduce the issue on your side? |
Indeed I agree with maybe having a docker image could be helpful with debugging. |
I have used |
I did hit the same issue while working on CI updates, could you try again on the main branch? |
Tested with 2.3.0 and 2.3.1 on gentoo using python-3.11 and python-3.12.
Running
ctest -R test_python
fails with:The text was updated successfully, but these errors were encountered: