Skip to content

Conversation

@charris
Copy link
Member

@charris charris commented Mar 3, 2025

Backport of #28421.

Fixes #28412.

For reasons I don't fully understand, test_legacy_usertype_cast_init_thread_safety sometimes crashes 32 bit CI runners due to OOM errors. This test spawns a lot of threads but other tests spawn more. The crashes happen when Python exhausts the 4 GB of address space available to the runner, so I think it might depend on factors like the precise memory allocation pattern of the test as well as maybe memory fragmentation in the memory space available to the runner.

Rather than trying to track this down more, I just skip the test on 32 bit runners. This crash has only ever been observed there.

While I was at it I did a cleanup (most of the diff) to replace one-off uses of np.dtype(np.intp).itemsize == 8 with a new IS_64BIT constant.

@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels Mar 3, 2025
@charris charris added this to the 2.2.4 release milestone Mar 3, 2025
@charris charris merged commit d6580bc into numpy:maintenance/2.2.x Mar 4, 2025
76 checks passed
@charris charris deleted the backport-28421 branch March 4, 2025 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Bug 08 - Backport Used to tag backport PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants