-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Crash when free-threaded Python is built with --with-trace-refs
#124043
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
Comments
At a glance, looks like this could be a data race. I'll take a look. |
Ah, @encukou, this needs pending. |
Let's disable |
concurrent.futures.ThreadPoolExecutor
when num_futures
> num_workers
on free-threaded Python--with-trace-refs
in free-threaded Python
--with-trace-refs
in free-threaded Python--with-trace-refs
I've created #124078 for this. |
…124078) Tracing references is not currently thread-safe in the free-threaded build.
…il` (pythonGH-124078) Tracing references is not currently thread-safe in the free-threaded build. (cherry picked from commit 3b45df0) Co-authored-by: Peter Bierma <[email protected]>
…il` (python#124078) Tracing references is not currently thread-safe in the free-threaded build.
Should this get closed, or are we planning on merging the backport before 3.13.0? |
There's no free-threading before 1.13, so I don't think we should no backports there. |
I'm not totally sure, I've seen core devs close issues when the only remaining PR is for 3.13, because the branch is locked (but I've also seen other core devs leave issues open, so I don't know). |
I think everything is done here. Thank you for the report, @XuehaiPan! |
I think issues should be left open until all backports done. The right sidebar of PRs have a |
Uh oh!
There was an error while loading. Please reload this page.
Crash report
What happened?
I'm using
ThreadPoolExecutor
to write tests for free-threading enabled C extensions.When running concurrent threads larger thanCPython crashes whennum_workers
, CPython crashes.num_futures >= 2
if the test function is complex enough.The Python is installed via the following configuration with PyDebug enabled:
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Output from running 'python -VV' on the command line:
Python 3.13.0rc2+ experimental free-threading build (heads/3.13:112b1704fa6, Sep 13 2024, 15:34:48) [Clang 15.0.0 (clang-1500.3.9.4)]
Linked PRs
--with-trace-refs
and--disable-gil
#124078--with-trace-refs
and--disable-gil
(GH-124078) #124138The text was updated successfully, but these errors were encountered: