From 9f60b6ea108b625affe5aef745443c8422c8d64f Mon Sep 17 00:00:00 2001 From: Steve Vinoski Date: Sun, 21 Feb 2016 20:32:40 -0500 Subject: Skip run queue lock check for dirty schedulers The wake_scheduler function asserts that the run queue is not locked, but this assertion sometimes fails for dirty schedulers (in January 2016 a user in erlang-questions reported a dirty schedulers problem related to this). After discussing it with Rickard, we decided modifying the assertion was the most practical way to address the problem. --- erts/emulator/beam/erl_process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'erts') diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index b7499c5b5a..fd29c22810 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -3250,7 +3250,8 @@ wake_scheduler(ErtsRunQueue *rq) * so all code *should* handle this without having * the lock on the run queue. */ - ERTS_SMP_LC_ASSERT(!erts_smp_lc_runq_is_locked(rq)); + ERTS_SMP_LC_ASSERT(!erts_smp_lc_runq_is_locked(rq) + || ERTS_RUNQ_IX_IS_DIRTY(rq->ix)); ssi = rq->scheduler->ssi; -- cgit v1.2.3