Skip to content

BUG: saving a huge object array with np.savez leaks memory on PyPy #15775

@mattip

Description

@mattip

The test_large_zip test in numpy/lib/tests/test_io.py is currently skipped on PyPy since the allocated memory does not seem to be freed, even after multiple calls to gc.collect. The test passes, but later in the test suite calls to subprocess fail, it seems the call to fork does not use copy-on-write and the non-freed memory requires more than 50% of the available memory.

It is not clear to me where the problem is, what objects are not released. I tried to instrument with weakref.ref but did not find live objects after gc.collect, and valgrind also did not show what is holding memory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions