-
Notifications
You must be signed in to change notification settings - Fork 16
Add STM Array tearing test #551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Note: the fix has now been merged to trunk (5.5) and cherry picked to (the forthcoming) 5.4: ocaml/ocaml#13950 The test should probably be disabled on ocaml.5.3 and below though... |
Ah, so the musl.5.3 workflow triggered a test failure, where
There's a lot of visual noise in this counterexample, as only 1-2 1-bits give rise to a slew of decimal digits. |
CI summary for 28e142a: all 36 workflows passed (i.e., no tearing was triggered on musl.5.3) I'm pushing a couple of other commits:
|
Tearing triggered again and illustrates the less noisy hex printing of elements.
The test still needs a guard to only trigger on >5.3 to limit future CI alarms, but should otherwise be good to go... |
64e9e94
to
aa871d0
Compare
CI summary for aa871d0 (rebased on I've also experimented a bit with the suggestion of switching to heap-allocated array elements (say As such, it seems reasonable to go with the current PR. Merging. |
CI summary for merge to |
This is the
STM Array
tearing test mentioned in #528 (comment)As mentioned there, this is written as a separate STM test to not "just" trigger sequential consistency counterexamples, but instead test for powers-of-2, without the need for a model (read: sans model updates).
The test is in a decent state ATM. The last focused run with 50 repetitions triggered 14 and 23 counterexamples on the two musl workflows - a much better error rate than the
Lin Dynarray
misbehaving test we started with... 🙂I'm still considering @gasche's idea of using an
option
element type though, as tearing of those would generally lead to invalid pointers - and therefore a likely crash.