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

Fatal Python error: Bus error/Segmentation fault with 7.0.3 #323

Closed
stollero opened this issue Sep 5, 2024 · 12 comments · Fixed by #324
Closed

Fatal Python error: Bus error/Segmentation fault with 7.0.3 #323

stollero opened this issue Sep 5, 2024 · 12 comments · Fixed by #324
Assignees

Comments

@stollero
Copy link

stollero commented Sep 5, 2024

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:

Thread 1 "python3" received signal SIGSEGV, Segmentation fault.
clear_weakref (self=0xffffea6aba10) at ../Objects/weakrefobject.c:62
warning: 62     ../Objects/weakrefobject.c: No such file or directory
(gdb) bt
#0  clear_weakref (self=0xffffea6aba10) at ../Objects/weakrefobject.c:62
#1  _PyWeakref_ClearRef (self=self@entry=0xffffea6aba10) at ../Objects/weakrefobject.c:102
#2  0x00000000005b3428 [PAC] in handle_weakrefs (old=0xb2ca00 <_PyRuntime+76576>, unreachable=0xffffffffd270) at ../Modules/gcmodule.c:804
#3  gc_collect_main (tstate=tstate@entry=0xb8a278 <_PyRuntime+459672>, generation=generation@entry=1, n_collected=n_collected@entry=0xffffffffd3c0, n_uncollectable=n_uncollectable@entry=0xffffffffd3c8, nofail=nofail@entry=0) at ../Modules/gcmodule.c:1284
#4  0x00000000005b2a8c [PAC] in gc_collect_with_callback (generation=1, tstate=0xb8a278 <_PyRuntime+459672>) at ../Modules/gcmodule.c:1426
#5  gc_collect_generations (tstate=0xb8a278 <_PyRuntime+459672>) at ../Modules/gcmodule.c:1481
#6  _Py_RunGC (tstate=tstate@entry=0xb8a278 <_PyRuntime+459672>) at ../Modules/gcmodule.c:2295
#7  0x000000000058ca4c [PAC] in _Py_HandlePending (tstate=0xb8a278 <_PyRuntime+459672>) at ../Python/ceval_gil.c:1045
#8  0x000000000056c544 [PAC] in _PyEval_EvalFrameDefault (tstate=0xb8a278 <_PyRuntime+459672>, frame=0xfffff7fe96d8, throwflag=-362533328) at ../Python/ceval.c:834
#9  0x00000000004c4824 [PAC] in _PyFunction_Vectorcall (kwnames=0x0, nargsf=<optimized out>, stack=0xffffffffd628, func=<function at remote 0xfffff4eaf600>) at ../Objects/call.c:419
#10 _PyObject_FastCallDictTstate (kwargs=0x0, nargsf=<optimized out>, args=0xffffffffd628, callable=<function at remote 0xfffff4eaf600>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Objects/call.c:133
#11 _PyObject_Call_Prepend (tstate=tstate@entry=0xb8a278 <_PyRuntime+459672>, callable=callable@entry=<function at remote 0xfffff4eaf600>, 
    obj=obj@entry=<Locked(__func__=<function at remote 0xffffebdb3e20>, __self__=<MappingStorage(__name__='MappingStorage', _data={b'\x00\x00\x00\x00\x00\x00\x00\x00': <BTrees.OOBTree.OOBucket at remote 0xffffea6fe840>, b'\x03\xc25u\x8c?\xa5\xd8': <BTrees.OOBTree.OOBucket at remote 0xffffea7662c0>, b'\x03\xc25u\x8c?\xa5\xdb': <BTrees.OOBTree.OOBucket at remote 0xffffea767640>, b'\x03\xc25u\x8c?\xa5\xda': <BTrees.OOBTree.OOBucket at remote 0xffffea767e40>, b'\x03\xc25u\x8c?\xa5\xe3': <BTrees.OOBTree.OOBucket at remote 0xffffea766d40>, b'\x03\xc25u\x8c?\xa5\xe2': <BTrees.OOBTree.OOBucket at remote 0xffffea7b0040>, b'\x03\xc25u\x8c?\xa5\xe1': <BTrees.OOBTree.OOBucket at remote 0xffffea7b01c0>, b'\x03\xc25u\x8c?\xa5\xe0': <BTrees.OOBTree.OOBucket at remote 0xffffea7b09c0>, b'\x03\xc25u\x8c?\xa5\xdf': <BTrees.OOBTree.OOBucket at remote 0xffffea7b2240>, b'\x03\xc25u\x8c?\xa5\xe6': <BTrees.OOBTree.OOBucket at remote 0xffffea7b2640>, b'\x03\xc25u\x8c?\xa5\xe5': <BTrees.OOBTree.OOBucket at remote 0xffffea7b28c0>, b'\x03\xc25u\x8c?\xa5\...(truncated), 
    args=args@entry=(b'\x03\xc25u\x8c?\xa5\xe6', b'\x03\xfb\x19x\xcaP\xc5\x12'), kwargs=0x0) at ../Objects/call.c:508
#12 0x0000000000528e30 [PAC] in slot_tp_call (
    self=self@entry=<Locked(__func__=<function at remote 0xffffebdb3e20>, __self__=<MappingStorage(__name__='MappingStorage', _data={b'\x00\x00\x00\x00\x00\x00\x00\x00': <BTrees.OOBTree.OOBucket at remote 0xffffea6fe840>, b'\x03\xc25u\x8c?\xa5\xd8': <BTrees.OOBTree.OOBucket at remote 0xffffea7662c0>, b'\x03\xc25u\x8c?\xa5\xdb': <BTrees.OOBTree.OOBucket at remote 0xffffea767640>, b'\x03\xc25u\x8c?\xa5\xda': <BTrees.OOBTree.OOBucket at remote 0xffffea767e40>, b'\x03\xc25u\x8c?\xa5\xe3': <BTrees.OOBTree.OOBucket at remote 0xffffea766d40>, b'\x03\xc25u\x8c?\xa5\xe2': <BTrees.OOBTree.OOBucket at remote 0xffffea7b0040>, b'\x03\xc25u\x8c?\xa5\xe1': <BTrees.OOBTree.OOBucket at remote 0xffffea7b01c0>, b'\x03\xc25u\x8c?\xa5\xe0': <BTrees.OOBTree.OOBucket at remote 0xffffea7b09c0>, b'\x03\xc25u\x8c?\xa5\xdf': <BTrees.OOBTree.OOBucket at remote 0xffffea7b2240>, b'\x03\xc25u\x8c?\xa5\xe6': <BTrees.OOBTree.OOBucket at remote 0xffffea7b2640>, b'\x03\xc25u\x8c?\xa5\xe5': <BTrees.OOBTree.OOBucket at remote 0xffffea7b28c0>, b'\x03\xc25u\x8c?\xa5\...(truncated), 
    args=args@entry=(b'\x03\xc25u\x8c?\xa5\xe6', b'\x03\xfb\x19x\xcaP\xc5\x12'), kwds=kwds@entry=0x0) at ../Objects/typeobject.c:8770
#13 0x00000000004c2d48 [PAC] in _PyObject_MakeTpCall (tstate=0xb8a278 <_PyRuntime+459672>, 
    callable=<Locked(__func__=<function at remote 0xffffebdb3e20>, __self__=<MappingStorage(__name__='MappingStorage', _data={b'\x00\x00\x00\x00\x00\x00\x00\x00': <BTrees.OOBTree.OOBucket at remote 0xffffea6fe840>, b'\x03\xc25u\x8c?\xa5\xd8': <BTrees.OOBTree.OOBucket at remote 0xffffea7662c0>, b'\x03\xc25u\x8c?\xa5\xdb': <BTrees.OOBTree.OOBucket at remote 0xffffea767640>, b'\x03\xc25u\x8c?\xa5\xda': <BTrees.OOBTree.OOBucket at remote 0xffffea767e40>, b'\x03\xc25u\x8c?\xa5\xe3': <BTrees.OOBTree.OOBucket at remote 0xffffea766d40>, b'\x03\xc25u\x8c?\xa5\xe2': <BTrees.OOBTree.OOBucket at remote 0xffffea7b0040>, b'\x03\xc25u\x8c?\xa5\xe1': <BTrees.OOBTree.OOBucket at remote 0xffffea7b01c0>, b'\x03\xc25u\x8c?\xa5\xe0': <BTrees.OOBTree.OOBucket at remote 0xffffea7b09c0>, b'\x03\xc25u\x8c?\xa5\xdf': <BTrees.OOBTree.OOBucket at remote 0xffffea7b2240>, b'\x03\xc25u\x8c?\xa5\xe6': <BTrees.OOBTree.OOBucket at remote 0xffffea7b2640>, b'\x03\xc25u\x8c?\xa5\xe5': <BTrees.OOBTree.OOBucket at remote 0xffffea7b28c0>, b'\x03\xc25u\x8c?\xa5\...(truncated), args=0xfffff7fe9610, nargs=2, keywords=0x0)
    at ../Objects/call.c:240
#14 0x0000000000564274 [PAC] in _PyEval_EvalFrameDefault (tstate=0xb8a278 <_PyRuntime+459672>, frame=0xfffff7fe9588, throwflag=-362533328) at Python/bytecodes.c:2706
#15 0x00000000004c6e6c [PAC] in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0xffffffffd8e8, callable=<function at remote 0xfffff4b94fe0>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Include/internal/pycore_call.h:92
#16 method_vectorcall (method=<optimized out>, args=<optimized out>, nargsf=<optimized out>, kwnames=0x0) at ../Objects/classobject.c:91
#17 0x00000000004c62c0 [PAC] in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0xffffffffd9d8, callable=<method at remote 0xffffea623980>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Include/internal/pycore_call.h:92
#18 _PyObject_CallFunctionVa (is_size_t=1, va=..., format=0xfffff4f15300 "O", callable=<method at remote 0xffffea623980>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Objects/call.c:562
#19 callmethod (is_size_t=1, va=..., format=0xfffff4f15300 "O", callable=<method at remote 0xffffea623980>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Objects/call.c:634
#20 _PyObject_CallMethod_SizeT (obj=<optimized out>, name=name@entry=0xfffff4f15308 "setstate", format=format@entry=0xfffff4f15300 "O") at ../Objects/call.c:762
#21 0x0000fffff4f12dcc [PAC] in unghostify (self=self@entry=0xffffe85abc40) at src/persistent/cPersistence.c:118
#22 0x0000fffff4f14568 in unghostify (self=0xffffe85abc40) at src/persistent/cPersistence.c:99
#23 Per_getattro (self=0xffffe85abc40, name='data') at src/persistent/cPersistence.c:901
#24 0x0000000000507280 in PyObject_GetAttr (v=<PersistentMapping at remote 0xffffe85abc40>, name='data') at ../Objects/object.c:1044
#25 0x00000000005645fc [PAC] in _PyEval_EvalFrameDefault (tstate=0xb8a278 <_PyRuntime+459672>, frame=0xfffff7fe9308, throwflag=-362533328) at Python/bytecodes.c:1794
#26 0x00000000004c4680 [PAC] in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=9223372036854775809, args=0xffffffffdcc8, callable=<function at remote 0xfffff7a98fe0>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Include/internal/pycore_call.h:92
#27 PyObject_CallOneArg (func=func@entry=<function at remote 0xfffff7a98fe0>, arg=arg@entry=<PersistentMapping at remote 0xffffe85abc40>) at ../Objects/call.c:401
#28 0x0000000000528100 [PAC] in call_unbound_noarg (self=<PersistentMapping at remote 0xffffe85abc40>, func=<function at remote 0xfffff7a98fe0>, unbound=<optimized out>) at ../Objects/typeobject.c:2237
#29 slot_tp_iter (self=<PersistentMapping at remote 0xffffe85abc40>) at ../Objects/typeobject.c:8935
#30 0x00000000004b0930 [PAC] in PyObject_GetIter (o=<optimized out>) at ../Objects/abstract.c:2788
#31 0x0000000000565af4 [PAC] in _PyEval_EvalFrameDefault (tstate=0xb8a278 <_PyRuntime+459672>, frame=0xfffff7fe9290, throwflag=-362533328) at Python/bytecodes.c:2256
#32 0x00000000004c4824 [PAC] in _PyFunction_Vectorcall (kwnames=0x0, nargsf=<optimized out>, stack=0xffffffffdf08, func=<function at remote 0xfffff5b6c040>) at ../Objects/call.c:419
#33 _PyObject_FastCallDictTstate (kwargs=0x0, nargsf=<optimized out>, args=0xffffffffdf08, callable=<function at remote 0xfffff5b6c040>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Objects/call.c:133
#34 _PyObject_Call_Prepend (tstate=tstate@entry=0xb8a278 <_PyRuntime+459672>, callable=callable@entry=<function at remote 0xfffff5b6c040>, 
    obj=obj@entry=<VerifyingAdapterLookup(_registry=<_LocalAdapterRegistry(_adapters=<PersistentList at remote 0xffffe85abb60>, _subscribers=<PersistentList at remote 0xffffe85abbd0>, _provided=<PersistentMapping at remote 0xffffe85abc40>, _generation=33, __parent__=<LocalSiteManager(_SampleContainer__data=<BTrees.OOBTree.OOBTree at remote 0xffffea53e440>, _BTreeContainer__len=<Length at remote 0xffffe85ab700>, __name__='++etc++site', adapters=<_LocalAdapterRegistry(_adapters=<PersistentList at remote 0xffffe85aba10>, _subscribers=<PersistentList at remote 0xffffe85aba80>, _provided=<PersistentMapping(data={}) at remote 0xffffe85abaf0>, _generation=7, __parent__=<...>, __name__='adapters', _v_lookup=<VerifyingAdapterLookup(_registry=<...>, _required={}, _extendors={}) at remote 0xffffea0adcd0>, lookup=<built-in method lookup of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, queryMultiAdapter=<method at remote 0xffffea623100>, lookup1=<built-in method lookup1 of VerifyingAdapterLookup object at remote 0xffffea0adcd0>,...(truncated), 
    args=args@entry=(<_LocalAdapterRegistry(_adapters=<PersistentList at remote 0xffffe85abb60>, _subscribers=<PersistentList at remote 0xffffe85abbd0>, _provided=<PersistentMapping at remote 0xffffe85abc40>, _generation=33, __parent__=<LocalSiteManager(_SampleContainer__data=<BTrees.OOBTree.OOBTree at remote 0xffffea53e440>, _BTreeContainer__len=<Length at remote 0xffffe85ab700>, __name__='++etc++site', adapters=<_LocalAdapterRegistry(_adapters=<PersistentList at remote 0xffffe85aba10>, _subscribers=<PersistentList at remote 0xffffe85aba80>, _provided=<PersistentMapping(data={}) at remote 0xffffe85abaf0>, _generation=7, __parent__=<...>, __name__='adapters', _v_lookup=<VerifyingAdapterLookup(_registry=<...>, _required={}, _extendors={}) at remote 0xffffea0adcd0>, lookup=<built-in method lookup of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, queryMultiAdapter=<method at remote 0xffffea623100>, lookup1=<built-in method lookup1 of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, queryAdapter=<built-in method qu...(truncated), kwargs=0x0) at ../Objects/call.c:508
#35 0x0000000000522790 [PAC] in slot_tp_init (
    self=<VerifyingAdapterLookup(_registry=<_LocalAdapterRegistry(_adapters=<PersistentList at remote 0xffffe85abb60>, _subscribers=<PersistentList at remote 0xffffe85abbd0>, _provided=<PersistentMapping at remote 0xffffe85abc40>, _generation=33, __parent__=<LocalSiteManager(_SampleContainer__data=<BTrees.OOBTree.OOBTree at remote 0xffffea53e440>, _BTreeContainer__len=<Length at remote 0xffffe85ab700>, __name__='++etc++site', adapters=<_LocalAdapterRegistry(_adapters=<PersistentList at remote 0xffffe85aba10>, _subscribers=<PersistentList at remote 0xffffe85aba80>, _provided=<PersistentMapping(data={}) at remote 0xffffe85abaf0>, _generation=7, __parent__=<...>, __name__='adapters', _v_lookup=<VerifyingAdapterLookup(_registry=<...>, _required={}, _extendors={}) at remote 0xffffea0adcd0>, lookup=<built-in method lookup of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, queryMultiAdapter=<method at remote 0xffffea623100>, lookup1=<built-in method lookup1 of VerifyingAdapterLookup object at remote 0xffffea0adcd0>,...(truncated), 
    args=(<_LocalAdapterRegistry(_adapters=<PersistentList at remote 0xffffe85abb60>, _subscribers=<PersistentList at remote 0xffffe85abbd0>, _provided=<PersistentMapping at remote 0xffffe85abc40>, _generation=33, __parent__=<LocalSiteManager(_SampleContainer__data=<BTrees.OOBTree.OOBTree at remote 0xffffea53e440>, _BTreeContainer__len=<Length at remote 0xffffe85ab700>, __name__='++etc++site', adapters=<_LocalAdapterRegistry(_adapters=<PersistentList at remote 0xffffe85aba10>, _subscribers=<PersistentList at remote 0xffffe85aba80>, _provided=<PersistentMapping(data={}) at remote 0xffffe85abaf0>, _generation=7, __parent__=<...>, __name__='adapters', _v_lookup=<VerifyingAdapterLookup(_registry=<...>, _required={}, _extendors={}) at remote 0xffffea0adcd0>, lookup=<built-in method lookup of VerifyingAdapterLookup object at remote--Type <RET> for more, q to quit, c to continue without paging--
 0xffffea0adcd0>, queryMultiAdapter=<method at remote 0xffffea623100>, lookup1=<built-in method lookup1 of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, queryAdapter=<built-in method qu...(truncated), kwds=<optimized out>) at ../Objects/typeobject.c:9014
#36 0x000000000051de54 [PAC] in type_call (type=<optimized out>, type@entry=0x14d1ae0, 
    args=args@entry=(<_LocalAdapterRegistry(_adapters=<PersistentList at remote 0xffffe85abb60>, _subscribers=<PersistentList at remote 0xffffe85abbd0>, _provided=<PersistentMapping at remote 0xffffe85abc40>, _generation=33, __parent__=<LocalSiteManager(_SampleContainer__data=<BTrees.OOBTree.OOBTree at remote 0xffffea53e440>, _BTreeContainer__len=<Length at remote 0xffffe85ab700>, __name__='++etc++site', adapters=<_LocalAdapterRegistry(_adapters=<PersistentList at remote 0xffffe85aba10>, _subscribers=<PersistentList at remote 0xffffe85aba80>, _provided=<PersistentMapping(data={}) at remote 0xffffe85abaf0>, _generation=7, __parent__=<...>, __name__='adapters', _v_lookup=<VerifyingAdapterLookup(_registry=<...>, _required={}, _extendors={}) at remote 0xffffea0adcd0>, lookup=<built-in method lookup of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, queryMultiAdapter=<method at remote 0xffffea623100>, lookup1=<built-in method lookup1 of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, queryAdapter=<built-in method qu...(truncated), kwds=kwds@entry=0x0) at ../Objects/typeobject.c:1673
#37 0x00000000004c2d48 [PAC] in _PyObject_MakeTpCall (tstate=0xb8a278 <_PyRuntime+459672>, callable=<type at remote 0x14d1ae0>, args=0xfffff7fe9200, nargs=1, keywords=0x0) at ../Objects/call.c:240
#38 0x0000000000564274 [PAC] in _PyEval_EvalFrameDefault (tstate=0xb8a278 <_PyRuntime+459672>, frame=0xfffff7fe9198, throwflag=-362533328) at Python/bytecodes.c:2706
#39 0x00000000004c6e6c [PAC] in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0xffffffffe208, callable=<function at remote 0xfffff4b94fe0>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Include/internal/pycore_call.h:92
#40 method_vectorcall (method=<optimized out>, args=<optimized out>, nargsf=<optimized out>, kwnames=0x0) at ../Objects/classobject.c:91
#41 0x00000000004c62c0 [PAC] in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0xffffffffe2f8, callable=<method at remote 0xffffea623840>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Include/internal/pycore_call.h:92
#42 _PyObject_CallFunctionVa (is_size_t=1, va=..., format=0xfffff4f15300 "O", callable=<method at remote 0xffffea623840>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Objects/call.c:562
#43 callmethod (is_size_t=1, va=..., format=0xfffff4f15300 "O", callable=<method at remote 0xffffea623840>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Objects/call.c:634
#44 _PyObject_CallMethod_SizeT (obj=<optimized out>, name=name@entry=0xfffff4f15308 "setstate", format=format@entry=0xfffff4f15300 "O") at ../Objects/call.c:762
#45 0x0000fffff4f12dcc [PAC] in unghostify (self=self@entry=0xffffe85ab7e0) at src/persistent/cPersistence.c:118
#46 0x0000fffff4f143e8 in unghostify (self=0xffffe85ab7e0) at src/persistent/cPersistence.c:99
#47 Per_setattro (self=0xffffe85ab7e0, name='__bases__', 
    v=(<GlobalAdapterRegistry(__parent__=<BaseGlobalComponents(__name__='test-stack-2', adapters=<GlobalAdapterRegistry(__parent__=<...>, __name__='adapters', _v_subregistries=<WeakKeyDictionary(data={}, _remove=<function at remote 0xffffea554900>, _pending_removals=[], _iterating=set(), _dirty_len=False) at remote 0xffffe8441460>, _adapters=[], _subscribers=[], _provided={}, _v_lookup=<AdapterLookup(_registry=<...>, _required={<weakref.ReferenceType at remote 0xffffea6012b0>: 1}, _extendors={}) at remote 0xffffea4ff5c0>, lookup=<built-in method lookup of AdapterLookup object at remote 0xffffea4ff5c0>, queryMultiAdapter=<method at remote 0xffffea732a40>, lookup1=<built-in method lookup1 of AdapterLookup object at remote 0xffffea4ff5c0>, queryAdapter=<built-in method queryAdapter of AdapterLookup object at remote 0xffffea4ff5c0>, adapter_hook=<built-in method adapter_hook of AdapterLookup object at remote 0xffffea4ff5c0>, lookupAll=<built-in method lookupAll of AdapterLookup object at remote 0xffffea4ff5c0>, names=<...(truncated)) at src/persistent/cPersistence.c:962
#48 0x0000000000506818 in PyObject_SetAttr (
    v=<_LocalAdapterRegistry(_adapters=<PersistentList at remote 0xffffe85abb60>, _subscribers=<PersistentList at remote 0xffffe85abbd0>, _provided=<PersistentMapping at remote 0xffffe85abc40>, _generation=33, __parent__=<LocalSiteManager(_SampleContainer__data=<BTrees.OOBTree.OOBTree at remote 0xffffea53e440>, _BTreeContainer__len=<Length at remote 0xffffe85ab700>, __name__='++etc++site', adapters=<_LocalAdapterRegistry(_adapters=<PersistentList at remote 0xffffe85aba10>, _subscribers=<PersistentList at remote 0xffffe85aba80>, _provided=<PersistentMapping(data={}) at remote 0xffffe85abaf0>, _generation=7, __parent__=<...>, __name__='adapters', _v_lookup=<VerifyingAdapterLookup(_registry=<...>, _required={}, _extendors={}) at remote 0xffffea0adcd0>, lookup=<built-in method lookup of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, queryMultiAdapter=<method at remote 0xffffea623100>, lookup1=<built-in method lookup1 of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, queryAdapter=<built-in method que...(truncated), name=<optimized out>, 
    value=(<GlobalAdapterRegistry(__parent__=<BaseGlobalComponents(__name__='test-stack-2', adapters=<GlobalAdapterRegistry(__parent__=<...>, __name__='adapters', _v_subregistries=<WeakKeyDictionary(data={}, _remove=<function at remote 0xffffea554900>, _pending_removals=[], _iterating=set(), _dirty_len=False) at remote 0xffffe8441460>, _adapters=[], _subscribers=[], _provided={}, _v_lookup=<AdapterLookup(_registry=<...>, _required={<weakref.ReferenceType at remote 0xffffea6012b0>: 1}, _extendors={}) at remote 0xffffea4ff5c0>, lookup=<built-in method lookup of AdapterLookup object at remote 0xffffea4ff5c0>, queryMultiAdapter=<method at remote 0xffffea732a40>, lookup1=<built-in method lookup1 of AdapterLookup object at remote 0xffffea4ff5c0>, queryAdapter=<built-in method queryAdapter of AdapterLookup object at remote 0xffffea4ff5c0>, adapter_hook=<built-in method adapter_hook of AdapterLookup object at remote 0xffffea4ff5c0>, lookupAll=<built-in method lookupAll of AdapterLookup object at remote 0xffffea4ff5c0>, names=<...(truncated)) at ../Objects/object.c:1175
#49 0x000000000056692c [PAC] in _PyEval_EvalFrameDefault (tstate=0xb8a278 <_PyRuntime+459672>, frame=0xfffff7fe8f48, throwflag=-362533328) at Python/bytecodes.c:1135
#50 0x00000000004c38fc [PAC] in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=2, args=0xffffffffe600, callable=<function at remote 0xfffff5b6e660>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Include/internal/pycore_call.h:92
#51 PyObject_Vectorcall (callable=<function at remote 0xfffff5b6e660>, args=args@entry=0xffffffffe630, nargsf=nargsf@entry=2, kwnames=kwnames@entry=0x0) at ../Objects/call.c:325
#52 0x000000000060feb0 [PAC] in property_descr_set (self=<property at remote 0xfffff5b88270>, obj=<optimized out>, 
    value=(<BaseGlobalComponents(__name__='test-stack-2', adapters=<GlobalAdapterRegistry(__parent__=<...>, __name__='adapters', _v_subregistries=<WeakKeyDictionary(data={}, _remove=<function at remote 0xffffea554900>, _pending_removals=[], _iterating=set(), _dirty_len=False) at remote 0xffffe8441460>, _adapters=[], _subscribers=[], _provided={}, _v_lookup=<AdapterLookup(_registry=<...>, _required={<weakref.ReferenceType at remote 0xffffea6012b0>: 1}, _extendors={}) at remote 0xffffea4ff5c0>, lookup=<built-in method lookup of AdapterLookup object at remote 0xffffea4ff5c0>, queryMultiAdapter=<method at remote 0xffffea732a40>, lookup1=<built-in method lookup1 of AdapterLookup object at remote 0xffffea4ff5c0>, queryAdapter=<built-in method queryAdapter of AdapterLookup object at remote 0xffffea4ff5c0>, adapter_hook=<built-in method adapter_hook of AdapterLookup object at remote 0xffffea4ff5c0>, lookupAll=<built-in method lookupAll of AdapterLookup object at remote 0xffffea4ff5c0>, names=<method at remote 0xffffea730c00>, ...(truncated)) at ../Objects/descrobject.c:1678
#53 0x0000000000506b78 [PAC] in _PyObject_GenericSetAttrWithDict (dict=0x0, 
    value=(<BaseGlobalComponents(__name__='test-stack-2', adapters=<GlobalAdapterRegistry(__parent__=<...>, __name__='adapters', _v_subregistries=<WeakKeyDictionary(data={}, _remove=<function at remote 0xffffea554900>, _pending_removals=[], _iterating=set(), _dirty_len=False) at remote 0xffffe8441460>, _adapters=[], _subscribers=[], _provided={}, _v_lookup=<AdapterLookup(_registry=<...>, _required={<weakref.ReferenceType at remote 0xffffea6012b0>: 1}, _extendors={}) at remote 0xffffea4ff5c0>, lookup=<built-in method lookup of AdapterLookup object at remote 0xffffea4ff5c0>, queryMultiAdapter=<method at remote 0xffffea732a40>, lookup1=<built-in method lookup1 of AdapterLookup object at remote 0xffffea4ff5c0>, queryAdapter=<built-in method queryAdapter of AdapterLookup object at remote 0xffffea4ff5c0>, adapter_hook=<built-in method adapter_hook of AdapterLookup object at remote 0xffffea4ff5c0>, lookupAll=<built-in method lookupAll of AdapterLookup object at remote 0xffffea4ff5c0>, names=<method at remote 0xffffea730c00>, ...(truncated), name='__bases__', 
    obj=<LocalSiteManager(_SampleContainer__data=<BTrees.OOBTree.OOBTree at remote 0xffffea53e440>, _BTreeContainer__len=<Length at remote 0xffffe85ab700>, __name__='++etc++site', adapters=<_LocalAdapterRegistry(_adapters=<PersistentList at remote 0xffffe85aba10>, _subscribers=
PersistentList at remote 0xffffe85aba80>, _provided=<PersistentMapping(data={}) at remote 0xffffe85abaf0>, _generation=7, __parent__=<...>, __name__='adapters', _v_lookup=<VerifyingAdapterLookup(_registry=<...>, _required={}, _extendors={}) at remote 0xffffea0adcd0>, lookup=<built-in method lookup of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, queryMultiAdapter=<method at remote 0xffffea623100>, lookup1=<built-in method lookup1 of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, queryAdapter=<built-in method queryAdapter of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, adapter_hook=<built-in method adapter_hook of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, lookupAll=<built-in method lookupAll of Ve...(truncated)) at ../Objects/object.c:1552
#54 PyObject_GenericSetAttr (
    obj=obj@entry=<LocalSiteManager(_SampleContainer__data=<BTrees.OOBTree.OOBTree at remote 0xffffea53e440>, _BTreeContainer__len=<Length at remote 0xffffe85ab700>, __name__='++etc++site', adapters=<_LocalAdapterRegistry(_adapters=<PersistentList at remote 0xffffe85aba10>, _subscribers=<PersistentList at remote 0xffffe85aba80>, _provided=<PersistentMapping(data={}) at remote 0xffffe85abaf0>, _generation=7, __parent__=<...>, __name__='adapters', _v_lookup=<VerifyingAdapterLookup(_registry=<...>, _required={}, _extendors={}) at remote 0xffffea0adcd0>, lookup=<built-in method lookup of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, queryMultiAdapter=<method at remote 0xffffea623100>, lookup1=<built-in method lookup1 of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, queryAdapter=<built-in method queryAdapter of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, adapter_hook=<built-in method adapter_hook of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, lookupAll=<built-in method lookupAll of Ve...(truncated), name=name@entry='__bases__', 
    value=value@entry=(<BaseGlobalComponents(__name__='test-stack-2', adapters=<GlobalAdapterRegistry(__parent__=<...>, __name__='adapters', _v_subregistries=<WeakKeyDictionary(data={}, _remove=<function at remote 0xffffea554900>, _pending_removals=[], _iterating=set(), _dirty_len=False) at remote 0xffffe8441460>, _adapters=[], _subscribers=[], _provided={}, _v_lookup=<AdapterLookup(_registry=<...>, _required={<weakref.ReferenceType at remote 0xffffea6012b0>: 1}, _extendors={}) at remote 0xffffea4ff5c0>, lookup=<built-in method lookup of AdapterLookup object at remote 0xffffea4ff5c0>, queryMultiAdapter=<method at remote 0xffffea732a40>, lookup1=<built-in method lookup1 of AdapterLookup object at remote 0xffffea4ff5c0>, queryAdapter=<built-in method queryAdapter of AdapterLookup object at remote 0xffffea4ff5c0>, adapter_hook=<built-in method adapter_hook of AdapterLookup object at remote 0xffffea4ff5c0>, lookupAll=<built-in method lookupAll of AdapterLookup object at remote 0xffffea4ff5c0>, names=<method at remote 0xffffea730c00>, ...(truncated)) at ../Objects/object.c:1619
#55 0x0000fffff4f1433c [PAC] in Per_setattro (self=0xffffe85ab690, name='__bases__', 
    v=(<BaseGlobalComponents(__name__='test-stack-2', adapters=<GlobalAdapterRegistry(__parent__=<...>, __name__='adapters', _v_subregistries=<WeakKeyDictionary(data={}, _remove=<function at remote 0xffffea554900>, _pending_removals=[], _iterating=set(), _dirty_len=False) at remote 0xffffe8441460>, _adapters=[], _subscribers=[], _provided={}, _v_lookup=<AdapterLookup(_registry=<...>, _required={<weakref.ReferenceType at remote 0xffffea6012b0>: 1}, _extendors={}) at remote 0xffffea4ff5c0>, lookup=<built-in method lookup of AdapterLookup object at remote 0xffffea4ff5c0>, queryMultiAdapter=<method at remote 0xffffea732a40>, lookup1=<built-in method lookup1 of AdapterLookup object at remote 0xffffea4ff5c0>, queryAdapter=<built-in method queryAdapter of AdapterLookup object at remote 0xffffea4ff5c0>, adapter_hook=<built-in method adapter_hook of AdapterLookup object at remote 0xffffea4ff5c0>, lookupAll=<built-in method lookupAll of AdapterLookup object at remote 0xffffea4ff5c0>, names=<method at remote 0xffffea730c00>, ...(truncated)) at src/persistent/cPersistence.c:972
#56 0x0000000000506818 in PyObject_SetAttr (
    v=<LocalSiteManager(_SampleContainer__data=<BTrees.OOBTree.OOBTree at remote 0xffffea53e440>, _BTreeContainer__len=<Length at remote 0xffffe85ab700>, __name__='++etc++site', adapters=<_LocalAdapterRegistry(_adapters=<PersistentList at remote 0xffffe85aba10>, _subscribers=<PersistentList at remote 0xffffe85aba80>, _provided=<PersistentMapping(data={}) at remote 0xffffe85abaf0>, _generation=7, __parent__=<...>, __name__='adapters', _v_lookup=<VerifyingAdapterLookup(_registry=<...>, _required={}, _extendors={}) at remote 0xffffea0adcd0>, lookup=<built-in method lookup of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, queryMultiAdapter=<method at remote 0xffffea623100>, lookup1=<built-in method lookup1 of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, queryAdapter=<built-in method queryAdapter of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, adapter_hook=<built-in method adapter_hook of VerifyingAdapterLookup object at remote 0xffffea0adcd0>, lookupAll=<built-in method lookupAll of Ve...(truncated), name=<optimized out>, 
    value=(<BaseGlobalComponents(__name__='test-stack-2', adapters=<GlobalAdapterRegistry(__parent__=<...>, __name__='adapters', _v_subregistries=<WeakKeyDictionary(data={}, _remove=<function at remote 0xffffea554900>, _pending_removals=[], _iterating=set(), _dirty_len=False) at remote 0xffffe8441460>, _adapters=[], _subscribers=[], _provided={}, _v_lookup=<AdapterLookup(_registry=<...>, _required={<weakref.ReferenceType at remote 0xffffea6012b0>: 1}, _extendors={}) at remote 0xffffea4ff5c0>, lookup=<built-in method lookup of AdapterLookup object at remote 0xffffea4ff5c0>, queryMultiAdapter=<method at remote 0xffffea732a40>, lookup1=<built-in method lookup1 of AdapterLookup object at remote 0xffffea4ff5c0>, queryAdapter=<built-in method queryAdapter of AdapterLookup object at remote 0xffffea4ff5c0>, adapter_hook=<built-in method adapter_hook of AdapterLookup object at remote 0xffffea4ff5c0>, lookupAll=<built-in method lookupAll of AdapterLookup object at remote 0xffffea4ff5c0>, names=<method at remote 0xffffea730c00>, ...(truncated)) at ../Objects/object.c:1175
#57 0x000000000056692c [PAC] in _PyEval_EvalFrameDefault (tstate=0xb8a278 <_PyRuntime+459672>, frame=0xfffff7fe8dd8, throwflag=-362533328) at Python/bytecodes.c:1135
#58 0x00000000004c4914 [PAC] in _PyFunction_Vectorcall (kwnames=('fixturedef', 'request'), nargsf=9223372036854775809, stack=0xffffedec32f8, func=<function at remote 0xfffff76e5940>) at ../Objects/call.c:419
#59 _PyObject_FastCallDictTstate (kwargs=<optimized out>, nargsf=<optimized out>, args=0xffffffffe8f8, callable=<function at remote 0xfffff76e5940>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Objects/call.c:144
#60 _PyObject_Call_Prepend (tstate=tstate@entry=0xb8a278 <_PyRuntime+459672>, callable=callable@entry=<function at remote 0xfffff76e5940>, obj=obj@entry=<HookCaller at remote 0xfffff70ea1b0>, args=args@entry=(), kwargs=<optimized out>) at ../Objects/call.c:508
#61 0x0000000000528e30 [PAC] in slot_tp_call (self=<HookCaller at remote 0xfffff70ea1b0>, args=(), kwds=<optimized out>) at ../Objects/typeobject.c:8770
#62 0x00000000004c2e00 [PAC] in _PyObject_MakeTpCall (tstate=0xb8a278 <_PyRuntime+459672>, callable=<HookCaller at remote 0xfffff70ea1b0>, args=<optimized out>, nargs=0, keywords=<optimized out>) at ../Objects/call.c:240
#63 0x0000000000564274 [PAC] in _PyEval_EvalFrameDefault (tstate=0xb8a278 <_PyRuntime+459672>, frame=0xfffff7fe8780, throwflag=-362533328) at Python/bytecodes.c:2706
#64 0x00000000004c4914 [PAC] in _PyFunction_Vectorcall (kwnames=('item',), nargsf=9223372036854775809, stack=0xfffff6fbd118, func=<function at remote 0xfffff76e5940>) at ../Objects/call.c:419
#65 _PyObject_FastCallDictTstate (kwargs=<optimized out>, nargsf=<optimized out>, args=0xffffffffebd8, callable=<function at remote 0xfffff76e5940>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Objects/call.c:144
#66 _PyObject_Call_Prepend (tstate=tstate@entry=0xb8a278 <_PyRuntime+459672>, callable=callable@entry=<function at remote 0xfffff76e5940>, obj=obj@entry=<HookCaller at remote 0xfffff70ea980>, args=args@entry=(), kwargs=<optimized out>) at ../Objects/call.c:508
#67 0x0000000000528e30 [PAC] in slot_tp_call (self=<HookCaller at remote 0xfffff70ea980>, args=(), kwds=<optimized out>) at ../Objects/typeobject.c:8770
#68 0x00000000004c5264 [PAC] in PyObject_Call () at ../Objects/call.c:376
#69 0x0000000000567878 [PAC] in _PyEval_EvalFrameDefault (tstate=0xb8a278 <_PyRuntime+459672>, frame=0xfffff7fe8058, throwflag=-362533328) at Python/bytecodes.c:3254
#70 0x00000000004c4914 [PAC] in _PyFunction_Vectorcall (kwnames=('item', 'nextitem'), nargsf=9223372036854775809, stack=0xfffff6fbf078, func=<function at remote 0xfffff76e5940>) at ../Objects/call.c:419
#71 _PyObject_FastCallDictTstate (kwargs=<optimized out>, nargsf=<optimized out>, args=0xffffffffeed8, callable=<function at remote 0xfffff76e5940>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Objects/call.c:144
#72 _PyObject_Call_Prepend (tstate=tstate@entry=0xb8a278 <_PyRuntime+459672>, callable=callable@entry=<function at remote 0xfffff76e5940>, obj=obj@entry=<HookCaller at remote 0xfffff70ea930>, args=args@entry=(), kwargs=<optimized out>) at ../Objects/call.c:508
#73 0x0000000000528e30 [PAC] in slot_tp_call (self=<HookCaller at remote 0xfffff70ea930>, args=(), kwds=<optimized out>) at ../Objects/typeobject.c:8770
#74 0x00000000004c2e00 [PAC] in _PyObject_MakeTpCall (tstate=0xb8a278 <_PyRuntime+459672>, callable=<HookCaller at remote 0xfffff70ea930>, args=<optimized out>, nargs=0, keywords=<optimized out>) at ../Objects/call.c:240
--Type <RET> for more, q to quit, c to continue without paging--
#75 0x0000000000564274 [PAC] in _PyEval_EvalFrameDefault (tstate=0xb8a278 <_PyRuntime+459672>, frame=0xfffff7fe79f8, throwflag=-362533328) at Python/bytecodes.c:2706
#76 0x00000000004c4914 [PAC] in _PyFunction_Vectorcall (kwnames=('session',), nargsf=9223372036854775809, stack=0xfffff6fbd138, func=<function at remote 0xfffff76e5940>) at ../Objects/call.c:419
#77 _PyObject_FastCallDictTstate (kwargs=<optimized out>, nargsf=<optimized out>, args=0xfffffffff1b8, callable=<function at remote 0xfffff76e5940>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Objects/call.c:144
#78 _PyObject_Call_Prepend (tstate=tstate@entry=0xb8a278 <_PyRuntime+459672>, callable=callable@entry=<function at remote 0xfffff76e5940>, obj=obj@entry=<HookCaller at remote 0xfffff70eaa20>, args=args@entry=(), kwargs=<optimized out>) at ../Objects/call.c:508
#79 0x0000000000528e30 [PAC] in slot_tp_call (self=<HookCaller at remote 0xfffff70eaa20>, args=(), kwds=<optimized out>) at ../Objects/typeobject.c:8770
#80 0x00000000004c2e00 [PAC] in _PyObject_MakeTpCall (tstate=0xb8a278 <_PyRuntime+459672>, callable=<HookCaller at remote 0xfffff70eaa20>, args=<optimized out>, nargs=0, keywords=<optimized out>) at ../Objects/call.c:240
#81 0x0000000000564274 [PAC] in _PyEval_EvalFrameDefault (tstate=0xb8a278 <_PyRuntime+459672>, frame=0xfffff7fe7720, throwflag=-362533328) at Python/bytecodes.c:2706
#82 0x00000000004c4914 [PAC] in _PyFunction_Vectorcall (kwnames=('config',), nargsf=9223372036854775809, stack=0xfffff707f2d8, func=<function at remote 0xfffff76e5940>) at ../Objects/call.c:419
#83 _PyObject_FastCallDictTstate (kwargs=<optimized out>, nargsf=<optimized out>, args=0xfffffffff498, callable=<function at remote 0xfffff76e5940>, tstate=0xb8a278 <_PyRuntime+459672>) at ../Objects/call.c:144
#84 _PyObject_Call_Prepend (tstate=tstate@entry=0xb8a278 <_PyRuntime+459672>, callable=callable@entry=<function at remote 0xfffff76e5940>, obj=obj@entry=<HookCaller at remote 0xfffff70e9cb0>, args=args@entry=(), kwargs=<optimized out>) at ../Objects/call.c:508
#85 0x0000000000528e30 [PAC] in slot_tp_call (self=<HookCaller at remote 0xfffff70e9cb0>, args=(), kwds=<optimized out>) at ../Objects/typeobject.c:8770
#86 0x00000000004c2e00 [PAC] in _PyObject_MakeTpCall (tstate=0xb8a278 <_PyRuntime+459672>, callable=<HookCaller at remote 0xfffff70e9cb0>, args=<optimized out>, nargs=0, keywords=<optimized out>) at ../Objects/call.c:240
#87 0x0000000000564274 [PAC] in _PyEval_EvalFrameDefault (tstate=0xb8a278 <_PyRuntime+459672>, frame=0xfffff7fe72a8, throwflag=-362533328, throwflag@entry=0) at Python/bytecodes.c:2706
#88 0x00000000005625c4 [PAC] in _PyEval_EvalFrame (throwflag=0, frame=0xfffff7fe71b8, tstate=0xb8a278 <_PyRuntime+459672>) at ../Include/internal/pycore_ceval.h:89
#89 _PyEval_Vector (kwnames=0x0, argcount=0, args=0x0, 
    locals={'__name__': '__main__', '__doc__': 'The pytest entry point.', '__package__': 'pytest', '__loader__': <SourceFileLoader(name='pytest.__main__', path='/usr/local/lib/python3.12/dist-packages/pytest/__main__.py') at remote 0xfffff7094980>, '__spec__': <ModuleSpec(name='pytest.__main__', loader=<...>, origin='/usr/local/lib/python3.12/dist-packages/pytest/__main__.py', loader_state=None, submodule_search_locations=None, _uninitialized_submodules=[], _set_fileattr=True, _cached='/usr/local/lib/python3.12/dist-packages/pytest/__pycache__/__main__.cpython-312.pyc') at remote 0xfffff70cd910>, '__annotations__': {}, '__builtins__': <module at remote 0xfffff7bfd940>, '__file__': '/usr/local/lib/python3.12/dist-packages/pytest/__main__.py', '__cached__': '/usr/local/lib/python3.12/dist-packages/pytest/__pycache__/__main__.cpython-312.pyc', 'pytest': <module at remote 0xfffff7a2dee0>}, func=0xfffff7c42160, tstate=0xb8a278 <_PyRuntime+459672>) at ../Python/ceval.c:1683
#90 PyEval_EvalCode (co=co@entry=<code at remote 0xfffff726bdd0>, 
    globals=globals@entry={'__name__': '__main__', '__doc__': 'The pytest entry point.', '__package__': 'pytest', '__loader__': <SourceFileLoader(name='pytest.__main__', path='/usr/local/lib/python3.12/dist-packages/pytest/__main__.py') at remote 0xfffff7094980>, '__spec__': <ModuleSpec(name='pytest.__main__', loader=<...>, origin='/usr/local/lib/python3.12/dist-packages/pytest/__main__.py', loader_state=None, submodule_search_locations=None, _uninitialized_submodules=[], _set_fileattr=True, _cached='/usr/local/lib/python3.12/dist-packages/pytest/__pyc--Type <RET> for more, q to quit, c to continue without paging--
ache__/__main__.cpython-312.pyc') at remote 0xfffff70cd910>, '__annotations__': {}, '__builtins__': <module at remote 0xfffff7bfd940>, '__file__': '/usr/local/lib/python3.12/dist-packages/pytest/__main__.py', '__cached__': '/usr/local/lib/python3.12/dist-packages/pytest/__pycache__/__main__.cpython-312.pyc', 'pytest': <module at remote 0xfffff7a2dee0>}, 
    locals=locals@entry={'__name__': '__main__', '__doc__': 'The pytest entry point.', '__package__': 'pytest', '__loader__': <SourceFileLoader(name='pytest.__main__', path='/usr/local/lib/python3.12/dist-packages/pytest/__main__.py') at remote 0xfffff7094980>, '__spec__': <ModuleSpec(name='pytest.__main__', loader=<...>, origin='/usr/local/lib/python3.12/dist-packages/pytest/__main__.py', loader_state=None, submodule_search_locations=None, _uninitialized_submodules=[], _set_fileattr=True, _cached='/usr/local/lib/python3.12/dist-packages/pytest/__pycache__/__main__.cpython-312.pyc') at remote 0xfffff70cd910>, '__annotations__': {}, '__builtins__': <module at remote 0xfffff7bfd940>, '__file__': '/usr/local/lib/python3.12/dist-packages/pytest/__main__.py', '__cached__': '/usr/local/lib/python3.12/dist-packages/pytest/__pycache__/__main__.cpython-312.pyc', 'pytest': <module at remote 0xfffff7a2dee0>}) at ../Python/ceval.c:578
#91 0x000000000055f478 [PAC] in builtin_exec_impl (module=<optimized out>, closure=<optimized out>, 
    locals={'__name__': '__main__', '__doc__': 'The pytest entry point.', '__package__': 'pytest', '__loader__': <SourceFileLoader(name='pytest.__main__', path='/usr/local/lib/python3.12/dist-packages/pytest/__main__.py') at remote 0xfffff7094980>, '__spec__': <ModuleSpec(name='pytest.__main__', loader=<...>, origin='/usr/local/lib/python3.12/dist-packages/pytest/__main__.py', loader_state=None, submodule_search_locations=None, _uninitialized_submodules=[], _set_fileattr=True, _cached='/usr/local/lib/python3.12/dist-packages/pytest/__pycache__/__main__.cpython-312.pyc') at remote 0xfffff70cd910>, '__annotations__': {}, '__builtins__': <module at remote 0xfffff7bfd940>, '__file__': '/usr/local/lib/python3.12/dist-packages/pytest/__main__.py', '__cached__': '/usr/local/lib/python3.12/dist-packages/pytest/__pycache__/__main__.cpython-312.pyc', 'pytest': <module at remote 0xfffff7a2dee0>}, 
    globals={'__name__': '__main__', '__doc__': 'The pytest entry point.', '__package__': 'pytest', '__loader__': <SourceFileLoader(name='pytest.__main__', path='/usr/local/lib/python3.12/dist-packages/pytest/__main__.py') at remote 0xfffff7094980>, '__spec__': <ModuleSpec(name='pytest.__main__', loader=<...>, origin='/usr/local/lib/python3.12/dist-packages/pytest/__main__.py', loader_state=None, submodule_search_locations=None, _uninitialized_submodules=[], _set_fileattr=True, _cached='/usr/local/lib/python3.12/dist-packages/pytest/__pycache__/__main__.cpython-312.pyc') at remote 0xfffff70cd910>, '__annotations__': {}, '__builtins__': <module at remote 0xfffff7bfd940>, '__file__': '/usr/local/lib/python3.12/dist-packages/pytest/__main__.py', '__cached__': '/usr/local/lib/python3.12/dist-packages/pytest/__pycache__/__main__.cpython-312.pyc', 'pytest': <module at remote 0xfffff7a2dee0>}, source=<code at remote 0xfffff726bdd0>) at ../Python/bltinmodule.c:1096
#92 builtin_exec (module=<optimized out>, args=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at ../Python/clinic/bltinmodule.c.h:586
#93 0x000000000050388c [PAC] in cfunction_vectorcall_FASTCALL_KEYWORDS (func=<built-in method exec of module object at remote 0xfffff7bfd940>, args=0xfffff7fe7180, nargsf=<optimized out>, kwnames=<optimized out>) at ../Include/cpython/methodobject.h:50
#94 0x00000000004c38fc [PAC] in _PyObject_VectorcallTstate (kwnames=<optimized out>, nargsf=<optimized out>, args=<optimized out>, callable=<built-in method exec of module object at remote 0xfffff7bfd940>, tstate=0xb8a278 <_PyRuntime+459672>)
    at ../Include/internal/pycore_call.h:92
#95 PyObject_Vectorcall (callable=<built-in method exec of module object at remote 0xfffff7bfd940>, args=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at ../Objects/call.c:325
#96 0x0000000000564274 [PAC] in _PyEval_EvalFrameDefault (tstate=0xb8a278 <_PyRuntime+459672>, frame=0xfffff7fe70d8, throwflag=-362533328) at Python/bytecodes.c:2706
#97 0x000000000068bff8 [PAC] in pymain_run_module (modname=<optimized out>, set_argv0=set_argv0@entry=1) at ../Modules/main.c:300
#98 0x000000000068b6bc [PAC] in pymain_run_python (exitcode=0xfffffffffa8c) at ../Modules/main.c:623
#99 Py_RunMain () at ../Modules/main.c:709
#100 0x000000000068b3e8 [PAC] in pymain_main (args=args@entry=0xfffffffffb50) at ../Modules/main.c:739
#101 0x000000000068b3a8 in Py_BytesMain (argc=<optimized out>, argv=<optimized out>) at ../Modules/main.c:763
#102 0x0000fffff7ce84c4 [PAC] in ?? () from /lib/aarch64-linux-gnu/libc.so.6
#103 0x0000fffff7ce8598 in __libc_start_main () from /lib/aarch64-linux-gnu/libc.so.6
#104 0x00000000005f6e70 in _start ()
(gdb) t a a py-bt

Thread 2 (Thread 0xfffff5a0f180 (LWP 18) "python3"):
Traceback (most recent call first):
  File "/usr/lib/python3.12/socket.py", line 295, in accept
    fd, addr = self._accept()
  File "/usr/local/lib/python3.12/dist-packages/pytest_rerunfailures.py", line 433, in run_server
    conn, _ = self.sock.accept()
  File "/usr/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.12/threading.py", line 1030, in _bootstrap
    self._bootstrap_inner()

Thread 1 (Thread 0xfffff7ff2720 (LWP 16) "python3"):
Traceback (most recent call first):
  Garbage-collecting
  File "/usr/local/lib/python3.12/dist-packages/ZODB/MappingStorage.py", line 68, in opened
    def opened(self):
  File "/usr/local/lib/python3.12/dist-packages/ZODB/utils.py", line 260, in __call__
    if not precondition(inst):
  File "/usr/local/lib/python3.12/dist-packages/ZODB/DemoStorage.py", line 223, in loadBefore
    result = self.changes.loadBefore(oid, tid)
  File "/usr/local/lib/python3.12/dist-packages/ZODB/DemoStorage.py", line 226, in loadBefore
    return self.base.loadBefore(oid, tid)
  File "/usr/local/lib/python3.12/dist-packages/ZODB/mvccadapter.py", line 163, in load
    r = self._storage.loadBefore(oid, self._start)
  File "/usr/local/lib/python3.12/dist-packages/ZODB/Connection.py", line 784, in setstate
    p, serial = self._storage.load(oid)
  File "/usr/lib/python3.12/collections/__init__.py", line 1144, in __iter__
    return iter(self.data)
  File "/usr/local/lib/python3.12/dist-packages/zope/interface/adapter.py", line 800, in init_extendors
    for p in self._registry._provided:
  File "/usr/local/lib/python3.12/dist-packages/zope/interface/adapter.py", line 765, in __init__
    self.init_extendors()
  File "/usr/local/lib/python3.12/dist-packages/zope/interface/adapter.py", line 198, in _createLookup
    self._v_lookup = self.LookupClass(self)
  File "/usr/local/lib/python3.12/dist-packages/zope/component/persistentregistry.py", line 108, in __setstate__
    self._createLookup()
  File "/usr/local/lib/python3.12/dist-packages/ZODB/serialize.py", line 639, in setGhostState
    obj.__setstate__(state)
  File "/usr/local/lib/python3.12/dist-packages/ZODB/Connection.py", line 788, in setstate
    self._reader.setGhostState(obj, p)
  File "/usr/local/lib/python3.12/dist-packages/zope/interface/registry.py", line 223, in _setBases
    self.utilities.__bases__ = tuple([
  File "/usr/local/lib/python3.12/dist-packages/zope/site/site.py", line 156, in _setBases
    super()._setBases(bases)
  File "/usr/local/lib/python3.12/dist-packages/zope/interface/registry.py", line 229, in <lambda>
    lambda self, bases: self._setBases(bases),
  File "/app/zeit/cms/testing.py", line 380, in _set_current_zca
    site.__bases__ = (self['zcaRegistry'],)
  File "/app/zeit/cms/testing.py", line 370, in testSetUp
    self._set_current_zca(self['zodbApp'])
  File "/usr/local/lib/python3.12/dist-packages/zope/pytestlayer/fixture.py", line 81, in function_fixture
    layer.testSetUp()
  File "<string>", line 14, in zope_layer_function_zeit_workflow_testing_ZOPE_LAYER_281474619577920
  File "/usr/local/lib/python3.12/dist-packages/_pytest/fixtures.py", line 902, in call_fixture_func
    fixture_result = fixturefunc(**kwargs)
  File "/usr/local/lib/python3.12/dist-packages/_pytest/fixtures.py", line 1123, in pytest_fixture_setup
    result = call_fixture_func(fixturefunc, request, kwargs)
  File "/usr/local/lib/python3.12/dist-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
  File "/usr/local/lib/python3.12/dist-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/local/lib/python3.12/dist-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  File "/usr/local/lib/python3.12/dist-packages/_pytest/fixtures.py", line 1069, in execute
    result = ihook.pytest_fixture_setup(fixturedef=self, request=request)
  File "/usr/local/lib/python3.12/dist-packages/_pytest/fixtures.py", line 693, in _compute_fixture_value
    fixturedef.execute(request=subrequest)
  File "/usr/local/lib/python3.12/dist-packages/_pytest/fixtures.py", line 607, in _get_active_fixturedef
    self._compute_fixture_value(fixturedef)
  File "/usr/local/lib/python3.12/dist-packages/_pytest/fixtures.py", line 585, in getfixturevalue
    fixturedef = self._get_active_fixturedef(argname)
  File "/usr/local/lib/python3.12/dist-packages/_pytest/fixtures.py", line 566, in _fillfixtures
    item.funcargs[argname] = self.getfixturevalue(argname)
  File "/usr/local/lib/python3.12/dist-packages/_pytest/unittest.py", line 204, in setup
    self._request._fillfixtures()
  File "/usr/local/lib/python3.12/dist-packages/_pytest/runner.py", line 494, in setup
    col.setup()
  File "/usr/local/lib/python3.12/dist-packages/_pytest/runner.py", line 157, in pytest_runtest_setup
    item.session._setupstate.setup(item)
  File "/usr/local/lib/python3.12/dist-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
  File "/usr/local/lib/python3.12/dist-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/local/lib/python3.12/dist-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  File "/usr/local/lib/python3.12/dist-packages/_pytest/runner.py", line 262, in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
  File "/usr/local/lib/python3.12/dist-packages/_pytest/runner.py", line 341, in from_call
    result: Optional[TResult] = func()
  File "/usr/local/lib/python3.12/dist-packages/_pytest/runner.py", line 261, in call_runtest_hook
    return CallInfo.from_call(
  File "/usr/local/lib/python3.12/dist-packages/_pytest/runner.py", line 222, in call_and_report
    call = call_runtest_hook(item, when, **kwds)
  File "/usr/local/lib/python3.12/dist-packages/_pytest/runner.py", line 127, in runtestprotocol
    rep = call_and_report(item, "setup", log)
  File "/usr/local/lib/python3.12/dist-packages/_pytest/runner.py", line 114, in pytest_runtest_protocol
    runtestprotocol(item, nextitem=nextitem)
  File "/usr/local/lib/python3.12/dist-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
  File "/usr/local/lib/python3.12/dist-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/local/lib/python3.12/dist-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  File "/usr/local/lib/python3.12/dist-packages/_pytest/main.py", line 350, in pytest_runtestloop
    item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  File "/usr/local/lib/python3.12/dist-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
  File "/usr/local/lib/python3.12/dist-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/local/lib/python3.12/dist-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  File "/usr/local/lib/python3.12/dist-packages/_pytest/main.py", line 325, in _main
    config.hook.pytest_runtestloop(session=session)
  File "/usr/local/lib/python3.12/dist-packages/_pytest/main.py", line 271, in wrap_session
    session.exitstatus = doit(config, session) or 0
  File "/usr/local/lib/python3.12/dist-packages/_pytest/main.py", line 318, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/usr/local/lib/python3.12/dist-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
  File "/usr/local/lib/python3.12/dist-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/local/lib/python3.12/dist-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  File "/usr/local/lib/python3.12/dist-packages/_pytest/config/__init__.py", line 169, in main
    ret: Union[ExitCode, int] = config.hook.pytest_cmdline_main(
  File "/usr/local/lib/python3.12/dist-packages/_pytest/config/__init__.py", line 192, in console_main
    code = main()
  File "/usr/local/lib/python3.12/dist-packages/pytest/__main__.py", line 5, in <module>
    raise SystemExit(pytest.console_main())
  <built-in method exec of module object at remote 0xfffff7bfd940>
  File "<frozen runpy>", line 88, in _run_code
  File "<frozen runpy>", line 198, in _run_module_as_main
(gdb) py-list
  63            self._oid = 0
  64    
  65        ######################################################################
  66        # Preconditions:
  67    
 >68        def opened(self):
  69            """The storage is open
  70            """
  71            return self._opened
  72    
  73        def not_in_transaction(self):

Pther Python traces but runs into the same weakref error message.

File "app/lib/python3.12/site-packages/zope/interface/interface.py", line 511 in changed
File "app/lib/python3.12/site-packages/zope/interface/declarations.py", line 339 in changed
File "app/lib/python3.12/site-packages/zope/interface/interface.py", line 415 in __setBases
File "app/lib/python3.12/site-packages/zope/interface/declarations.py", line 636 in _classImplements_ordered
File "app/lib/python3.12/site-packages/zope/interface/declarations.py", line 581 in classImplements
File "app/lib/python3.12/site-packages/zope/configuration/config.py", line 789 in execute_actions
File "source/vivi/core/src/zeit/cms/zope.py", line 70 in _load_zcml
File "source/vivi/core/src/zeit/cms/testing.py", line 172 in setUp
File "app/lib/python3.12/site-packages/zope/interface/ro.py", line 353 in _can_choose_base
File "app/lib/python3.12/site-packages/zope/interface/ro.py", line 385 in _find_next_C3_base
File "app/lib/python3.12/site-packages/zope/interface/ro.py", line 373 in _choose_next_base
File "app/lib/python3.12/site-packages/zope/interface/ro.py", line 460 in _merge
File "app/lib/python3.12/site-packages/zope/interface/ro.py", line 469 in mro
File "app/lib/python3.12/site-packages/zope/interface/ro.py", line 674 in ro
File "app/lib/python3.12/site-packages/zope/interface/interface.py", line 462 in _calculate_sro
File "app/lib/python3.12/site-packages/zope/interface/interface.py", line 496 in changed
File "app/lib/python3.12/site-packages/zope/interface/interface.py", line 415 in __setBases
File "app/lib/python3.12/site-packages/zope/interface/interface.py", line 382 in __init__
File "app/lib/python3.12/site-packages/zope/interface/declarations.py", line 82 in __init__
File "app/lib/python3.12/site-packages/zope/interface/declarations.py", line 751 in __init__
File "app/lib/python3.12/site-packages/zope/interface/declarations.py", line 828 in Provides
File "app/lib/python3.12/site-packages/zope/interface/declarations.py", line 864 in directlyProvides
File "app/lib/python3.12/site-packages/zope/security/testing.py", line 41 in __init__
File "source/vivi/core/src/zeit/cms/testing.py", line 924 in create_interaction
File "source/vivi/core/src/zeit/cms/testing.py", line 768 in setUp
@davisagli
Copy link
Member

@tseaver I don't fully understand what happened here, but I did notice:

  1. Py_TPFLAGS_MANAGED_WEAKREF is included in BASETYPE_FLAGS, so it is enabled for some types that didn't use the explicit weakref list before.
  2. According to https://docs.python.org/3/extending/newtypes.html#weakref-support, PyObject_ClearWeakRefs still needs to be called from tp_dealloc even when using Py_TPFLAGS_MANAGED_WEAKREF

@tseaver
Copy link
Member

tseaver commented Sep 5, 2024

@stollero I have made a change in PR #324 which might fix the issue -- can you test with that branch?

@stollero
Copy link
Author

stollero commented Sep 6, 2024

Thanks a lot for the quick update, unfortunately we still run into the segmentation fault, but at least another message.

PyType_Check (op=<optimized out>) at ../Include/object.h:974
warning: 974    ../Include/object.h: No such file or directory
(gdb) bt
#0  PyType_Check (op=<optimized out>) at ../Include/object.h:974
#1  _PyObject_GET_WEAKREFS_LISTPTR (op=<unknown at remote 0xffffe648abd0>) at ../Include/internal/pycore_object.h:292
#2  clear_weakref (self=0xffffe619ba60) at ../Objects/weakrefobject.c:60
#3  _PyWeakref_ClearRef (self=self@entry=0xffffe619ba60) at ../Objects/weakrefobject.c:102
#4  0x00000000005b3428 [PAC] in handle_weakrefs (old=0xb2c9e8 <_PyRuntime+76552>, unreachable=0xffffffffdc40) at ../Modules/gcmodule.c:804
#5  gc_collect_main (tstate=tstate@entry=0xb8a278 <_PyRuntime+459672>, generation=generation@entry=0, n_collected=n_collected@entry=0xffffffffdd90, n_uncollectable=n_uncollectable@entry=0xffffffffdd98, 
    nofail=nofail@entry=0) at ../Modules/gcmodule.c:1284```

@tseaver
Copy link
Member

tseaver commented Sep 6, 2024

@stollero Thanks for checking. 7ca6275 updated the branch with another flail -- could you try reproducing again, please?

@stollero
Copy link
Author

stollero commented Sep 9, 2024

@tseaver no more segmentation faults. Runs without any errors. Thanks a lot for the swift response.

@tseaver
Copy link
Member

tseaver commented Sep 9, 2024

@stollero Wonderful news! Thanks so much for the report, and for being willing and able to help test the PR.

@dataflake
Copy link
Member

Maybe related, a development branch off the current unpatched master errors out on Python 3.13: https://github.com/zopefoundation/zope.interface/actions/runs/10900505049/job/30248439614

@frenzymadness
Copy link
Contributor

I also have a problem with segfault when running the testsuite with Python 3.13.0rc2:

…
test_auto_array_array_zope_interface_common_collections_IMutableSequence (zope.interface.common.tests.test_collections.TestVerifyObject.test_auto_array_array_zope_interface_common_collections_IMutableSequence) ... skipped "Unable to verify <class 'array.array'>"
test_auto_builtins_FrameLocalsProxy_zope_interface_common_collections_IMapping (zope.interface.common.tests.test_collections.TestVerifyObject.test_auto_builtins_FrameLocalsProxy_zope_interface_common_collections_IMapping) ... Fatal Python error: Segmentation fault

Current thread 0x00007fcf1a3bdb80 (most recent call first):
  File "/home/lbalhar/Software/zope.interface/src/zope/interface/common/tests/__init__.py", line 140 in _adjust_object_before_verify
  File "/home/lbalhar/Software/zope.interface/src/zope/interface/common/tests/__init__.py", line 119 in verify
  File "/home/lbalhar/Software/zope.interface/src/zope/interface/common/tests/__init__.py", line 66 in test
  File "/usr/lib64/python3.13/unittest/case.py", line 606 in _callTestMethod
  File "/usr/lib64/python3.13/unittest/case.py", line 651 in run
  File "/usr/lib64/python3.13/unittest/case.py", line 707 in __call__
  File "/usr/lib64/python3.13/unittest/suite.py", line 122 in run
  File "/usr/lib64/python3.13/unittest/suite.py", line 84 in __call__
  File "/usr/lib64/python3.13/unittest/suite.py", line 122 in run
  File "/usr/lib64/python3.13/unittest/suite.py", line 84 in __call__
  File "/usr/lib64/python3.13/unittest/suite.py", line 122 in run
  File "/usr/lib64/python3.13/unittest/suite.py", line 84 in __call__
  File "/usr/lib64/python3.13/unittest/runner.py", line 240 in run
  File "/usr/lib64/python3.13/unittest/main.py", line 270 in runTests
  File "/usr/lib64/python3.13/unittest/main.py", line 104 in __init__
  File "/usr/lib64/python3.13/unittest/__main__.py", line 18 in <module>
  File "<frozen runpy>", line 88 in _run_code
  File "<frozen runpy>", line 198 in _run_module_as_main

Extension modules: zope.interface._zope_interface_coptimizations (total: 1)
[1]    1884270 segmentation fault (core dumped)  PYTHONFAULTHANDLER=1 python -m unittest discover -vv src

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.

@vstinner
Copy link

I also have a problem with segfault when running the testsuite with Python 3.13.0rc2

I reported the crash upstream and I'm working on a fix: python/cpython#124513

@vstinner
Copy link

With my fix, the test suite fails with:

ERROR: test_auto_builtins_FrameLocalsProxy_zope_interface_common_collections_IMapping (zope.interface.common.tests.test_collections.TestVerifyObject.test_auto_builtins_FrameLocalsProxy_zope_interface_common_collections_IMapping)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/dev/zope.interface/src/zope/interface/common/tests/__init__.py", line 141, in _adjust_object_before_verify
    result = constructor()
TypeError: FrameLocalsProxy needs exactly 1 parameter, got 0

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/vstinner/dev/zope.interface/src/zope/interface/common/tests/__init__.py", line 66, in test
    self.assertTrue(self.verify(iface, stdlib_class))
                    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/dev/zope.interface/src/zope/interface/common/tests/__init__.py", line 119, in verify
    self._adjust_object_before_verify(iface, klass),
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/home/vstinner/dev/zope.interface/src/zope/interface/common/tests/__init__.py", line 143, in _adjust_object_before_verify
    raise TypeError(
        f'Failed to create instance of {constructor}') from e
TypeError: Failed to create instance of <class 'FrameLocalsProxy'>

I'm not sure why the test wants to create a FrameLocalsProxy instance.

@vstinner
Copy link

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.

@frenzymadness
Copy link
Contributor

Thank you @vstinner! I can confirm that it works fine with the patch.

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

Successfully merging a pull request may close this issue.

6 participants