Skip to content

Python 3.15.0-beta.2-linux 22.04 x64 seems to have issues. #1321

Description

@seberg

Description:
It seems that 3.15.0-beta.2-26891732290 and specifically python-3.15.0-beta.2-linux-22.04-x64-freethreaded.tar.gz has some build issue.

I.e. this artifact: https://github.com/actions/python-versions/releases/download/3.15.0-beta.2-26891732290/python-3.15.0-beta.2-linux-22.04-x64-freethreaded.tar.gz
(I can locally verify that 24.04 works just fine with the reproducer below.)

This causes segfaults (one example from numpy import random), but it can also be locally reproduced nicely with gdb:

gdb --args correct_python -c 'while True: pass'

Inside gdb: r then Ctrl+c and then, let's do something that is definitely valid code:

p (void*)PyObject_Realloc(0x0, 128)

which then fails with a Segfault in

mi_free (p=0x0) at Objects/mimalloc/alloc.c:576
warning: 576	Objects/mimalloc/alloc.c: No such file or directory

Action version:
See above for precise artifact.

Platform:

  • Ubuntu 22.04

Runner type:

  • Hosted
  • Self-hosted

Tools version:

Repro steps:
Sorry, I don't have exact reproducer steps at hand right now since I debugged it locally. But I expect that is easier anyway.
As mentioned, installing NumPy and running python -c 'from numpy import random' will reproduce it, though.

EDIT: Ah silly me to repro should just be something like:

python -c 'import ctypes; ctypes.pythonapi.PyObject_Realloc(0, 128)'

(that also simplifies the gdb call)


(Sorry if this is the wrong place, I guess there is a chance it is yet again an upstream issue...)

Activity

  1. seberg commented on Jun 14, 2026

    @seberg
    Author

    One more note for context in case this is upstream: I'll change the use in NumPy to use PyMem_Realloc which is the correct API here and makes more sense, it may be that the realloc on null behavior is funny for actual python objects.
    This is also not much of a problem in practice since 24.04 works fine. But it seems to me there is still something weird here (unless Python forgot to update their docs and changed the guarantees).

  2. seberg commented on Jun 14, 2026

    @seberg
    Author

    OK, I was pointed to python/cpython#151297 so this is fixed in Python and all that is needed is a rebuild.

  3. v-gowridurgad commented on Jun 15, 2026

    @v-gowridurgad
    Contributor

    Hello @seberg,
    Thank you for reporting this issue. We will investigate it and get back to you as soon as we have some feedback.

  4. self-assigned this
    on Jun 17, 2026
  5. v-lmvysakh commented on Jun 26, 2026

    @v-lmvysakh
    Contributor

    Hi @seberg,

    Thank you for reporting this issue. We've have investigated on the same and wanted to let you know that, The  3.15.0-beta.2 artifact (3.15.0-beta.2-26891732290) was built on June 3, 2026, prior to the upstream fix (python/cpython#151358) landing on June 12, 2026, which is why you had come across with the error.

    However, we would like to inform you that,  3.15.0-beta.3 has now been released and the updated artifacts are available in actions/python-versions (via PR #401). We have verified that the fix is included on the free threaded build for Ubuntu 22.04 and no longer segfaults and completes successfully. Users can now use python-version: '3.15.0-beta.3' with freethreaded: true without encountering this issue. Closing this issue as resolved. Please feel free to reopen if you run into any further issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions