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

Segmentation fault when using version 4.1.0 #510

Open
icemac opened this issue Oct 16, 2024 · 1 comment
Open

Segmentation fault when using version 4.1.0 #510

icemac opened this issue Oct 16, 2024 · 1 comment

Comments

@icemac
Copy link

icemac commented Oct 16, 2024

Updating from version 4.0.0 to 4.1.0 in our application leads to a segmentation fault when starting the test runner.

Python: 3.11
psycopg2: 2.9.9
zope.testrunner: 6.5

Output when running with `faulthandler` enabled

$ bin/jenkins-test-coverage Fatal Python error: Segmentation fault

Current thread 0x000079a96aa8f740 (most recent call first):
File "", line 241 in _call_with_frames_removed
File "", line 1233 in create_module
File "", line 573 in module_from_spec
File "", line 676 in _load_unlocked
File "", line 1147 in _find_and_load_unlocked
File "", line 1176 in _find_and_load
File "/home/zope/.buildout/eggs/cp311/RelStorage-4.1.0-py3.11-linux-x86_64.egg/relstorage/_compat.py", line 127 in
File "", line 241 in _call_with_frames_removed
File "", line 940 in exec_module
File "", line 690 in _load_unlocked
File "", line 1147 in _find_and_load_unlocked
File "", line 1176 in _find_and_load
File "/home/zope/.buildout/eggs/cp311/RelStorage-4.1.0-py3.11-linux-x86_64.egg/relstorage/cache/storage_cache.py", line 29 in
File "", line 241 in _call_with_frames_removed
File "", line 940 in exec_module
File "", line 690 in _load_unlocked
File "", line 1147 in _find_and_load_unlocked
File "", line 1176 in _find_and_load
File "/home/zope/.buildout/eggs/cp311/RelStorage-4.1.0-py3.11-linux-x86_64.egg/relstorage/storage/init.py", line 45 in
File "", line 241 in _call_with_frames_removed
File "", line 940 in exec_module
File "", line 690 in _load_unlocked
File "", line 1147 in _find_and_load_unlocked
File "", line 1176 in _find_and_load
File "", line 241 in _call_with_frames_removed
File "", line 1126 in _find_and_load_unlocked
File "", line 1176 in _find_and_load
File "/home/zope/.buildout/eggs/cp311/RelStorage-4.1.0-py3.11-linux-x86_64.egg/relstorage/adapters/adapter.py", line 31 in
File "", line 241 in _call_with_frames_removed
File "", line 940 in exec_module
File "", line 690 in _load_unlocked
File "", line 1147 in _find_and_load_unlocked
File "", line 1176 in _find_and_load
File "/home/zope/.buildout/eggs/cp311/RelStorage-4.1.0-py3.11-linux-x86_64.egg/relstorage/adapters/postgresql/adapter.py", line 22 in
File "", line 241 in _call_with_frames_removed
File "", line 940 in exec_module
File "", line 690 in _load_unlocked
File "", line 1147 in _find_and_load_unlocked
File "", line 1176 in _find_and_load
File "/home/zope/.buildout/eggs/cp311/RelStorage-4.1.0-py3.11-linux-x86_64.egg/relstorage/adapters/postgresql/init.py", line 18 in
File "", line 241 in _call_with_frames_removed
File "", line 940 in exec_module
File "", line 690 in _load_unlocked
File "", line 1147 in _find_and_load_unlocked
File "", line 1176 in _find_and_load
File "", line 241 in _call_with_frames_removed
File "", line 1126 in _find_and_load_unlocked
File "", line 1176 in _find_and_load
File "/home/zope/.buildout/eggs/cp311/md.startup-4.14-py3.11.egg/md/startup/relstorage_db.py", line 4 in
File "", line 241 in _call_with_frames_removed
File "", line 940 in exec_module
File "", line 690 in _load_unlocked
File "", line 1147 in _find_and_load_unlocked
File "", line 1176 in _find_and_load
File "/home/zope/.buildout/eggs/cp311/md.startup-4.14-py3.11.egg/md/startup/postgres/database.py", line 10 in
File "", line 241 in _call_with_frames_removed
File "", line 940 in exec_module
File "", line 690 in _load_unlocked
File "", line 1147 in _find_and_load_unlocked
File "", line 1176 in _find_and_load
File "", line 241 in _call_with_frames_removed
File "", line 1232 in _handle_fromlist
File "/home/zope/.buildout/eggs/cp311/md.startup-4.14-py3.11.egg/md/startup/postgres/backend.py", line 9 in
File "", line 241 in _call_with_frames_removed
File "", line 940 in exec_module
File "", line 690 in _load_unlocked
File "", line 1147 in _find_and_load_unlocked
File "", line 1176 in _find_and_load
File "/srv/jenkins/workspace/inddistrict_itk_relstorage-4.1.0/dev/md.testing/src/md/testing/init.py", line 35 in
File "", line 241 in _call_with_frames_removed
File "", line 940 in exec_module
File "", line 690 in _load_unlocked
File "", line 1147 in _find_and_load_unlocked
File "", line 1176 in _find_and_load
File "/home/zope/.buildout/eggs/cp311/analytics-7.6-py3.11.egg/analytics/testing.py", line 22 in
File "", line 241 in _call_with_frames_removed
File "", line 940 in exec_module
File "", line 690 in _load_unlocked
File "", line 1147 in _find_and_load_unlocked
File "", line 1176 in _find_and_load
File "/home/zope/.buildout/eggs/cp311/audit-2.1-py3.11.egg/audit/testing.py", line 3 in
File "", line 241 in _call_with_frames_removed
File "", line 940 in exec_module
File "", line 690 in _load_unlocked
File "", line 1147 in _find_and_load_unlocked
File "", line 1176 in _find_and_load
File "/home/zope/.buildout/eggs/cp311/audit-2.1-py3.11.egg/audit/tests/test_interfaces.py", line 1 in
File "", line 241 in _call_with_frames_removed
File "", line 940 in exec_module
File "", line 690 in _load_unlocked
File "", line 1147 in _find_and_load_unlocked
File "", line 1176 in _find_and_load
File "/home/zope/.buildout/eggs/cp311/zope.testrunner-6.5-py3.11.egg/zope/testrunner/find.py", line 425 in import_name
File "/home/zope/.buildout/eggs/cp311/zope.testrunner-6.5-py3.11.egg/zope/testrunner/find.py", line 219 in find_suites
File "/home/zope/.buildout/eggs/cp311/zope.testrunner-6.5-py3.11.egg/zope/testrunner/find.py", line 183 in find_tests
File "/home/zope/.buildout/eggs/cp311/zope.testrunner-6.5-py3.11.egg/zope/testrunner/find.py", line 507 in global_setup
File "/home/zope/.buildout/eggs/cp311/zope.testrunner-6.5-py3.11.egg/zope/testrunner/runner.py", line 180 in run
File "/home/zope/.buildout/eggs/cp311/zope.testrunner-6.5-py3.11.egg/zope/testrunner/init.py", line 55 in run_internal
File "/home/zope/.buildout/eggs/cp311/zope.testrunner-6.5-py3.11.egg/zope/testrunner/init.py", line 31 in run
File "/.../bin/jenkins-test", line 405 in
...

Extension modules: zope.interface._zope_interface_coptimizations, zope.proxy._zope_proxy_proxy, zope.i18nmessageid._zope_i18nmessageid_message, zope.security._proxy, zope.security._zope_security_checker, persistent._timestamp, persistent.cPersistence, _cffi_backend, zodbpickle._pickle, BTrees._OOBTree, BTrees._IOBTree, BTrees._IIBTree, BTrees._IFBTree, BTrees._IUBTree, BTrees._UOBTree, BTrees._UUBTree, BTrees._UFBTree, BTrees._UIBTree, BTrees._LOBTree, BTrees._LLBTree, BTrees._LFBTree, BTrees._LQBTree, BTrees._QOBTree, BTrees._QQBTree, BTrees._QFBTree, BTrees._QLBTree, BTrees._OIBTree, BTrees._OUBTree, BTrees._OLBTree, BTrees._OQBTree, BTrees._fsBTree, zope.hookable._zope_hookable, google._upb._message, zope.container._zope_container_contained, zope.index.text.okascore, simplejson._speedups, lxml._elementpath, lxml.etree, psycopg2._psycopg (total: 39)
bin/jenkins-test-coverage: line 7: 38412 Segmentation fault (core dumped) bin/coverage run bin/jenkins-test

I can provide more information if needed.

@jamadden
Copy link
Member

The line mentioned, relstorage/_compat.py", line 127 , is just from relstorage._inthashmap import .... The crash is somewhere down in the import system.

_inthashmap is a Cython module. Its code hasn't changed in 3 years.

Without a native traceback, I can't tell you more than that. All I can say is that the problem is not "here," in that there's nothing I can specifically change that can solve this.

What are the possible differences from the previous version? There are three:

  • The compiler/manylinux toolchain used
  • The version of Cython used
  • The version of boost used

My instinct is that it's something to do with the manylinux toolchain. Did you install the binary wheel from PyPI? If so, I suggest installing from source using your system's compiler.

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

No branches or pull requests

2 participants