8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
test_capi.test_lock_two_threads
1 parent 1734b29 commit a93ff87Copy full SHA for a93ff87
Modules/_testinternalcapi/test_lock.c
@@ -57,7 +57,10 @@ lock_thread(void *arg)
57
_Py_atomic_store_int(&test_data->started, 1);
58
59
PyMutex_Lock(m);
60
- assert(m->_bits == 1);
+ // gh-135641: in rare cases the lock may still have `_Py_HAS_PARKED` set
61
+ // (m->_bits == 3) due to bucket collisions in the parking lot hash table
62
+ // between this mutex and the `test_data.done` event.
63
+ assert(m->_bits == 1 || m->_bits == 3);
64
65
PyMutex_Unlock(m);
66
assert(m->_bits == 0);
0 commit comments