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
Describe the bug, including details regarding any error messages, version, and platform.
test_table_uses_memory_poolfails occasionally with.../test_pandas.py:3964: AssertionErrorObserved on job
ARM64 macOS 14, wherepytest -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
Resembles #44728:
prior_allocationcaptures beforegc.collect(), so lingering allocations from earlier tests in the same xdist worker could be counted in the baseline but later freed bygc.collect()making final smaller than baseline.Component(s)
Python, Continuous Integration