Kludex / Kludex/zuvloop

Stress free-threaded scheduling and shutdown under race detection

Open
#161 0 comments 0 reactions 0 assignees View on GitHub
enhancement github_actions
Dominant language
Python
Stars
62
Forks
3
Avg merge
7h
Merged PRs (30d)
62

Description

Decision: Valid hardening gap.

Evidence: The CPython 3.15 free-threaded job runs the same serial pytest suite as the GIL build. The repository has strong concurrent-producer tests, but it does not repeatedly run independent loops concurrently or race scheduling against stop and teardown under a race detector. The parallel-loop benchmark is excluded from the ordinary correctness suite.

Impact: Incorrect critical-section coverage, non-atomic ownership transitions, and shutdown races can remain invisible while standard and ReleaseSafe tests pass.

Next action: Add a dedicated free-threaded hardening job. Run barrier-synchronized independent loops, concurrent `call_soon_threadsafe` producers, cancellation, stop, and teardown repeatedly. Use TSan if the Zig/CPython toolchain supports it; otherwise use ASan plus aggressive repetition and debug allocators.

Acceptance criteria: The job runs only the free-threaded interpreter, proves the GIL is disabled, has bounded per-test timeouts, and fails on sanitizer reports, hangs, leaked handles, or lost callbacks.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the existing free-threaded CPython 3.15 job, the serial pytest suite, and the excluded parallel-loop benchmark. Read how CI selects the interpreter and configure repeated barrier-synchronized loops, producers, cancellation, stop, and teardown with bounded timeouts. Done means the job proves the GIL is disabled and fails on sanitizer reports, hangs, leaked handles, or lost callbacks.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, zig
Domain
backend, ci-cd, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.