Hi Martin,
Martin Willi wrote,
Hi,
I'm hitting an issue with the assembler implementation of
pthread_cond_wait() that is used on x86_64 with nptl.
If a thread is canceled while waiting in pthread_cond_wait(), the
condvar seems be left in an inconsistent state. A different thread
first calling pthread_cond_signal()t then gets blocked in
pthread_cond_destroy(). It seems that the function falsely assumes that
there are other waiters in the condvar.
The test program below reproduces the issue, blocking in
pthread_cond_destroy(). Switching to the C implementation on x86_64
fixes the problem here.
A trivial fix would just switch back to the C implementation, basically
revert e928e223fd. That commit, however, states that the generic
implementations are broken on x86_64. I couldn't reproduce that,
though.
Has anybody else seen pthread_cond_wait() issues on x86_64?
The test failures for x86_64 are still high:
http://tests.embedded-test.org/uClibc-ng/1.0.15/REPORT.x86_64.libc.uClibc-n…
Can you compare with GNU libc pthread_cond_wait()?
Do they use an assembler version or just C?
Thanks,
Waldemar