-
Notifications
You must be signed in to change notification settings - Fork 71
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
Fatal Python error: Bus error/Segmentation fault with 7.0.3 #323
Comments
@tseaver I don't fully understand what happened here, but I did notice:
|
Thanks a lot for the quick update, unfortunately we still run into the segmentation fault, but at least another message.
|
@tseaver no more segmentation faults. Runs without any errors. Thanks a lot for the swift response. |
@stollero Wonderful news! Thanks so much for the report, and for being willing and able to help test the PR. |
Maybe related, a development branch off the current unpatched |
I also have a problem with segfault when running the testsuite with Python 3.13.0rc2:
I've tried to apply patch from #324 but it did not help and the test failed with exactly the same error. The error I see seems to be identical to what @dataflake linked from the CI in the comment above. |
I reported the crash upstream and I'm working on a fix: python/cpython#124513 |
With my fix, the test suite fails with:
I'm not sure why the test wants to create a FrameLocalsProxy instance. |
Anyway, here is a fix to run zope.interface test suite on Python 3.13. diff --git a/src/zope/interface/common/tests/test_collections.py b/src/zope/interface/common/tests/test_collections.py
index 6d23f6f..122351a 100644
--- a/src/zope/interface/common/tests/test_collections.py
+++ b/src/zope/interface/common/tests/test_collections.py
@@ -12,6 +12,7 @@
import array
+import sys
import unittest
from collections import OrderedDict
from collections import abc
@@ -127,6 +128,12 @@ class TestVerifyObject(VerifyObjectMixin,
'async_generator': unittest.SkipTest,
type(iter(tuple())): lambda: iter(tuple()),
}
+ if sys.version_info >= (3, 13):
+ def FrameLocalsProxy_constructor():
+ FrameLocalsProxy = type([sys._getframe().f_locals for x in range(1)][0])
+ return FrameLocalsProxy(sys._getframe())
+ FrameLocalsProxy = type([sys._getframe().f_locals for x in range(1)][0])
+ CONSTRUCTORS[FrameLocalsProxy] = FrameLocalsProxy_constructor
UNVERIFIABLE_RO = {
# ``array.array`` fails the ``test_auto_ro_*`` tests with and Tell me if you want me to write a PR for that. |
Thank you @vstinner! I can confirm that it works fine with the patch. |
Closes #323. --------- Co-authored-by: Jens Vagelpohl <[email protected]> Co-authored-by: David Glick <[email protected]>
BUG/PROBLEM REPORT / FEATURE REQUEST
Hello everyone, unfortunately I was not able to create a minor example. But we get segmentation faults with our test setup. Tests using the ZeitCmsTestCase which builds on a custom
plone.testing.Layer
run into this issue. Below is hopefully a trace that will help you.What version of Python and Zope/Addons I am using:
platform linux or MacOS, Python 3.12.3, pytest-7.4.4
zodb==6.0
zodbpickle==4.0
zodburi==2.6.0
zope-annotation==5.0
zope-app-appsetup==5.0
zope-app-authentication==5.0
zope-app-basicskin==5.0
zope-app-component==5.0
zope-app-container==5.0
zope-app-content==5.0
zope-app-exception==5.0
zope-app-file==4.0.0
zope-app-folder==5.0
zope-app-form==6.0
zope-app-i18n==4.1.0
zope-app-keyreference==3.6.1
zope-app-locales==5.0
zope-app-localpermission==5.0
zope-app-locking==3.5.0+py3.1
zope-app-pagetemplate==5.0
zope-app-preference==4.1.0
zope-app-principalannotation==5.0
zope-app-publication==5.0
zope-app-publisher==5.0
zope-app-security==6.0
zope-app-tree==4.1.0
zope-app-wsgi==5.0
zope-authentication==5.0
zope-browser==3.0
zope-browsermenu==5.0
zope-browserpage==5.0
zope-browserresource==5.1
zope-cachedescriptors==5.0
zope-catalog==5.0
zope-component==6.0
zope-componentvocabulary==2.3.0
zope-configuration==5.0.1
zope-container==6.0
zope-contentprovider==6.0
zope-contenttype==5.1
zope-copy==4.3
zope-copypastemove==5.0
zope-datetime==5.0.0
zope-deferredimport==5.0
zope-deprecation==5.0
zope-dottedname==6.0
zope-dublincore==5.0
zope-error==5.0
zope-event==5.0
zope-exceptions==5.1
zope-file==1.2.0
zope-filerepresentation==6.0
zope-formlib==6.0
zope-generations==5.1.0
zope-hookable==6.0
zope-i18n==5.1
zope-i18nmessageid==6.1.0
zope-index==6.1
zope-interface==7.0.3
zope-intid==5.0
zope-keyreference==6.0
zope-lifecycleevent==5.0
zope-location==5.0
zope-login==3.0
zope-mimetype==3.1
zope-minmax==2.3
zope-pagetemplate==5.1
zope-password==4.4
zope-pluggableauth==3.0
zope-preference==5.0
zope-principalannotation==5.0
zope-principalregistry==5.0
zope-processlifetime==3.0
zope-proxy==5.3
zope-ptresource==5.0
zope-publisher==7.0
zope-schema==7.0.1
zope-security==7.1
zope-securitypolicy==5.0
zope-session==5.1
zope-site==5.0
zope-size==5.0
zope-sqlalchemy==3.1
zope-tal==5.0.1
zope-tales==6.0
zope-testing==5.0.1
zope-testrunner==6.5
zope-traversing==5.0
zope-viewlet==5.0
zope-xmlpickle==4.0.0+py3k1
What I did:
Upgrade to zope.interface from 6.4.post2 to 7.0.3
What actually happened:
Pther Python traces but runs into the same weakref error message.
The text was updated successfully, but these errors were encountered: