Skip to content

Unit test test_incremental_gc_handles_fast_cycle_creation sometimes fails #133532

Open
@nascheme

Description

@nascheme

Bug report

Bug description:

On a debug build on Linux AMD64, this fails for me:

./python -m test -uall test___all__ test_atexit test_audit test_ast test_argparse test_gc
[...]
test test_gc failed -- Traceback (most recent call last):
  File "/home/nas/src/cpython/Lib/contextlib.py", line 85, in inner
    return func(*args, **kwds)
  File "/home/nas/src/cpython/Lib/test/test_gc.py", line 1184, in test_incremental_gc_handles_fast_cycle_creation
    self.assertLess(new_objects, 27_000, f"Heap growing. Reached limit after {i} iterations")
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 27013 not less than 27000 : Heap growing. Reached limit after 6579 iterations

The exact set of tests required before test_gc seems to depend on other factors. More reliable command might be:

./python -m test -uall test___all__ test_buffer test_atexit test_audit test_bigaddrspace test_bdb test_abc test_bufio test_ast test_base64 test_annotationlib test_baseexception test__colorize test__interpreters test_asyncgen test_augassign test_bigmem test_binascii test_bz2 test_abstract_numbers test__osx_support test_c_locale_coercion test_bool test_argparse test_gc

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions