GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — gh-117657: Quiet TSAN warnings about remaining non-atomic accesses of `tstate->state` by mpage · Pull Request #118165 · python/cpython Conversation
|
| assert(tstate->state == _Py_THREAD_ATTACHED); |
and the compare/exchange in park_detached_threads():
Lines 2172 to 2173 in fc21c7f
| if (_Py_atomic_compare_exchange_int(&t->state, | |
| &state, _Py_THREAD_SUSPENDED)) { |
This is a false positive due to TSAN modeling failed compare/exchange operations as writes.
TSAN also reports a race (example) between accessing tstate->state in _PySemaphore_Wait():
Line 197 in fc21c7f
| if (tstate && tstate->state == _Py_THREAD_ATTACHED) { |
and the compare/exchange in park_detached_threads() above. This is the same issue that we saw in gh-117830.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…tate` These should be the last instances of TSAN warning of data races when accessing `tstate->state` non-atomically. TSAN reports a race between accessing `tstate->state` in `_PyThreadState_Suspend()` and the compare/exhange in `park_detached_threads`. This is a false positive due to TSAN modeling failed compare/exchange operations as writes. TSAN reports a race between accessing `tstate->state` in `_PySemaphore_Wait()` and the compare/exchange in `park_detached_threads`. This is the same issue that we saw in pythongh-117830.
tstate->statetstate->state
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.