-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
test_pendingcalls_threaded times out on Windows free-threading builds #114746
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
I cannot reproduce on my Windows 11 (10.0.22621.3007) VM :( Faulthandler tracebacks (with source lines added):
|
On my Win10 fresh debug nogil build, test.test_capi paused several minutes on |
@colesbury Is this a high-priority issue for you, or normal behaviour at this stage of the feature? |
@encukou I'm planning to put out a PR to fix it today |
The free-threaded build's GC implementation is non-generational, but was scheduled as if it were collecting a young generation leading to quadratic behavior. This increases the minimum threshold and scales it to the number of live objects as we do for the old generation in the default build. Note that the scheduling is still not thread-safe without the GIL. Those changes will come in later PRs. A few tests, like "test_sneaky_frame_object" rely on prompt scheduling of the GC. For now, to keep that test passing, we disable the scaled threshold after calls like `gc.set_threshold(1, 0, 0)`.
The free-threaded build's GC implementation is non-generational, but was scheduled as if it were collecting a young generation leading to quadratic behavior. This increases the minimum threshold and scales it to the number of live objects as we do for the old generation in the default build. Note that the scheduling is still not thread-safe without the GIL. Those changes will come in later PRs. A few tests, like "test_sneaky_frame_object" rely on prompt scheduling of the GC. For now, to keep that test passing, we disable the scaled threshold after calls like `gc.set_threshold(1, 0, 0)`.
The six builds since the PR merged are all green: https://buildbot.python.org/all/#/builders/1241 |
…GH-114817) The free-threaded build's GC implementation is non-generational, but was scheduled as if it were collecting a young generation leading to quadratic behavior. This increases the minimum threshold and scales it to the number of live objects as we do for the old generation in the default build. Note that the scheduling is still not thread-safe without the GIL. Those changes will come in later PRs. A few tests, like "test_sneaky_frame_object" rely on prompt scheduling of the GC. For now, to keep that test passing, we disable the scaled threshold after calls like `gc.set_threshold(1, 0, 0)`.
test.test_capi.test_misc.TestPendingCalls.test_pendingcalls_threaded
usually (but not always) times out on the AMD64 Windows Server 2022 NoGIL 3.x buildbot, e.g. here: https://buildbot.python.org/all/#/builders/1241/builds/1116/steps/4/logs/stdioIt started 5 days ago, after #114262 (Implement GC for free-threaded builds) and #114479 (Make threading.Lock a real class, not a factory function), and it looks like it got more frequent after #113412 (Use pointer for interp->obmalloc state). (This is just from looking at the buildbot logs, I haven't bisected.)
Linked PRs
The text was updated successfully, but these errors were encountered: