Author: Remi Meier <remi.me...@gmail.com> Branch: c8-reshare-pages Changeset: r2155:ed6411636c6f Date: 2018-03-19 15:42 +0100 http://bitbucket.org/pypy/stmgc/changeset/ed6411636c6f/
Log: do not check for safepoint in the become_inev(DONT_WAIT) case there is a deadlock if stm_next_to_finalize() calls become_inevitable while keeping the g_finalizers.lock; and _commit_finalizers() just spins while trying to acquire it. In that case, the second thread will not enter a safepoint ever, so all other threads are waiting. This commit *should* fix it by really not waiting in become_inevitable when DONT_SLEEP is passed as the option. diff --git a/c8/stm/core.c b/c8/stm/core.c --- a/c8/stm/core.c +++ b/c8/stm/core.c @@ -1594,9 +1594,9 @@ retry_from_start: assert(STM_PSEGMENT->transaction_state == TS_REGULAR); - _stm_collectable_safe_point(); if (msg != MSG_INEV_DONT_SLEEP) { + _stm_collectable_safe_point(); dprintf(("become_inevitable: %s\n", msg)); if (any_soon_finished_or_inevitable_thread_segment() && _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit