Skip to content

test_lazy_import.test_deeply_dotted_name() leaks 19,650 references on PPC64LE CentOS9 #159538

Closed

Description

@vstinner

Example on PPC64LE CentOS9 Refleaks 3.x buildbot (I ran the test manually):

$ ./python -m test -R 3:3 test_lazy_import -m test_deeply_dotted_name
...
test_lazy_import leaked [19650, 19650, 19650] references, sum=58950
test_lazy_import leaked [9829, 9829, 9829] memory blocks, sum=29487
...
Result: FAILURE

See also the leak on PPC64LE CentOS9 Refleaks 3.x: https://buildbot.python.org/#/builders/867/builds/3577

Linked PRs

Activity

  1. StanFromIreland commented on Oct 16, 2026

    @StanFromIreland
    Member
  2. vstinner commented on Oct 16, 2026

    @vstinner
    MemberAuthor

    The test was added by #159289.

  3. brittanyrey commented on Oct 16, 2026

    @brittanyrey
    Contributor

    Taking a look!

  4. brittanyrey commented on Oct 16, 2026

    @brittanyrey
    Contributor

    I put up a fix that adds an explicit call to self.addCleanup. #159576

    There's also another workaround that changes the restricted stack size from 256 -> 512 which should also suffice:

    -    @support.run_with_limited_c_stack(depth=10_000, size=256 * 1024)
    +    @support.run_with_limited_c_stack(depth=10_000, size=512 * 1024)
  5. added a commit that references this issue on Oct 17, 2026
  6. added a commit that references this issue on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtopic-lazy-importstype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions