| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
The GIL may be disabled concurrently with this call so we need to use a
relaxed atomic load.
|
|
|
| |
Seen in CI occasionally when running `test_weakref`.
|
|
|
|
| |
Due to a limitation in TSAN, all reads from `PyThreadState.state` must be
atomic to avoid reported races.
|
|
|
|
|
| |
Only call `gc_restore_tid()` from stop-the-world contexts.
`worklist_pop()` can be called while other threads are running, so use a
relaxed atomic to modify `ob_tid`.
|
|
|
| |
Fix itertools.count in free-threading mode
|
|
|
|
|
|
|
| |
This ensures we don't lose races that occur in subprocesses or
interleave races from workers running in parallel.
Log files are collected and packaged into a zipfile that can be
downloaded from the "Artifacts" section of the workflow run.
|
|
|
|
|
|
| |
`_Py_qsbr_unregister` is called when the PyThreadState is already
detached, so the access to `tstate->qsbr` isn't safe without locking the
shared mutex. Grab the `struct _qsbr_shared` from the interpreter
instead.
|
|
|
| |
Use relaxed loads/stores when reading/writing to this field.
|
|
|
|
|
|
|
|
|
| |
Using `race:` filters out warnings if the function appears anywhere in
the stack trace. This can hide a lot of unrelated warnings, especially
for a function like `_PyEval_EvalFrameDefault`, which is somewhere on
the stack more often than not.
Change all free-threaded suppressions to `race_top:`, which only matches
the top frame, and add any new suppressions this exposes.
|
|
|
|
|
| |
Use relaxed atomics when reading / writing to the field. There are still a
few places in the GC where we do not use atomics. Those should be safe as
the world is stopped.
|
|
|
|
| |
This is only used by the specializing interpreter and the tier 2
optimizer, both of which are disabled in free-threaded builds.
|
| |
|
| |
|
|
|
|
| |
Fixup TSAN errors for dict
|
| |
|
|
|
|
| |
The load of `ob_ref_local races with stores. Using a relaxed load is
sufficient; stores to the field are relaxed.
|
|
|
| |
Use relaxed load to check if dictkeys are immortal
|
|
|
|
|
|
|
|
| |
Quiet erroneous TSAN reports of data races in `_PySeqLock`
TSAN reports a couple of data races between the compare/exchange in
`_PySeqLock_LockWrite` and the non-atomic loads in `_PySeqLock_{Abandon,Unlock}Write`.
This is another instance of TSAN incorrectly modeling failed compare/exchange
as a write instead of a load.
|
|
|
|
|
|
|
|
|
| |
Fix data races in the method cache in free-threaded builds
These are technically data races, but I think they're benign (to
the extent that that is actually possible). We update cache entries
non-atomically but read them atomically from another thread, and there's
nothing that establishes a happens-before relationship between the
reads and writes that I can see.
|
|
|
|
|
| |
Additionally, reduce the iterations for a few weakref tests that would
otherwise take a prohibitively long amount of time (> 1 hour) when TSAN
is enabled and the GIL is disabled.
|
|
|