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

module-python: do not shut down the Python library or exit handlers in Python modules can crash #4290

Closed
davidnich opened this issue Jul 16, 2021 · 0 comments

Comments

@davidnich
Copy link
Contributor

ex: h5py causes a crash when its exit handler runs after the Python library has been shut down:

#0  0x00007ffff557237f in raise () from /lib64/libc.so.6
#1  0x00007ffff555cdb5 in abort () from /lib64/libc.so.6
#2  0x00007ffff555cc89 in __assert_fail_base.cold.0 () from /lib64/libc.so.6
#3  0x00007ffff556aa76 in __assert_fail () from /lib64/libc.so.6
#4  0x00007ffff43fa613 in PyGILState_Ensure () at ../Python/pystate.c:1323
#5  0x00007fff5ea79227 in __pyx_f_4h5py_5_conv_pyref2objref () at /tmp/pip-req-build-wnfp1apj/h5py/_conv.c:6440
#6  0x00007fff5fc123b5 in H5T_top_term_package ()
   from /export/home2/dnichols/src/Qorus/current/user/python/lib/python3.8/site-packages/h5py/../h5py.libs/libhdf5-4a4ec477.so.200.0.0
#7  0x00007fff5fa016cf in H5_term_library.part.0 ()
   from /export/home2/dnichols/src/Qorus/current/user/python/lib/python3.8/site-packages/h5py/../h5py.libs/libhdf5-4a4ec477.so.200.0.0
#8  0x00007ffff5574b0c in __run_exit_handlers () from /lib64/libc.so.6
#9  0x00007ffff5574c40 in exit () from /lib64/libc.so.6
#10 0x00007ffff555e49a in __libc_start_main () from /lib64/libc.so.6
#11 0x000000000040344e in _start ()

This can cause oload to appear to fail and other cosmetic and non-cosmetic problems with Qorus and scripts

@davidnich davidnich added this to the 1.0.2 milestone Jul 16, 2021
@davidnich davidnich self-assigned this Jul 16, 2021
@davidnich davidnich added this to To do in Qore Development via automation Jul 16, 2021
davidnich added a commit to qorelanguage/module-python that referenced this issue Jul 16, 2021
…mespace allocation issues for imported Python classes in Qore

refs qorelanguage/qore#4290 do not shut down the Python library on exit, as it will cause a crash in exit handlers in Python modules that require the library to be in place (ex: h5py module v3.3.0)
davidnich added a commit to qorelanguage/module-python that referenced this issue Jul 16, 2021
…mespace allocation issues for imported Python classes in Qore

refs qorelanguage/qore#4290 do not shut down the Python library on exit, as it will cause a crash in exit handlers in Python modules that require the library to be in place (ex: h5py module v3.3.0)
davidnich added a commit to qorelanguage/module-python that referenced this issue Jul 16, 2021
…mespace allocation issues for imported Python classes in Qore

refs qorelanguage/qore#4290 do not shut down the Python library on exit, as it will cause a crash in exit handlers in Python modules that require the library to be in place (ex: h5py module v3.3.0)
davidnich added a commit to qorelanguage/module-python that referenced this issue Jul 16, 2021
…mespace allocation issues for imported Python classes in Qore (#53)

refs qorelanguage/qore#4290 do not shut down the Python library on exit, as it will cause a crash in exit handlers in Python modules that require the library to be in place (ex: h5py module v3.3.0)
Qore Development automation moved this from To do to Done Jul 16, 2021
davidnich added a commit to qorelanguage/module-python that referenced this issue Jul 21, 2021
…es with atexit() handlers making Python library API calls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant