Skip to content

[Python][CI] test_table_uses_memory_pool flaky on macOS 14 job #50037

@tadeja

Description

@tadeja

Describe the bug, including details regarding any error messages, version, and platform.

test_table_uses_memory_pool fails occasionally with .../test_pandas.py:3964: AssertionError
Observed on job ARM64 macOS 14, where pytest -r s -n auto ... uses xdist to run the tests in parallel (8207, so ~2700 per worker).
Latest example May 25, same commit re-run passed.
Second example May 20
Third example May 20 is on main

    def test_table_uses_memory_pool():
        N = 10000
        arr = pa.array(np.arange(N, dtype=np.int64))
        t = pa.table([arr, arr, arr], ['f0', 'f1', 'f2'])
    
        prior_allocation = pa.total_allocated_bytes()
...
        x = None  # noqa
        gc.collect()
>       assert pa.total_allocated_bytes() == prior_allocation
E       assert 1472 == 1664
...

Resembles #44728: prior_allocation captures before gc.collect(), so lingering allocations from earlier tests in the same xdist worker could be counted in the baseline but later freed by gc.collect() making final smaller than baseline.

Component(s)

Python, Continuous Integration

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions