-
Notifications
You must be signed in to change notification settings - Fork 16
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
[ocaml5-issue] dummy found!
in Lin Dynarray stress test with Domain
on musl trunk
#528
Comments
It shouldn’t be, and yet it seems that it is. I guess my next move, if I wanted to track this, would be to modify the test to return a Cc-ing @gasche who might be interested to know. |
It looks like you found a bug in the implementation indeed. What is the set of operations that are used in this test? Slightly more information: there is a dynamic check in the Dynarray implementation that should ensures that we fail with an exception instead of ever returning a dummy value. Here this check does not suffice to guarantee this property. Different dynarrays may have different dummy values (but only marshalling creates distinct dummies, and I suppose you don't exercise it?), and it may be the case that an implementation bug causes two different dummies to be mixed up in the same backing array, which would result in the dynamic check being incomplete. For example, the implementation of |
I suppose that the operations being exercised are the ones listed in multicoretests/src/dynarray/lin_tests.ml Lines 17 to 32 in 05a5ac9
I see in particular that |
Thanks for the feedback both! 🙏
The test just exercises the operations you list above. Indeed neither I'll see if I can create a reproducer. A few quick local experiments however indicate that this is a rare, hard-to reproduce one, which also explain why it hasn't shown up before. Further note, that it showed up on a |
dummy found!
in Lin Dynarray stress test with Domain
on musl trunkdummy found!
in Lin Dynarray stress test with Domain
on musl trunk
On #521 the musl trunk workflow triggered a
dummy found!
error exiting theLin Dynarray
stress test:https://github.com/ocaml-multicore/multicoretests/actions/runs/12846368030/job/35821476446?pr=521
This is caused by these lines implementing a
get
instrumented with a tag check:multicoretests/src/dynarray/lin_tests.ml
Lines 11 to 13 in a166b24
IIUC, this means the test is observing a non-int dummy value from the unboxed implementation from ocaml/ocaml#12885.
A code comment in stdlib/dynarray.ml reads:
At the same time, the module is documented to be unsafe for parallel usage:
Can we conclude that parallel usage may be type unsafe? Ping @OlivierNicole: WDYT? 🤔
The text was updated successfully, but these errors were encountered: