Some Chapel tests fail on Apple Mx hw and fast context swap on
As reported by @ronawho
I'm seeing failures for a couple types of tests.
One failure for tests that sleep, here it seems like when doing sleeps from different tasks only some of the tasks actually sleep. Our sleep code is implemented here. If I switch to always using the gettimeofday code instead of the qtimer code then sleeps seem to work correctly. I thought maybe the mach timer initialization in qthreads was racy, but doing a serial timer creation during serial init didn't seem to help
In another mode, multiples tasks adding to a data structure protected by a lock seems to be racy in some way.
I don't have any standalone qthread reproducers yet, but some of the chapel tests are:
$CHPL_HOME/test/domains/sungeun/assoc/parSafeMember.chpl $CHPL_HOME/test/parallel/begin/deitz/test_begin5.chpl
These tests pass with fastcontext disabled, and I'm not sure how to go about debugging offhand. Probably the starting point is to get standalone qthread reproducers.
Further discussion: https://github.com/Qthreads/qthreads/pull/110