tobgu/pyrsistent

tests/hypothesis_vector_test.py: Modules/gcmodule.c:113: gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small

mgorny opened this issue · 0 comments

mgorny commented

When Python is built --with-assertions, tests/hypothesis_vector_test.py crashes with a refcount-related assertion:

$ python -X tracemalloc -m pytest -s
========================================================= test session starts =========================================================
platform linux -- Python 3.11.6, pytest-7.4.3, pluggy-1.3.0
rootdir: /tmp/pyrsistent
configfile: pytest.ini
plugins: hypothesis-6.88.1
collecting 203 items                                                                                                                  
class Immutable(namedtuple('ImmutableBase', [])):
    __slots__ = tuple()

    def __repr__(self):
        return super(Immutable, self).__repr__().replace('ImmutableBase', self.__class__.__name__)

    def set(self, **kwargs):
        if not kwargs:
            return self

        fields_to_modify = set(kwargs.keys())
        if not fields_to_modify <= set():
            raise AttributeError("'%s' is not a member" % ', '.join(fields_to_modify - set()))

        

        return self.__class__.__new__(self.__class__, *map(kwargs.pop, [], self))

collected 638 items                                                                                                                   

tests/bag_test.py ...................................
tests/checked_map_test.py ..................
tests/checked_set_test.py ............
tests/checked_vector_test.py ........................
tests/class_test.py .............................................
tests/deque_test.py ........................................
tests/field_test.py ..
tests/freeze_test.py ..........................
tests/hypothesis_vector_test.py .Modules/gcmodule.c:113: gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small
object address  : 0x7ff423fc6610
object refcount : 27
object type     : 0x559143971280
object type name: RefCountTracker
object repr     : <140686552491536>

Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed
Python runtime state: initialized

Current thread 0x00007ff42779c740 (most recent call first):
  Garbage-collecting
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/strategies/_internal/strategies.py", line 124 in recur
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/strategies/_internal/strategies.py", line 137 in accept
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/strategies/_internal/strategies.py", line 420 in validate
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/internal/conjecture/data.py", line 937 in draw
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/stateful.py", line 925 in do_draw
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/internal/conjecture/data.py", line 951 in draw
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/stateful.py", line 157 in run_state_machine
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/core.py", line 858 in run
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/core.py", line 705 in default_executor
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/core.py", line 867 in execute_once
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/core.py", line 928 in _execute_once_for_engine
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/internal/conjecture/engine.py", line 174 in __stoppable_test_function
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/internal/conjecture/engine.py", line 196 in test_function
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/internal/conjecture/engine.py", line 718 in generate_new_examples
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/internal/conjecture/engine.py", line 867 in _run
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/internal/conjecture/engine.py", line 461 in run
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/core.py", line 1006 in run_engine
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/core.py", line 1438 in wrapped_test
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/stateful.py", line 113 in run_state_machine
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/stateful.py", line 217 in run_state_machine_as_test
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/stateful.py", line 395 in runTest
  File "/usr/lib/python3.11/unittest/case.py", line 579 in _callTestMethod
  File "/usr/lib/python3.11/unittest/case.py", line 623 in run
  File "/usr/lib/python3.11/unittest/case.py", line 678 in __call__
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/_pytest/unittest.py", line 333 in runtest
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/_pytest/runner.py", line 169 in pytest_runtest_call
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/pluggy/_callers.py", line 77 in _multicall
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/pluggy/_manager.py", line 115 in _hookexec
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/pluggy/_hooks.py", line 493 in __call__
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/_pytest/runner.py", line 262 in <lambda>
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/_pytest/runner.py", line 341 in from_call
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/_pytest/runner.py", line 261 in call_runtest_hook
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/_pytest/runner.py", line 222 in call_and_report
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/_pytest/runner.py", line 133 in runtestprotocol
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/_pytest/runner.py", line 114 in pytest_runtest_protocol
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/pluggy/_callers.py", line 77 in _multicall
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/pluggy/_manager.py", line 115 in _hookexec
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/pluggy/_hooks.py", line 493 in __call__
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/_pytest/main.py", line 350 in pytest_runtestloop
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/pluggy/_callers.py", line 77 in _multicall
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/pluggy/_manager.py", line 115 in _hookexec
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/pluggy/_hooks.py", line 493 in __call__
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/_pytest/main.py", line 325 in _main
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/_pytest/main.py", line 271 in wrap_session
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/_pytest/main.py", line 318 in pytest_cmdline_main
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/pluggy/_callers.py", line 77 in _multicall
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/pluggy/_manager.py", line 115 in _hookexec
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/pluggy/_hooks.py", line 493 in __call__
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/_pytest/config/__init__.py", line 169 in main
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/_pytest/config/__init__.py", line 192 in console_main
  File "/tmp/pyrsistent/.venv/lib/python3.11/site-packages/pytest/__main__.py", line 5 in <module>
  File "<frozen runpy>", line 88 in _run_code
  File "<frozen runpy>", line 198 in _run_module_as_main

