On Wed, May 14, 2025 at 04:15:07PM +0200, Bruno Haible wrote:
> Rich Felker wrote:
> > AFAICT the code is in tests/test-lock.c from the gnulib repo and calls
> > the gl_rwlock_* functions, which should be using the gnulib condvar
> > based implementation.
> 
> Yes, right. Confirmed by looking at "nm test-lock".

On further review, though, the failing test seems to be
test-pthread-rwlock...

It's using the raw pthread lock and it's completely expected that it
fails with >10 cores since there will always be multiple readers
scheduled and no chance for a writer to run. This is necessitated by
POSIX rwlocks being required to be recursive and the impossibility of
making recursive locking only possible for threads which already hold
a read lock (due to impossibility to track that in O(1) storage).

Rich

Reply via email to