Notes |
|
(0001081)
|
wangp
|
2020-04-17 13:40
|
|
I found that I can reproduce this without parallel conjunction. The following command fails reliably on my machine. (parallel is GNU parallel; closeable_channel_test is from tests/hard_coded)
parallel ./closeable_channel_test >/dev/null ::: `seq 1 1000`
When the assertion in MR_verify_final_engine_sleep_sync fails, the value of esync->d.es_action is always MR_ENGINE_ACTION_SHUTDOWN. |
|
|
(0001082)
|
wangp
|
2020-04-17 17:34
|
|
In MR_do_idle_worksteal we have:
switch (esync->d.es_action) {
case MR_ENGINE_ACTION_SHUTDOWN:
action_shutdown_ws_engine();
Then the call sequence goes:
action_shutdown_ws_engine -> MR_finalize_thread_engine -> MR_shutdown_engine_for_threads -> MR_verify_final_engine_sleep_sync
Nothing changes esync->d.es_action before MR_verify_final_engine_sleep_sync asserts its value:
assert(esync->d.es_action == MR_ENGINE_ACTION_NONE);
So the fix is either to widen the assertion, or to set esync->d.es_action = MR_ENGINE_ACTION_NONE somewhere after switching on it. |
|
|
(0001083)
|
wangp
|
2020-04-20 15:06
|
|
|