-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Crash when using _Py_DumpTracebackThreads #128400
Comments
It's probably because accessing fields on another thread state isn't very safe, especially on free-threading. Maybe we should just make a stop-the-world pause for manual invocation of |
Yes, I think that would make sense. |
…ythonGH-128422) (cherry picked from commit c9356fe) Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
@ZeroIntensity - if you're interested in a related follow-up thread safety issue, I think it'd be helpful to make |
Sure, I can do that. |
…GH-128422) (GH-128423) (cherry picked from commit c9356fe) Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Even with the GIL, faulthandler is not safe to use in a multi-threaded process: #116008 |
@dgrisby, yes, but there's a meaningful difference between "mostly works" and "mostly crashes". We'd like to get to the point where faulthandler works about as reliably in the free threading build as it does in the GIL-enabled build, even if that still has bugs. |
This is fixed now |
If that meets your use case, I suppose. The environment I work in, we have long-lived services that must not crash. For us, "mostly works" is equivalent to "too dangerous to use". |
The intention of my comment was to explain why we are bothering with fixes to faulthandler given it's limitations. I'm not suggesting that you use faulthandler. |
…e GIL is disabled (pythonGH-128425)
Crash report
What happened?
This will case the interpreter to segfault if built with
--disable-gil --with-pydebug
. I've bisected it to this commit:b2afe2a: gh-123924
Using gdb:
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.14.0a0 experimental free-threading build (bisect/bad:b2afe2aae48, Jan 1 2025, 17:09:16) [Clang 19.1.6 (++20241217105838+657e03f8625c-1
exp120241217105944.74)]Linked PRs
faulthandler
#128422faulthandler
(GH-128422) #128423faulthandler
if the GIL is disabled #128425The text was updated successfully, but these errors were encountered: