concurrencykit / ck

Concurrency primitives, safe memory reclamation mechanisms and non-blocking (including lock-free) data structures designed to aid in the research, design and implementation of high performance concurrent systems developed in C99+.
http://concurrencykit.org/
Other
2.38k stars 313 forks source link

ck_bytelock test failures #128

Closed kev009 closed 4 years ago

kev009 commented 6 years ago

Comments from @pkhuong and @cota:

[Monday, 30 July 2018] [10:04:33 MST] <pkhuong> cota: I think ck_bytelock's design is known to be broken
[Monday, 30 July 2018] [10:24:17 MST] <cota> pkhuong: thx, won't report it then :-)
[Monday, 30 July 2018] [10:27:27 MST] <pkhuong> actual breakage is good to know. maybe we should just get rid of it
[Monday, 30 July 2018] [10:27:55 MST] <pkhuong> IIUC, at the time, the design was broken according to the memory model, but seemed to work fine in practice

on amd64:

[Monday, 30 July 2018] [09:49:30 MST] <cota> Waiting for threads to finish correctness regression...ERROR [RD:113]: 3 != 0

On ppc64:

make[2]: Entering directory '/home/kev009/ck/regressions/ck_bytelock/validate'
./validate 176 1
Creating threads (mutual exclusion)...done
Waiting for threads to finish correctness regression...ERROR [RD:113]: 1 != 0
ERROR [WR:76]: 1 != 0
ERROR [WR:76]: 1 != 0
sbahra commented 5 years ago

Yes, this technically violates x86-TSO model and is a known issue. Here primarily for research purposes. It is probably a small fix to mitigate this, ping me on Facebook or IRC when you get free cycles and we can work on it? Should be 30 minutes or less.

sbahra commented 4 years ago

@kev009 feel free to open this up next time you want to look. We could pair on it over a Hangout if you're interested!

ck_bytelock is more of a research / reference implementation for something that was broken in the literature implementation as well. It's known to violate the memory model.