Extension modules: pvectorc (total: 1)
Aborted (core dumped)

Top of backtrace:

(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ff426ea2e2f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007ff426e52cc2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ff426e3b4ed in __GI_abort () at abort.c:79
#4  0x00007ff42734253c in fatal_error_exit (status=-1) at Python/pylifecycle.c:2626
#5  0x00007ff427342a25 in fatal_error (fd=2, header=1, prefix=0x7ff427447890 <__func__.0> "_PyObject_AssertFailed", 
    msg=0x7ff427447403 "_PyObject_AssertFailed", status=-1) at Python/pylifecycle.c:2807
#6  0x00007ff427342aa3 in _Py_FatalErrorFunc (func=0x7ff427447890 <__func__.0> "_PyObject_AssertFailed", 
    msg=0x7ff427447403 "_PyObject_AssertFailed") at Python/pylifecycle.c:2823
#7  0x00007ff4271fa455 in _PyObject_AssertFailed (obj=<RefCountTracker(id=140686552491536) at remote 0x7ff423fc6610>, 
    expr=0x7ff4274abc8d "gc_get_refs(g) > 0", msg=0x7ff4274abc77 "refcount is too small", file=0x7ff4274abc64 "Modules/gcmodule.c", 
    line=113, function=0x7ff4274ad610 <__func__.39> "gc_decref") at Objects/object.c:2368
#8  0x00007ff427379ae4 in gc_decref (g=0x7ff423fc6600) at Modules/gcmodule.c:113
#9  0x00007ff42737a35d in visit_decref (op=<RefCountTracker(id=140686552491536) at remote 0x7ff423fc6610>, parent=0x7ff423ce0540)
    at Modules/gcmodule.c:459
#10 0x00007ff425cc9238 in PVector_traverse () from /tmp/pyrsistent/pvectorc.cpython-311-x86_64-linux-gnu.so
#11 0x00007ff42737a3b8 in subtract_refs (containers=0x7ff42768f150 <_PyRuntime+59632>) at Modules/gcmodule.c:478
#12 0x00007ff42737b596 in deduce_unreachable (base=0x7ff42768f150 <_PyRuntime+59632>, unreachable=0x7ffe3b6b3e00)
    at Modules/gcmodule.c:1100
#13 0x00007ff42737b8e0 in gc_collect_main (tstate=0x7ff4276a9218 <_PyRuntime+166328>, generation=1, n_collected=0x7ffe3b6b3e60, 
    n_uncollectable=0x7ffe3b6b3e68, nofail=0) at Modules/gcmodule.c:1226
#14 0x00007ff42737bfad in gc_collect_with_callback (tstate=0x7ff4276a9218 <_PyRuntime+166328>, generation=1)
    at Modules/gcmodule.c:1400
#15 0x00007ff42737c0dc in gc_collect_generations (tstate=0x7ff4276a9218 <_PyRuntime+166328>) at Modules/gcmodule.c:1455
#16 0x00007ff42737d883 in _PyObject_GC_Link (op=<traceback at remote 0x7ff42491c700>) at Modules/gcmodule.c:2270
#17 0x00007ff42737d938 in gc_alloc (basicsize=40, presize=16) at Modules/gcmodule.c:2290
#18 0x00007ff42737d974 in _PyObject_GC_New (tp=0x7ff427598500 <PyTraceBack_Type>) at Modules/gcmodule.c:2298
#19 0x00007ff427365495 in tb_create_raw (next=0x7ff42491c740, 
    frame=Frame 0x7ff427887698, for file /tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/strategies/_internal/strategies.py, line 124, in recur (strat=<SampledFromStrategy(elements=(<Rule(targets=(), function=<function at remote 0x7ff4242ba0c0>, arguments={'pair': <Bundle(name='sequences', _Bundle__reference_strategy=<BundleReferenceStrategy(name='sequences', consume=False) at remote 0x7ff4242b3810>) at remote 0x7ff4242b3750>}, preconditions=(...), bundles=(<...>,), arguments_strategy=<LazyStrategy(_LazyStrategy__wrapped_strategy=<FixedKeysDictStrategy(dict_type=<type at remote 0x7ff4275889e0>, keys=('pair',), mapped_strategy=<TupleStrategy(element_stra--Type <RET> for more, q to quit, c to continue without paging--c
tegies=(<BundleReferenceStrategy(name='sequences', consume=False, validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=13354782081262425361) at remote 0x7ff4242bd3d0>,), validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=18141394820737764473) at remote 0x7ff4...(truncated), lasti=24, lineno=124)
    at Python/traceback.c:54
#20 0x00007ff4273659a9 in _PyTraceBack_FromFrame (tb_next=<traceback at remote 0x7ff42491c740>, 
    frame=Frame 0x7ff427887698, for file /tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/strategies/_internal/strategies.py, line 124, in recur (strat=<SampledFromStrategy(elements=(<Rule(targets=(), function=<function at remote 0x7ff4242ba0c0>, arguments={'pair': <Bundle(name='sequences', _Bundle__reference_strategy=<BundleReferenceStrategy(name='sequences', consume=False) at remote 0x7ff4242b3810>) at remote 0x7ff4242b3750>}, preconditions=(...), bundles=(<...>,), arguments_strategy=<LazyStrategy(_LazyStrategy__wrapped_strategy=<FixedKeysDictStrategy(dict_type=<type at remote 0x7ff4275889e0>, keys=('pair',), mapped_strategy=<TupleStrategy(element_strategies=(<BundleReferenceStrategy(name='sequences', consume=False, validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=13354782081262425361) at remote 0x7ff4242bd3d0>,), validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=18141394820737764473) at remote 0x7ff4...(truncated)) at Python/traceback.c:244
#21 0x00007ff4273659f0 in PyTraceBack_Here (
    frame=Frame 0x7ff427887698, for file /tmp/pyrsistent/.venv/lib/python3.11/site-packages/hypothesis/strategies/_internal/strategies.py, line 124, in recur (strat=<SampledFromStrategy(elements=(<Rule(targets=(), function=<function at remote 0x7ff4242ba0c0>, arguments={'pair': <Bundle(name='sequences', _Bundle__reference_strategy=<BundleReferenceStrategy(name='sequences', consume=False) at remote 0x7ff4242b3810>) at remote 0x7ff4242b3750>}, preconditions=(...), bundles=(<...>,), arguments_strategy=<LazyStrategy(_LazyStrategy__wrapped_strategy=<FixedKeysDictStrategy(dict_type=<type at remote 0x7ff4275889e0>, keys=('pair',), mapped_strategy=<TupleStrategy(element_strategies=(<BundleReferenceStrategy(name='sequences', consume=False, validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=13354782081262425361) at remote 0x7ff4242bd3d0>,), validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=18141394820737764473) at remote 0x7ff4...(truncated)) at Python/traceback.c:254
#22 0x00007ff4272de385 in _PyEval_EvalFrameDefault (tstate=0x7ff4276a9218 <_PyRuntime+166328>, frame=0x7ff427887698, throwflag=0)
    at Python/ceval.c:5743
#23 0x00007ff4272bfa5a in _PyEval_EvalFrame (tstate=0x7ff4276a9218 <_PyRuntime+166328>, frame=0x7ff427887558, throwflag=0)
    at ./Include/internal/pycore_ceval.h:73
#24 0x00007ff4272e1162 in _PyEval_Vector (tstate=0x7ff4276a9218 <_PyRuntime+166328>, func=0x7ff42445b600, locals=0x0, 
    args=0x7ffe3b6b6548, argcount=1, kwnames=0x0) at Python/ceval.c:6425
#25 0x00007ff427185531 in _PyFunction_Vectorcall (func=<function at remote 0x7ff42445b600>, stack=0x7ffe3b6b6548, 
    nargsf=9223372036854775809, kwnames=0x0) at Objects/call.c:393
#26 0x00007ff427184363 in _PyObject_VectorcallTstate (tstate=0x7ff4276a9218 <_PyRuntime+166328>, 
    callable=<function at remote 0x7ff42445b600>, args=0x7ffe3b6b6548, nargsf=9223372036854775809, kwnames=0x0)
    at ./Include/internal/pycore_call.h:92
#27 0x00007ff4271853ff in PyObject_CallOneArg (func=<function at remote 0x7ff42445b600>, 
    arg=<SampledFromStrategy(elements=(<Rule(targets=(), function=<function at remote 0x7ff4242ba0c0>, arguments={'pair': <Bundle(name='sequences', _Bundle__reference_strategy=<BundleReferenceStrategy(name='sequences', consume=False) at remote 0x7ff4242b3810>) at remote 0x7ff4242b3750>}, preconditions=(...), bundles=(<...>,), arguments_strategy=<LazyStrategy(_LazyStrategy__wrapped_strategy=<FixedKeysDictStrategy(dict_type=<type at remote 0x7ff4275889e0>, keys=('pair',), mapped_strategy=<TupleStrategy(element_strategies=(<BundleReferenceStrategy(name='sequences', consume=False, validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=13354782081262425361) at remote 0x7ff4242bd3d0>,), validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=18141394820737764473) at remote 0x7ff423f7ec90>, validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=12000696373305623442) at remote 0x7ff423f7...(truncated)) at Objects/call.c:376
#28 0x00007ff4271982c6 in property_descr_get (self=<property at remote 0x7ff42447dfd0>, 
    obj=<SampledFromStrategy(elements=(<Rule(targets=(), function=<function at remote 0x7ff4242ba0c0>, arguments={'pair': <Bundle(name='sequences', _Bundle__reference_strategy=<BundleReferenceStrategy(name='sequences', consume=False) at remote 0x7ff4242b3810>) at remote 0x7ff4242b3750>}, preconditions=(...), bundles=(<...>,), arguments_strategy=<LazyStrategy(_LazyStrategy__wrapped_strategy=<FixedKeysDictStrategy(dict_type=<type at remote 0x7ff4275889e0>, keys=('pair',), mapped_strategy=<TupleStrategy(element_strategies=(<BundleReferenceStrategy(name='sequences', consume=False, validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=13354782081262425361) at remote 0x7ff4242bd3d0>,), validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=18141394820737764473) at remote 0x7ff423f7ec90>, validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=12000696373305623442) at remote 0x7ff423f7...(truncated), 
    type=<type at remote 0x5591435c6160>) at Objects/descrobject.c:1630
#29 0x00007ff4271f8ae5 in _PyObject_GenericGetAttrWithDict (
    obj=<SampledFromStrategy(elements=(<Rule(targets=(), function=<function at remote 0x7ff4242ba0c0>, arguments={'pair': <Bundle(name='sequences', _Bundle__reference_strategy=<BundleReferenceStrategy(name='sequences', consume=False) at remote 0x7ff4242b3810>) at remote 0x7ff4242b3750>}, preconditions=(...), bundles=(<...>,), arguments_strategy=<LazyStrategy(_LazyStrategy__wrapped_strategy=<FixedKeysDictStrategy(dict_type=<type at remote 0x7ff4275889e0>, keys=('pair',), mapped_strategy=<TupleStrategy(element_strategies=(<BundleReferenceStrategy(name='sequences', consume=False, validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=13354782081262425361) at remote 0x7ff4242bd3d0>,), validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=18141394820737764473) at remote 0x7ff423f7ec90>, validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=12000696373305623442) at remote 0x7ff423f7...(truncated), name='has_reusable_values', 
    dict=0x0, suppress=0) at Objects/object.c:1278
#30 0x00007ff4271f8e4b in PyObject_GenericGetAttr (
    obj=<SampledFromStrategy(elements=(<Rule(targets=(), function=<function at remote 0x7ff4242ba0c0>, arguments={'pair': <Bundle(name='sequences', _Bundle__reference_strategy=<BundleReferenceStrategy(name='sequences', consume=False) at remote 0x7ff4242b3810>) at remote 0x7ff4242b3750>}, preconditions=(...), bundles=(<...>,), arguments_strategy=<LazyStrategy(_LazyStrategy__wrapped_strategy=<FixedKeysDictStrategy(dict_type=<type at remote 0x7ff4275889e0>, keys=('pair',), mapped_strategy=<TupleStrategy(element_strategies=(<BundleReferenceStrategy(name='sequences', consume=False, validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=13354782081262425361) at remote 0x7ff4242bd3d0>,), validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=18141394820737764473) at remote 0x7ff423f7ec90>, validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=12000696373305623442) at remote 0x7ff423f7...(truncated), name='has_reusable_values')
    at Objects/object.c:1368
#31 0x00007ff4271f7d98 in PyObject_GetAttr (
    v=<SampledFromStrategy(elements=(<Rule(targets=(), function=<function at remote 0x7ff4242ba0c0>, arguments={'pair': <Bundle(name='sequences', _Bundle__reference_strategy=<BundleReferenceStrategy(name='sequences', consume=False) at remote 0x7ff4242b3810>) at remote 0x7ff4242b3750>}, preconditions=(...), bundles=(<...>,), arguments_strategy=<LazyStrategy(_LazyStrategy__wrapped_strategy=<FixedKeysDictStrategy(dict_type=<type at remote 0x7ff4275889e0>, keys=('pair',), mapped_strategy=<TupleStrategy(element_strategies=(<BundleReferenceStrategy(name='sequences', consume=False, validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=13354782081262425361) at remote 0x7ff4242bd3d0>,), validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=18141394820737764473) at remote 0x7ff423f7ec90>, validate_called=True, cached_is_empty=False, cached_has_reusable_values=False, _SearchStrategy__label=12000696373305623442) at remote 0x7ff423f7...(truncated), name='has_reusable_values')
    at Objects/object.c:916
#32 0x00007ff4272cf45c in _PyEval_EvalFrameDefault (tstate=0x7ff4276a9218 <_PyRuntime+166328>, frame=0x7ff4278874e8, throwflag=0)
    at Python/ceval.c:3452
#33 0x00007ff4272bfa5a in _PyEval_EvalFrame (tstate=0x7ff4276a9218 <_PyRuntime+166328>, frame=0x7ff427887180, throwflag=0)
    at ./Include/internal/pycore_ceval.h:73
#34 0x00007ff4272e1162 in _PyEval_Vector (tstate=0x7ff4276a9218 <_PyRuntime+166328>, func=0x7ff423f349a0, locals=0x0, 
    args=0x7ff424915af8, argcount=0, kwnames=('factory', 'data')) at Python/ceval.c:6425
#35 0x00007ff427185531 in _PyFunction_Vectorcall (func=<function at remote 0x7ff423f349a0>, stack=0x7ff424915af8, 
    nargsf=9223372036854775808, kwnames=('factory', 'data')) at Objects/call.c:393