theolaurent / ocaml-reagent

An implementation of reagents for multicore OCaml
ISC License
4 stars 0 forks source link

"MSQueue.push: broken invariant." on test/sum_queue #7

Open kayceesrk opened 9 years ago

kayceesrk commented 9 years ago

Intermittent failures on test/sum_queue under the multicore scheduler.

theolaurent commented 9 years ago

Also this example sometimes does not terminate... Anyway it is clearly non-deterministic. That's a problem...

theolaurent commented 9 years ago

Does this bug still occur with the new runtime?

kayceesrk commented 9 years ago

Yep. Also, the program gets stuck at Fetching Sums:

Domain [0], Worker [9]: Dequeuing 9998
Domain [0], Worker [9]: Dequeuing 9999
Domain [0], Worker [9]: Posting 9499500
Fetching sums
(stuck forever)
theolaurent commented 9 years ago

Ok. About the broken invariant, it seems that the lock freedom assumption on the CAS is wrong. (because of the current kCAS implementation) right now, we work around by changing the queue implementation, but that is WRONG.