Skip to content

BUG: skip legacy dtype multithreaded test on 32 bit runners#28421

Merged
charris merged 2 commits intonumpy:mainfrom
ngoldbaum:skip-32-bit
Mar 3, 2025
Merged

BUG: skip legacy dtype multithreaded test on 32 bit runners#28421
charris merged 2 commits intonumpy:mainfrom
ngoldbaum:skip-32-bit

Conversation

@ngoldbaum
Copy link
Copy Markdown
Member

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.

@ngoldbaum ngoldbaum force-pushed the skip-32-bit branch 2 times, most recently from bbcf54f to 0c0bd38 Compare March 3, 2025 19:23
Copy link
Copy Markdown
Contributor

@mhvk mhvk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Mar 3, 2025
@charris charris merged commit 9a2b8b4 into numpy:main Mar 3, 2025
66 checks passed
@charris
Copy link
Copy Markdown
Member

charris commented Mar 3, 2025

Thanks Nathan.

@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Mar 3, 2025
@ngoldbaum ngoldbaum added the 39 - free-threading PRs and issues related to support for free-threading CPython (a.k.a. no-GIL, PEP 703) label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Bug 39 - free-threading PRs and issues related to support for free-threading CPython (a.k.a. no-GIL, PEP 703)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: cp313t-win32 wheel tests are failing on main

3 participants