MétaCan
Menu
Back to cohort
Record W7132910493

PyTsan: Automated Data Race Detection in Python Programs

2025· dissertation· W7132910493 on OpenAlex

Why this work is in the frame

A frame that forgets how it found something cannot be audited. These are the routes that admitted this work.

fundA Canadian funder is recorded on the work.
no affNo Canadian affiliation: this work is invisible to an affiliation-only frame.
No Canadian affiliation. An affiliation-only frame, the usual design, would never have seen this work. It is one of the works that make the case for inverting the frame.

Bibliographic record

VenueTSpace · 2025
Typedissertation
Language
FieldComputer Science
TopicComputational Physics and Python Applications
Canadian institutionsnot available
FundersUniversity of Toronto
KeywordsPython (programming language)InterpreterCompilerSoftwareMIT LicenseCompiled language
DOInot available

Abstract

fetched live from OpenAlex

Python and its ecosystem have become integral to modern software development. Despite Python’s popularity, CPython, the reference implementation, has significant performance limitations compared with other widely used programming language implementations. In particular, while CPython supports threads and concurrency, it also uses a global interpreter lock (GIL) to synchronize the execution of Python code. As a result, developers both intentionally and unintentionally overlook subtle synchronization details when writing Python code. In 2023, CPython finally added a build option to compile a “free-threaded” variant of CPython without a GIL. The long-existing GIL minimizes the likelihood of unsynchronized code manifesting as bugs, but such races easily start appearing in a free-threaded build of CPython. In this thesis, we present PyTsan, a dynamic data race detector designed for Python, capable of methodologically detecting hard-to-find data races. When running it on CPython 3.10’s standard library test suite, PyTsan reports 29 data races. Two of those data races were reported by others experimenting with CPython’s new free-threaded build, but had otherwise existed undetected for over 10 years. Furthermore, PyTsan shows that for one of the “fixed” bugs, on architectures other than x86/amd64, such as ARM or RISC-V, the merged resolution is insufficient.

Fetched live from OpenAlex and de-inverted. Abstracts are not stored in this database: the inverted indexes are 8.6 GB of the frame’s 9.3 GB of text, and the host has 13 GB free.

Full frame distilled prediction

Teacher imitation

Not calibrated prevalence, not ground truth. Human validation pending. Learned from the 10,348 direct Codex labels and 10,348 direct Gemma labels. Candidate is the union of thresholded teacher heads; consensus is their intersection. These outputs are machine_predicted_unvalidated and are not human labels or direct frontier model labels.

metaresearch head score (Codex)0.001
metaresearch head score (Gemma)0.000
Version: codex-gemma-dda1882f352aValidation status: machine_predicted_unvalidated
Candidate categoriesMeta-epidemiology (narrow)
Consensus categoriesnone
DomainCandidate signal: none · Consensus signal: none
Study designCandidate signal: Simulation or modeling · Consensus signal: none
GenreCandidate signal: Empirical · Consensus signal: none
Teacher disagreement score0.964
Threshold uncertainty score0.999

Codex and Gemma teacher scores by category

CategoryCodexGemma
Metaresearch0.0010.000
Meta-epidemiology (narrow)0.0010.001
Meta-epidemiology (broad)0.0010.000
Bibliometrics0.0010.004
Science and technology studies0.0000.000
Scholarly communication0.0010.001
Open science0.0030.001
Research integrity0.0000.001
Insufficient payload (model declined to judge)0.0000.000

Machine scores (provisional)

The two teacher heads of the student model, read on this work. A score orders the frame for review; it never asserts a category, and the validation status ships verbatim with every row.

Baseline scores from an immature model (maturity gate not passed, 7 training rounds). Scores rank; they never assert a category.

Opus teacher head0.046
GPT teacher head0.378
Teacher spread0.332 · how far apart the two teachers sit on this one work
Validation statusscore_only:v0-immature-baseline · verbatim from the scoring run: score_only means the number may rank works, and no category label ships from it