[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: pthread rdwr locks

Howard Chu wrote:
I just noticed that we're explicitly disabling support for native rdwr locks in ldap_int_thread.h, and it's been that way since 2000. Any reason not to use the native locks instead of our emulation routines?

The reason I ask is that on Linux I'm running into situations where pthread_cond_signal appears to not wake up the waiting threads. Since our rdwr locks are implemented with condition variables, they occasionally hang (with zero active and waiting readers and writers). I first started running into this consistently while developing the threaded indexer code (and wrote around it there) but it's also happening very infrequently on long running slapd tasks. I guess I need to write a small test program to demonstrate the bug and send it to the glibc or kernel folks. I was hoping that using the native rdwr locks may bypass the problem for now.

 -- Howard Chu
 Chief Architect, Symas Corp.  http://www.symas.com
 Director, Highland Sun        http://highlandsun.com/hyc
 OpenLDAP Core Team            http://www.openldap.org/project/