Repository navigation
🐛 fix(test): yield with sleep(0.0) on GraalPy - #939
Merged
Merged
Conversation
On GraalPy 25.4.4, time.sleep(0) with an int sleeps up to a second, while time.sleep(0.0) returns at once. The GIL yields in the threaded lock tests therefore cost a second each, and the weekly GraalPy job ran past its timeout. Pass a float at the three yield points.
The comment blamed a freeze under the threaded lock tests. The stall is the one-second int sleep fixed in the previous commit.
gaborbernat
added a commit
that referenced
this pull request
Nov 16, 2026
This fixes the 14 GraalPy 25.4.4 failures left in the weekly job after #939. The job goes green only with #939 and this PR both merged: #939 removes the threaded timeout, and this PR fixes the remaining failures. Root causes: - **`os.pwrite` missing (8 tests).** Releasing a soft lock whose marker a peer replaced rewrote the record with `os.pwrite`. GraalPy 25.4.4 has no `os.pwrite`, so release raised `AttributeError` instead of returning. `write_at_start` rewinds the descriptor and writes where `pwrite` is absent. This is a library fix. - **Owner recheck skipped (4 recheck tests and `test_live_lock_refuses_a_tree_another_account_planted_after_a_recovery`).** GraalPy has no `os.link` with `dir_fd`, so the soft read-write storage uses protocol directories by name. On POSIX nothing is pinned in that mode, so the sticky-parent owner check made at `prepare()` never ran again. Each call now checks the owner of what the names resolve to. This is a library fix that also applies to any other POSIX platform without that `dir_fd` support. - **`gc.get_objects` missing (1 test).** The async give-up test counts live futures, which needs `gc.get_objects`. It is gated on a new `gc-objects` capability, like the other runtime differences. Verification: - GraalPy 3.13 (25.4.4), full suite, on this PR plus #939: 2689 passed, 357 skipped, no failures and no timeouts. Before, the same suite had 14 failures and aborted on the threaded timeout. - CPython 3.15: 2933 passed, 113 skipped. Coverage is 99.99%. The only missing lines are `tests/test_soft_stale.py:1189-1192`, an AF_UNIX test that skips when the temp path is too long for a socket. It skips here only because this checkout's temp directory path is long.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The weekly GraalPy job ran past its timeout, because the threaded lock tests yield the GIL with
time.sleep(0). On GraalPy 25.4.4 an int0can sleep up to a second, while0.0returns at once (int path rounds the deadline down to the whole second and loops until that second ends), and the 2026-11-09 weekly job was cancelled at its 60 minute limit.🧪 The workflow comment no longer blames a whole-runtime freeze; the job keeps its weekly schedule and stays off pull requests.