3 ms·
They don't need a patch from me, they need the will to DTRT and at least revert the commit [0] that broke things. Glibc has had a functioning pthread_cond_t th
by pengaru 4y ago
They don't need a patch from me, they need the will to DTRT and at least revert the commit [0] that broke things. Glibc has had a functioning pthread_cond_t that didn't randomly deadlock/lose wakeups, this isn't some impossible to implement feature.
That commit claims to fix ordering guarantees required by the clarified spec, but in doing so has introduced real deadlock bugs.
The linked discussion at [1] is telling. It seems glibc's nptl is prioritizing playing games with optimizations over correctness, even before [0] landed.
To suggest all that's required is someone showing up with a patch is to completely ignore the fact that there's zero shortage of correct pthread_cond_t implementations all over the place. This is a maintenance failure, not a lack of code.
[0] https://github.com/bminor/glibc/commit/ed19993b5b0d05d62cc883571519a67dae481a14 https://github.com/bminor/glibc/commit/ed19993b5b0d05d62cc88...
[1] https://austingroupbugs.net/view.php?id=609 https://austingroupbugs.net/view.php?id=609
- gpderetta 4y agoReverting that commit will break other stuff that depends on the posix behavior, not sure how's that better. I also very much do not think that there are plenty of correct pthread_cond_t, far from it. It is possible that the musl one might be close to drop in replacement (although IIRC, musl at some point had a different thread cancellation implementation than glibc).