Re: gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-16 Thread Bruno Haible via Gnulib discussion list
So, in the end, I don't see any better action than to add a comment: 2025-05-16 Bruno Haible pthread-rwlock tests: Add a comment. Reported by Natanael Copa in . * tests/test-pthread-rwlock.c:

Re: gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-16 Thread Bruno Haible via Gnulib discussion list
Natanael Copa wrote: > > It passed with chrt --fifo (I had to do it from outside the LXC container): > > > > # time chrt --fifo 10 ./test-pthread-rwlock > > Starting test_rwlock ... OK > > real0m 33.00s > > user6m 50.63s > > sys 0m 16.23s I then wrote: > * On x86_64 (Alpine Linux)

Re: gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-15 Thread Bruno Haible via Gnulib discussion list
Rich Felker wrote: > No, I'm saying that it's impossible to make a conforming > implementation that prefers writers *in general*, and that, at least > as you've described them, the above two implementstions "prefer > readers" most of the time in the heavily contended case with multiple > readers (a

Re: gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-15 Thread Bruno Haible via Gnulib discussion list
I wrote: > I did a survey of the various behaviours of rwlock implementations [1]. > Find the results there [2]. > [1] > https://gitweb.git.savannah.gnu.org/gitweb/?p=gnulib/maint-tools.git;a=tree;f=test-programs/pthread-rwlock;h=bc63cb8ee32bf508f0b7daab6f367fd507786a2b;hb=HEAD > [2] > https://g

Re: gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-14 Thread Bruno Haible via Gnulib discussion list
Natanael Copa wrote: > So the test is completely meaningless to verify if gettext will work or > not Correct. The only reason that this test is packaged in the gettext tarball is that gettext needs the 'pthread-once' module, and the unit test of the 'pthread-once' module (test-pthread-once2.c) nee

Re: gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-14 Thread Rich Felker
On Wed, May 14, 2025 at 06:08:43PM +0200, Bruno Haible wrote: > Rich Felker wrote: > > 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. > > Yes, that's the phen

Re: gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-14 Thread Bruno Haible via Gnulib discussion list
Rich Felker wrote: > 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. Yes, that's the phenomenon known as "writer starvation". > This is necessitated by > POSIX rw

Re: gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-14 Thread Natanael Copa
On Wed, 14 May 2025 10:44:35 -0400 Rich Felker wrote: > 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 > >

Re: gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-14 Thread Rich Felker
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 "n

Re: gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-14 Thread Bruno Haible via Gnulib discussion list
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". Bruno

Re: gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-14 Thread Bruno Haible via Gnulib discussion list
Natanael Copa wrote: > Note that there are 64 CPU cores. I have only tested with that many cores on > aarch64. You could vary the number of CPU cores using the 'taskset' command. What I see in an Alpine Linux 3.20 / x86_64 VM: $ time taskset -c 0,1,2,3,4,5,6,7 ./test-pthread-rwlock real time 0.

Re: gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-14 Thread Rich Felker
On Wed, May 14, 2025 at 02:07:04PM +0200, Natanael Copa wrote: > [Adding Rich Felker to CC] > > On Tue, 13 May 2025 18:05:50 +0200 > Bruno Haible wrote: > > > Natanael Copa wrote: > > > > So, you could try to install a different scheduler by default and repeat > > > > the test. > > > > > > It

Re: gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-14 Thread Natanael Copa
[Adding Rich Felker to CC] On Tue, 13 May 2025 18:05:50 +0200 Bruno Haible wrote: > Natanael Copa wrote: > > > So, you could try to install a different scheduler by default and repeat > > > the test. > > > > It passed with chrt --fifo (I had to do it from outside the LXC container): > > > >

Re: gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-13 Thread Bruno Haible via Gnulib discussion list
Natanael Copa wrote: > > So, you could try to install a different scheduler by default and repeat > > the test. > > It passed with chrt --fifo (I had to do it from outside the LXC container): > > # time chrt --fifo 10 ./test-pthread-rwlock > Starting test_rwlock ... OK > real 0m 33.00s > user 6

Re: gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-13 Thread Natanael Copa
On Tue, 13 May 2025 12:40:58 +0200 Bruno Haible wrote: > [Dropping bug-gettext from CC.] > > Natanael Copa wrote: > > The test-pthread-rwlock fails on a riscv64 Alpine Linux system with 64 > > cpu cores. The test passes on x86_64 and aarch64. > > > > ... > >

Re: gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-13 Thread Bruno Haible via Gnulib discussion list
[Dropping bug-gettext from CC.] Natanael Copa wrote: > The test-pthread-rwlock fails on a riscv64 Alpine Linux system with 64 > cpu cores. The test passes on x86_64 and aarch64. > > ... > > Testsuite summary for gettext-

gettext-tools 0.24.1 test-pthread-rwlock fails on Alpine Linux riscv64

2025-05-13 Thread Natanael Copa
Hi! The test-pthread-rwlock fails on a riscv64 Alpine Linux system with 64 cpu cores. The test passes on x86_64 and aarch64. ... Testsuite summary for gettext-tools 0.24.1