-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
MemoryError freelist is not thread-safe in free threaded build #129668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
3.13
bugs and security fixes
3.14
bugs and security fixes
topic-free-threading
type-bug
An unexpected behavior, bug, or error
Comments
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Feb 4, 2025
The MemoryError freelist was not thread-safe in the free threaded build. Use a mutex to protect accesses to the freelist. Unlike other freelists, the MemoryError freelist is not performance sensitive.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Feb 5, 2025
The MemoryError freelist was not thread-safe in the free threaded build. Use a mutex to protect accesses to the freelist. Unlike other freelists, the MemoryError freelist is not performance sensitive.
colesbury
added a commit
that referenced
this issue
Feb 6, 2025
… build (gh-129704) The MemoryError freelist was not thread-safe in the free threaded build. Use a mutex to protect accesses to the freelist. Unlike other freelists, the MemoryError freelist is not performance sensitive.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Feb 6, 2025
…readed build (pythongh-129704) The MemoryError freelist was not thread-safe in the free threaded build. Use a mutex to protect accesses to the freelist. Unlike other freelists, the MemoryError freelist is not performance sensitive. (cherry picked from commit 51b4edb)
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Feb 6, 2025
This would catch the data race involving the MemoryError freelist that was fixed in pythongh-129668.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Feb 6, 2025
This would catch the data race involving the MemoryError freelist that was fixed in pythongh-129668.
srinivasreddy
pushed a commit
to srinivasreddy/cpython
that referenced
this issue
Feb 7, 2025
…readed build (pythongh-129704) The MemoryError freelist was not thread-safe in the free threaded build. Use a mutex to protect accesses to the freelist. Unlike other freelists, the MemoryError freelist is not performance sensitive.
cmaloney
pushed a commit
to cmaloney/cpython
that referenced
this issue
Feb 8, 2025
…readed build (pythongh-129704) The MemoryError freelist was not thread-safe in the free threaded build. Use a mutex to protect accesses to the freelist. Unlike other freelists, the MemoryError freelist is not performance sensitive.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.13
bugs and security fixes
3.14
bugs and security fixes
topic-free-threading
type-bug
An unexpected behavior, bug, or error
Bug report
The
MemoryError
freelist isn't thread-safe if the GIL is disabled:cpython/Objects/exceptions.c
Lines 3850 to 3860 in 285c1c4
Most of the freelists were made thread-safe by making them per-thread in the free threaded build (using
pycore_freelist.h
), but we don't want to do that forMemoryError
because its freelist serves a different purpose (it's not really for performance). I think we should just use a lock forMemoryError
's freelist.Linked PRs
The text was updated successfully, but these errors were encountered: