Skip to content

test_frame.test_repr_deep() fails randomly on Windows11 Bigmem buildbot: _PyObject_GC_UNTRACK() assertion error #133384

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

Closed
StanFromIreland opened this issue May 4, 2025 · 2 comments
Labels
tests Tests in the Lib/test dir type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@StanFromIreland
Copy link
Contributor

StanFromIreland commented May 4, 2025

What happened?

Assertion error in _PyObject_GC_UNTRACK() when running test_frame.test_repr_deep() on AMD64 Windows11 Bigmem 3.x buildbot.

AMD64 Windows11 Bigmem 3.x: https://buildbot.python.org/#/builders/1079/builds/6431

test_frame
(...)
test_repr_deep (test.test_frame.FrameLocalsProxyMappingTests.test_repr_deep) ...

R:\buildarea\pull_request.ambv-bb-win11.bigmem\build\Objects\listobject.c:3997: _PyObject_GC_UNTRACK: Assertion "_PyObject_GC_IS_TRACKED(((PyObject*)(op)))" failed: object not tracked by the garbage collector
Enable tracemalloc to get the memory block allocation traceback
object address  : 0000016FA81B1090
object refcount : 0
object type     : 00007FFB97E7EEB0
object type name: list_iterator
object repr     : <refcnt 0 at 0000016FA81B1090>
Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed
Python runtime state: initialized

Warning -- Unraisable exception
Exception ignored in the internal traceback machinery:
Traceback (most recent call last):
  File "R:\buildarea\pull_request.ambv-bb-win11.bigmem\build\Lib\traceback.py", line 143, in _print_exception_bltin
    return print_exception(exc, limit=BUILTIN_EXCEPTION_LIMIT, file=file, colorize=colorize)
  File "R:\buildarea\pull_request.ambv-bb-win11.bigmem\build\Lib\traceback.py", line 134, in print_exception
    te.print(file=file, chain=chain, colorize=colorize)
  File "R:\buildarea\pull_request.ambv-bb-win11.bigmem\build\Lib\traceback.py", line 1577, in print
    for line in self.format(chain=chain, colorize=colorize):
  File "R:\buildarea\pull_request.ambv-bb-win11.bigmem\build\Lib\traceback.py", line 1514, in format
    yield from _ctx.emit(exc.format_exception_only(colorize=colorize))
  File "R:\buildarea\pull_request.ambv-bb-win11.bigmem\build\Lib\traceback.py", line 1001, in emit
    for text in text_gen:
  File "R:\buildarea\pull_request.ambv-bb-win11.bigmem\build\Lib\traceback.py", line 1268, in format_exception_only
    isinstance(self.__notes__, collections.abc.Sequence)
  File "R:\buildarea\pull_request.ambv-bb-win11.bigmem\build\Lib\abc.py", line 119, in __instancecheck__
    return _abc_instancecheck(cls, instance)
  File "R:\buildarea\pull_request.ambv-bb-win11.bigmem\build\Lib\abc.py", line 123, in __subclasscheck__
    return _abc_subclasscheck(cls, subclass)
  File "R:\buildarea\pull_request.ambv-bb-win11.bigmem\build\Lib\abc.py", line 123, in __subclasscheck__
    return _abc_subclasscheck(cls, subclass)
  File "R:\buildarea\pull_request.ambv-bb-win11.bigmem\build\Lib\abc.py", line 123, in __subclasscheck__
    return _abc_subclasscheck(cls, subclass)
RecursionError: Stack overflow (used 11719 kB)

Current thread 0x00000408 (most recent call first):
  File "R:\buildarea\pull_request.ambv-bb-win11.bigmem\build\Lib\unittest\case.py", line 247 in handle
  File "R:\buildarea\pull_request.ambv-bb-win11.bigmem\build\Lib\unittest\case.py", line 813 in assertRaises
  File "R:\buildarea\pull_request.ambv-bb-win11.bigmem\build\Lib\test\mapping_tests.py", line 634 in test_repr_deep
  (...)
Extension modules: _testinternalcapi, _testcapi (total: 2)

See also #133261 (test_frame crash).

CPython versions tested on:

CPython main branch

Operating systems tested on:

Windows

Output from running 'python -VV' on the command line:

Python 3.14

@StanFromIreland StanFromIreland added the type-crash A hard crash of the interpreter, possibly with a core dump label May 4, 2025
@picnixz picnixz added the tests Tests in the Lib/test dir label May 4, 2025
@vstinner
Copy link
Member

vstinner commented May 4, 2025

@StanFromIreland: I don't see the assertion error in your output. "Fatal Python error: Segmentation fault" looks more like #133261.

Update: I modified the issue first message to focus on the assertion error.

@vstinner vstinner changed the title Random test_repr_deep crashes caused by GC untrack assertion failure test_frame: Random test_repr_deep crashes caused by GC untrack assertion failure May 4, 2025
@vstinner vstinner changed the title test_frame: Random test_repr_deep crashes caused by GC untrack assertion failure test_frame.test_repr_deep() fails randomly on Windows11 Bigmem buildbot: _PyObject_GC_UNTRACK() assertion error May 4, 2025
@vstinner
Copy link
Member

vstinner commented May 5, 2025

It should be fixed by #133431. Reopen the issue if the bug is still there.

@vstinner vstinner closed this as completed May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

No branches or pull requests

3 participants