-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
[FreeThreading] object_set_class() fails with an assertion error in _PyCriticalSection_AssertHeld() #127316
Comments
|
@Fidget-Spinner: You worked on I wrote a reproducer which doesn't depend on threading: class Base:
def __init__(self):
self.attr = 123
class ClassA(Base):
pass
class ClassB(Base):
pass
obj = ClassA()
# it's important to store __getstate__() result in a variable!
obj_dict = object.__getstate__(obj)
obj.__class__ = ClassB Output:
gdb traceback:
cc @colesbury |
_DummyThread._after_fork
on a free threaded build even with PYTHON_GIL=1
I'm doing my best to try and understand this bug. I get that some lock isn't held when it's supposed to, and that it's related to descriptors, but the original report is a result of |
My reproducer is unrelated to _after_fork().
Apparently, getting a reference to the object
I believe that it's the same bug in my reproducer and the "after fork" reproducer. |
…ee-threading (pythonGH-127399) (cherry picked from commit 45c5cba) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Crash report
What happened?
On a free-threaded debug build, even with
PYTHON_GIL=1
, it's possible to abort the interpreter by calling_DummyThread._after_fork
after a__reduce__
call:Abort message:
Found using fusil by @vstinner.
CPython versions tested on:
3.13, 3.14, CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.14.0a2+ experimental free-threading build (heads/main:0af4ec3, Nov 20 2024, 21:48:16) [GCC 13.2.0]
Linked PRs
__class__
in free-threading #127399__class__
in free-threading (GH-127399) #127422The text was updated successfully, but these errors were encountered: