Skip to content

test_import leaked [1, 1, 6] memory blocks on s390x Fedora Refleaks 3.x #110096

Description

@vstinner

s390x Fedora Refleaks 3.x:

0:19:28 load avg: 8.18 [406/467/1] test_import failed (reference leak) -- running (2): test.test_multiprocessing_spawn.test_manager (2 min 56 sec), test.test_multiprocessing_spawn.test_processes (3 min 38 sec)
beginning 6 repetitions
123456
......
test_import leaked [1, 1, 6] memory blocks, sum=8

when re-run in verbose mode in a fresh process, regrtest no longer detects a memory leak:

0:24:10 load avg: 3.66 Re-running 1 failed tests in verbose mode in subprocesses
0:24:10 load avg: 3.66 Run 1 test in parallel using 1 worker process (timeout: 3 hour 20 min, worker timeout: 3 hour 25 min)
0:24:24 load avg: 3.30 [1/1] test_import passed
Re-running test_import in verbose mode
beginning 6 repetitions
123456
(...)
OK (skipped=3)
(...)
Result: FAILURE then SUCCESS

build: https://buildbot.python.org/all/#/builders/433/builds/896

Activity

  1. vstinner commented on Oct 5, 2023

    @vstinner
    MemberAuthor

    Similar failure:

    test_functools leaked [1, 1, 1] memory blocks, sum=3
    

    build: https://buildbot.python.org/all/#/builders/562/builds/902

    I already saw that test_functools in 2019 and 2020: issue gh-80741.

  2. vstinner commented on Oct 5, 2023

    @vstinner
    MemberAuthor

    test_functools is not 100% stable in terms of "allocated blocks". Sometimes, one run allocates 2 blocks, blocks which are released later. Dump of Lib/test/libregrtest/refleak.py "alloc_deltas". Ignore the first 3 values which are "warmup" runs":

    ./python -m test test_functools -R 3:10 -F -j1 stopped after 5 processes:

    • alloc_deltas [88192, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    • alloc_deltas [88179, 8, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0]
    • alloc_deltas [88180, 7, 0, 2, -1, 1, 0, -1, 1, 0, 0, 0, 0]
    • alloc_deltas [88180, 7, 0, 0, 0, -1, 0, 1, 0, 0, 0, 1, 1]
    • alloc_deltas [88180, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

    Patterns like 2, -1, 1, 0, -1, 1, and 0, 1, 1 can explain why the test "fails" sometimes.

  3. vstinner commented on Nov 8, 2023

    @vstinner
    MemberAuthor

    I didn't see the issue recently on s390x Fedora Refleaks 3.x. I close the issue.

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 dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions