On Tue, 13 May 2025 12:40:58 +0200
Bruno Haible <br...@clisp.org> 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.
> > 
> > ...
> > ============================================================================
> > Testsuite summary for gettext-tools 0.24.1
> > ============================================================================
> > # TOTAL: 463
> > # PASS:  389
> > # SKIP:  73
> > # XFAIL: 0
> > # FAIL:  1
> > # XPASS: 0
> > # ERROR: 0
> > ============================================================================
> > See gnulib-tests/test-suite.log for debugging.
> > Some test(s) failed.  Please report this to bug-gett...@gnu.org,
> > together with the test-suite.log file (gzipped) and your system
> > information.  Thanks.
> > ============================================================================
> > ...
> > ncopa-edge-riscv64:~/aports/main/gettext/src/gettext-0.24.1/gettext-tools$ 
> > cat gnulib-tests/test-suite.log 
> > =======================================================
> >    gettext-tools 0.24.1: gnulib-tests/test-suite.log
> > =======================================================
> > 
> > # TOTAL: 463
> > # PASS:  389
> > # SKIP:  73
> > # XFAIL: 0
> > # FAIL:  1
> > # XPASS: 0
> > # ERROR: 0
> > 
> > System information (uname -a): Linux 6.1.80-0-sophgo #1-Alpine SMP PREEMPT 
> > Mon, 26 Aug 2024 10:06:58 +0000 riscv64
> > Distribution information (/etc/os-release):
> > NAME="Alpine Linux"
> > ID=alpine
> > VERSION_ID=3.22.0_alpha20250108
> > PRETTY_NAME="Alpine Linux edge"
> > HOME_URL="https://alpinelinux.org/";
> > BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues";
> > 
> > .. contents:: :depth: 2
> > 
> > FAIL: test-pthread-rwlock
> > =========================
> > 
> > Starting test_rwlock ...Alarm clock
> > FAIL test-pthread-rwlock (exit status: 142)
> > 
> > ncopa-edge-riscv64:~/aports/main/gettext/src/gettext-0.24.1/gettext-tools$ 
> > grep RWLOCK config.h
> > #define GNULIB_TEST_PTHREAD_RWLOCK 1
> > #define HAVE_PTHREAD_RWLOCK 1
> > /* #undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER */
> > /* #undef PTHREAD_RWLOCK_BAD_WAITQUEUE */
> > /* #undef PTHREAD_RWLOCK_LACKS_TIMEOUT */
> > /* #undef PTHREAD_RWLOCK_UNIMPLEMENTED */
> > 
> > ncopa-edge-riscv64:~/aports/main/gettext/src/gettext-0.24.1/gettext-tools$ 
> > lscpu
> > Architecture:           riscv64
> >   Byte Order:           Little Endian
> > CPU(s):                 64
> >   On-line CPU(s) list:  0-63  
> 
> Thanks for the report.
> 
> I can think of two possible explanations for the test failure:
> 
> a) riscv64 CPUs are significantly slower than x86_64 or arm64 CPUs.
>    (The timeout set in test-pthread-rwlock.c is currently independent of
>    the CPU architecture.)
> 
> b) The test is known to be sensitive to the kernel's scheduling policy. [1]
>    Since in Linux, the scheduling policy can be customized [2][3], the
>    question arises whether in Alpine Linux, the default scheduling policy
>    is a fair one.

I believe the default scheduling policy is a fair one:

# grep SCHED /boot/config-6.1.80-0-sophgo 
CONFIG_GENERIC_SCHED_CLOCK=y
CONFIG_CGROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
# CONFIG_RT_GROUP_SCHED is not set
CONFIG_SCHED_AUTOGROUP=y
# CONFIG_SCHED_MC is not set
CONFIG_SCHED_CLUSTER=y
# CONFIG_SCHED_SMT is not set
CONFIG_SCHED_HRTICK=y
CONFIG_MQ_IOSCHED_DEADLINE=m
CONFIG_MQ_IOSCHED_KYBER=m
CONFIG_IOSCHED_BFQ=m
CONFIG_BFQ_GROUP_IOSCHED=y
CONFIG_NET_SCHED=y
CONFIG_DRM_SCHED=m
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_SCHED_INFO=y

> 
> 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    6m 50.63s
sys     0m 16.23s

I also verified that it still times out from outside the LXC container with the 
default:

# time ./test-pthread-rwlock
Starting test_rwlock ...Command terminated by signal 14
real    10m 0.01s
user    1h 46m 24s
sys     2m 59.39s


# time chrt --rr 10 ./test-pthread-rwlock
Starting test_rwlock ... OK
real    0m 30.00s
user    6m 2.07s
sys     0m 19.16s

# time chrt --rr 99 ./test-pthread-rwlock
Starting test_rwlock ... OK
real    0m 30.00s
user    6m 9.40s
sys     0m 13.37s

So even if the CPU cores are slow, they appear to finish in ~30 sec.

chrt --other and chrt --idle appears to trigger the deadlock.

> 
> Bruno
> 
> [1] https://lists.gnu.org/r/bug-gnulib/2017-01/msg00010.html
> [2] https://man7.org/linux/man-pages/man7/sched.7.html
> [3] 
> https://mostlynerdless.de/blog/2024/12/03/hello-ebpf-control-task-scheduling-with-a-custom-scheduler-written-in-java-16/
> 
> 
> 

gdb backtraces for each thread:

Attaching to process 6707
[New LWP 6739]
[New LWP 6738]
[New LWP 6737]
[New LWP 6736]
[New LWP 6735]
[New LWP 6734]
[New LWP 6733]
[New LWP 6732]
[New LWP 6731]
[New LWP 6730]
[New LWP 6729]
[New LWP 6728]
[New LWP 6727]
[New LWP 6726]
[New LWP 6725]
[New LWP 6724]
[New LWP 6723]
[New LWP 6722]
[New LWP 6721]
[New LWP 6720]
__cp_end () at src/thread/riscv64/syscall_cp.s:27

warning: 27     src/thread/riscv64/syscall_cp.s: No such file or directory
(gdb) info threads
  Id   Target Id                  Frame 
* 1    LWP 6707 "test-pthread-rw" __cp_end () at 
src/thread/riscv64/syscall_cp.s:27
  2    LWP 6739 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483645, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  3    LWP 6738 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483643, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  4    LWP 6737 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483644, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  5    LWP 6736 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483643, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  6    LWP 6735 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483644, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  7    LWP 6734 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483646, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  8    LWP 6733 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483643, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  9    LWP 6732 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483643, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  10   LWP 6731 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483644, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  11   LWP 6730 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483646, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  12   LWP 6729 "test-pthread-rw" sched_yield () at 
./arch/riscv64/syscall_arch.h:13
  13   LWP 6728 "test-pthread-rw" sched_yield () at 
./arch/riscv64/syscall_arch.h:13
  14   LWP 6727 "test-pthread-rw" sched_yield () at 
./arch/riscv64/syscall_arch.h:13
  15   LWP 6726 "test-pthread-rw" sched_yield () at 
./arch/riscv64/syscall_arch.h:13
  16   LWP 6725 "test-pthread-rw" sched_yield () at 
./arch/riscv64/syscall_arch.h:13
  17   LWP 6724 "test-pthread-rw" 0x0000003fbafdd472 in a_cas (p=0x2ac006a050 
<my_rwlock>, t=-2147483643, s=-2147483642) at ./arch/riscv64/atomic_arch.h:11
  18   LWP 6723 "test-pthread-rw" 0x0000003fbafdd4c6 in a_cas (p=0x2ac006a050 
<my_rwlock>, t=-2147483644, s=-2147483645) at ./arch/riscv64/atomic_arch.h:11
  19   LWP 6722 "test-pthread-rw" sched_yield () at 
./arch/riscv64/syscall_arch.h:13
  20   LWP 6721 "test-pthread-rw" 0x0000003fbafdd4c6 in a_cas (p=0x2ac006a050 
<my_rwlock>, t=-2147483641, s=-2147483642) at ./arch/riscv64/atomic_arch.h:11
  21   LWP 6720 "test-pthread-rw" 0x0000003fbafdd472 in a_cas (p=0x2ac006a050 
<my_rwlock>, t=-2147483644, s=-2147483643) at  ./arch/riscv64/atomic_arch.h:11
(gdb) bt
#0  __cp_end () at src/thread/riscv64/syscall_cp.s:27
#1  0x0000003fbafdb358 in __syscall_cp_c (nr=98, u=<optimized out>, 
v=<optimized out>, w=<optimized out>, x=<optimized out>, y=<optimized out>, 
z=<optimized out>)
    at src/thread/pthread_cancel.c:33
#2  0x0000003fbafda876 in __futex4_cp (addr=0x3fbae28b48, op=128, val=2, 
to=<optimized out>) at src/thread/__timedwait.c:24
#3  __timedwait_cp (addr=addr@entry=0x3fbae28b48, val=val@entry=2, 
clk=clk@entry=0, at=at@entry=0x0, priv=128, priv@entry=1) at 
src/thread/__timedwait.c:52
#4  0x0000003fbafdc726 in __pthread_timedjoin_np (t=0x3fbae28b20, 
res=res@entry=0x0, at=at@entry=0x0) at src/thread/pthread_join.c:18
#5  0x0000003fbafdc7b4 in __pthread_join (t=<optimized out>, res=res@entry=0x0) 
at src/thread/pthread_join.c:30
#6  0x0000002ac0067d30 in test_rwlock () at test-pthread-rwlock.c:188
#7  main () at test-pthread-rwlock.c:210
(gdb) thread 2
[Switching to thread 2 (LWP 6739)]
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483645, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
warning: 70     ./arch/riscv64/syscall_arch.h: No such file or directory
(gdb) bt
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483645, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
#1  0x0000003fbafda876 in __futex4_cp (addr=0x2ac006a050 <my_rwlock>, op=128, 
val=-2147483645, to=<optimized out>) at src/thread/__timedwait.c:24
#2  __timedwait_cp (addr=addr@entry=0x2ac006a050 <my_rwlock>, 
val=val@entry=-2147483645, clk=clk@entry=0, at=at@entry=0x0, 
priv=priv@entry=128) at src/thread/__timedwait.c:52
#3  0x0000003fbafda928 in __timedwait (addr=addr@entry=0x2ac006a050 
<my_rwlock>, val=-2147483645, clk=clk@entry=0, at=at@entry=0x0, priv=128) at 
src/thread/__timedwait.c:68
#4  0x0000003fbafdd40c in __pthread_rwlock_timedwrlock (rw=<optimized out>, 
at=<optimized out>) at src/thread/pthread_rwlock_timedwrlock.c:18
#5  __pthread_rwlock_timedwrlock (rw=rw@entry=0x2ac006a050 <my_rwlock>, 
at=at@entry=0x0) at src/thread/pthread_rwlock_timedwrlock.c:3
#6  0x0000003fbafdd536 in __pthread_rwlock_wrlock (rw=rw@entry=0x2ac006a050 
<my_rwlock>) at src/thread/pthread_rwlock_wrlock.c:5
#7  0x0000002ac0067fd2 in rwlock_mutator_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:124
#8  0x0000003fbafdbff4 in start (p=0x3fbacedb00) at 
src/thread/pthread_create.c:207
#9  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 3
[Switching to thread 3 (LWP 6738)]
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483643, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
70      in ./arch/riscv64/syscall_arch.h
(gdb) bt
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483643, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
#1  0x0000003fbafda876 in __futex4_cp (addr=0x2ac006a050 <my_rwlock>, op=128, 
val=-2147483643, to=<optimized out>) at src/thread/__timedwait.c:24
#2  __timedwait_cp (addr=addr@entry=0x2ac006a050 <my_rwlock>, 
val=val@entry=-2147483643, clk=clk@entry=0, at=at@entry=0x0, 
priv=priv@entry=128) at src/thread/__timedwait.c:52
#3  0x0000003fbafda928 in __timedwait (addr=addr@entry=0x2ac006a050 
<my_rwlock>, val=-2147483643, clk=clk@entry=0, at=at@entry=0x0, priv=128) at 
src/thread/__timedwait.c:68
#4  0x0000003fbafdd40c in __pthread_rwlock_timedwrlock (rw=<optimized out>, 
at=<optimized out>) at src/thread/pthread_rwlock_timedwrlock.c:18
#5  __pthread_rwlock_timedwrlock (rw=rw@entry=0x2ac006a050 <my_rwlock>, 
at=at@entry=0x0) at src/thread/pthread_rwlock_timedwrlock.c:3
#6  0x0000003fbafdd536 in __pthread_rwlock_wrlock (rw=rw@entry=0x2ac006a050 
<my_rwlock>) at src/thread/pthread_rwlock_wrlock.c:5
#7  0x0000002ac0067fd2 in rwlock_mutator_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:124
#8  0x0000003fbafdbff4 in start (p=0x3fbad10b00) at 
src/thread/pthread_create.c:207
#9  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 4
[Switching to thread 4 (LWP 6737)]
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483644, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
70      in ./arch/riscv64/syscall_arch.h
(gdb) bt
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483644, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
#1  0x0000003fbafda876 in __futex4_cp (addr=0x2ac006a050 <my_rwlock>, op=128, 
val=-2147483644, to=<optimized out>) at src/thread/__timedwait.c:24
#2  __timedwait_cp (addr=addr@entry=0x2ac006a050 <my_rwlock>, 
val=val@entry=-2147483644, clk=clk@entry=0, at=at@entry=0x0, 
priv=priv@entry=128) at src/thread/__timedwait.c:52
#3  0x0000003fbafda928 in __timedwait (addr=addr@entry=0x2ac006a050 
<my_rwlock>, val=-2147483644, clk=clk@entry=0, at=at@entry=0x0, priv=128) at 
src/thread/__timedwait.c:68
#4  0x0000003fbafdd40c in __pthread_rwlock_timedwrlock (rw=<optimized out>, 
at=<optimized out>) at src/thread/pthread_rwlock_timedwrlock.c:18
#5  __pthread_rwlock_timedwrlock (rw=rw@entry=0x2ac006a050 <my_rwlock>, 
at=at@entry=0x0) at src/thread/pthread_rwlock_timedwrlock.c:3
#6  0x0000003fbafdd536 in __pthread_rwlock_wrlock (rw=rw@entry=0x2ac006a050 
<my_rwlock>) at src/thread/pthread_rwlock_wrlock.c:5
#7  0x0000002ac0067fd2 in rwlock_mutator_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:124
#8  0x0000003fbafdbff4 in start (p=0x3fbad33b00) at 
src/thread/pthread_create.c:207
#9  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 5
[Switching to thread 5 (LWP 6736)]
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483643, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
70      in ./arch/riscv64/syscall_arch.h
(gdb) bt
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483643, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
#1  0x0000003fbafda876 in __futex4_cp (addr=0x2ac006a050 <my_rwlock>, op=128, 
val=-2147483643, to=<optimized out>) at src/thread/__timedwait.c:24
#2  __timedwait_cp (addr=addr@entry=0x2ac006a050 <my_rwlock>, 
val=val@entry=-2147483643, clk=clk@entry=0, at=at@entry=0x0, 
priv=priv@entry=128) at src/thread/__timedwait.c:52
#3  0x0000003fbafda928 in __timedwait (addr=addr@entry=0x2ac006a050 
<my_rwlock>, val=-2147483643, clk=clk@entry=0, at=at@entry=0x0, priv=128) at 
src/thread/__timedwait.c:68
#4  0x0000003fbafdd40c in __pthread_rwlock_timedwrlock (rw=<optimized out>, 
at=<optimized out>) at src/thread/pthread_rwlock_timedwrlock.c:18
#5  __pthread_rwlock_timedwrlock (rw=rw@entry=0x2ac006a050 <my_rwlock>, 
at=at@entry=0x0) at src/thread/pthread_rwlock_timedwrlock.c:3
#6  0x0000003fbafdd536 in __pthread_rwlock_wrlock (rw=rw@entry=0x2ac006a050 
<my_rwlock>) at src/thread/pthread_rwlock_wrlock.c:5
#7  0x0000002ac0067fd2 in rwlock_mutator_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:124
#8  0x0000003fbafdbff4 in start (p=0x3fbad56b00) at 
src/thread/pthread_create.c:207
#9  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 6
[Switching to thread 6 (LWP 6735)]
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483644, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
70      in ./arch/riscv64/syscall_arch.h
(gdb) bt
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483644, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
#1  0x0000003fbafda876 in __futex4_cp (addr=0x2ac006a050 <my_rwlock>, op=128, 
val=-2147483644, to=<optimized out>) at src/thread/__timedwait.c:24
#2  __timedwait_cp (addr=addr@entry=0x2ac006a050 <my_rwlock>, 
val=val@entry=-2147483644, clk=clk@entry=0, at=at@entry=0x0, 
priv=priv@entry=128) at src/thread/__timedwait.c:52
#3  0x0000003fbafda928 in __timedwait (addr=addr@entry=0x2ac006a050 
<my_rwlock>, val=-2147483644, clk=clk@entry=0, at=at@entry=0x0, priv=128) at 
src/thread/__timedwait.c:68
#4  0x0000003fbafdd40c in __pthread_rwlock_timedwrlock (rw=<optimized out>, 
at=<optimized out>) at src/thread/pthread_rwlock_timedwrlock.c:18
#5  __pthread_rwlock_timedwrlock (rw=rw@entry=0x2ac006a050 <my_rwlock>, 
at=at@entry=0x0) at src/thread/pthread_rwlock_timedwrlock.c:3
#6  0x0000003fbafdd536 in __pthread_rwlock_wrlock (rw=rw@entry=0x2ac006a050 
<my_rwlock>) at src/thread/pthread_rwlock_wrlock.c:5
#7  0x0000002ac0067fd2 in rwlock_mutator_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:124
#8  0x0000003fbafdbff4 in start (p=0x3fbad79b00) at 
src/thread/pthread_create.c:207
#9  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 7
[Switching to thread 7 (LWP 6734)]
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483646, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
70      in ./arch/riscv64/syscall_arch.h
(gdb) bt
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483646, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
#1  0x0000003fbafda876 in __futex4_cp (addr=0x2ac006a050 <my_rwlock>, op=128, 
val=-2147483646, to=<optimized out>) at src/thread/__timedwait.c:24
#2  __timedwait_cp (addr=addr@entry=0x2ac006a050 <my_rwlock>, 
val=val@entry=-2147483646, clk=clk@entry=0, at=at@entry=0x0, 
priv=priv@entry=128) at src/thread/__timedwait.c:52
#3  0x0000003fbafda928 in __timedwait (addr=addr@entry=0x2ac006a050 
<my_rwlock>, val=-2147483646, clk=clk@entry=0, at=at@entry=0x0, priv=128) at 
src/thread/__timedwait.c:68
#4  0x0000003fbafdd40c in __pthread_rwlock_timedwrlock (rw=<optimized out>, 
at=<optimized out>) at src/thread/pthread_rwlock_timedwrlock.c:18
#5  __pthread_rwlock_timedwrlock (rw=rw@entry=0x2ac006a050 <my_rwlock>, 
at=at@entry=0x0) at src/thread/pthread_rwlock_timedwrlock.c:3
#6  0x0000003fbafdd536 in __pthread_rwlock_wrlock (rw=rw@entry=0x2ac006a050 
<my_rwlock>) at src/thread/pthread_rwlock_wrlock.c:5
#7  0x0000002ac0067fd2 in rwlock_mutator_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:124
#8  0x0000003fbafdbff4 in start (p=0x3fbad9cb00) at 
src/thread/pthread_create.c:207
#9  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 8
[Switching to thread 8 (LWP 6733)]
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483643, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
70      in ./arch/riscv64/syscall_arch.h
(gdb) bt
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483643, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
#1  0x0000003fbafda876 in __futex4_cp (addr=0x2ac006a050 <my_rwlock>, op=128, 
val=-2147483643, to=<optimized out>) at src/thread/__timedwait.c:24
#2  __timedwait_cp (addr=addr@entry=0x2ac006a050 <my_rwlock>, 
val=val@entry=-2147483643, clk=clk@entry=0, at=at@entry=0x0, 
priv=priv@entry=128) at src/thread/__timedwait.c:52
#3  0x0000003fbafda928 in __timedwait (addr=addr@entry=0x2ac006a050 
<my_rwlock>, val=-2147483643, clk=clk@entry=0, at=at@entry=0x0, priv=128) at 
src/thread/__timedwait.c:68
#4  0x0000003fbafdd40c in __pthread_rwlock_timedwrlock (rw=<optimized out>, 
at=<optimized out>) at src/thread/pthread_rwlock_timedwrlock.c:18
#5  __pthread_rwlock_timedwrlock (rw=rw@entry=0x2ac006a050 <my_rwlock>, 
at=at@entry=0x0) at src/thread/pthread_rwlock_timedwrlock.c:3
#6  0x0000003fbafdd536 in __pthread_rwlock_wrlock (rw=rw@entry=0x2ac006a050 
<my_rwlock>) at src/thread/pthread_rwlock_wrlock.c:5
#7  0x0000002ac0067fd2 in rwlock_mutator_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:124
#8  0x0000003fbafdbff4 in start (p=0x3fbadbfb00) at 
src/thread/pthread_create.c:207
#9  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 9
[Switching to thread 9 (LWP 6732)]
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483643, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
70      in ./arch/riscv64/syscall_arch.h
(gdb) bt
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483643, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
#1  0x0000003fbafda876 in __futex4_cp (addr=0x2ac006a050 <my_rwlock>, op=128, 
val=-2147483643, to=<optimized out>) at src/thread/__timedwait.c:24
#2  __timedwait_cp (addr=addr@entry=0x2ac006a050 <my_rwlock>, 
val=val@entry=-2147483643, clk=clk@entry=0, at=at@entry=0x0, 
priv=priv@entry=128) at src/thread/__timedwait.c:52
#3  0x0000003fbafda928 in __timedwait (addr=addr@entry=0x2ac006a050 
<my_rwlock>, val=-2147483643, clk=clk@entry=0, at=at@entry=0x0, priv=128) at 
src/thread/__timedwait.c:68
#4  0x0000003fbafdd40c in __pthread_rwlock_timedwrlock (rw=<optimized out>, 
at=<optimized out>) at src/thread/pthread_rwlock_timedwrlock.c:18
#5  __pthread_rwlock_timedwrlock (rw=rw@entry=0x2ac006a050 <my_rwlock>, 
at=at@entry=0x0) at src/thread/pthread_rwlock_timedwrlock.c:3
#6  0x0000003fbafdd536 in __pthread_rwlock_wrlock (rw=rw@entry=0x2ac006a050 
<my_rwlock>) at src/thread/pthread_rwlock_wrlock.c:5
#7  0x0000002ac0067fd2 in rwlock_mutator_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:124
#8  0x0000003fbafdbff4 in start (p=0x3fbade2b00) at 
src/thread/pthread_create.c:207
#9  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 10
[Switching to thread 10 (LWP 6731)]
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483644, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
70      in ./arch/riscv64/syscall_arch.h
(gdb) bt
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483644, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
#1  0x0000003fbafda876 in __futex4_cp (addr=0x2ac006a050 <my_rwlock>, op=128, 
val=-2147483644, to=<optimized out>) at src/thread/__timedwait.c:24
#2  __timedwait_cp (addr=addr@entry=0x2ac006a050 <my_rwlock>, 
val=val@entry=-2147483644, clk=clk@entry=0, at=at@entry=0x0, 
priv=priv@entry=128) at src/thread/__timedwait.c:52
#3  0x0000003fbafda928 in __timedwait (addr=addr@entry=0x2ac006a050 
<my_rwlock>, val=-2147483644, clk=clk@entry=0, at=at@entry=0x0, priv=128) at 
src/thread/__timedwait.c:68
#4  0x0000003fbafdd40c in __pthread_rwlock_timedwrlock (rw=<optimized out>, 
at=<optimized out>) at src/thread/pthread_rwlock_timedwrlock.c:18
#5  __pthread_rwlock_timedwrlock (rw=rw@entry=0x2ac006a050 <my_rwlock>, 
at=at@entry=0x0) at src/thread/pthread_rwlock_timedwrlock.c:3
#6  0x0000003fbafdd536 in __pthread_rwlock_wrlock (rw=rw@entry=0x2ac006a050 
<my_rwlock>) at src/thread/pthread_rwlock_wrlock.c:5
#7  0x0000002ac0067fd2 in rwlock_mutator_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:124
#8  0x0000003fbafdbff4 in start (p=0x3fbae05b00) at 
src/thread/pthread_create.c:207
#9  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 11
[Switching to thread 11 (LWP 6730)]
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483646, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
70      in ./arch/riscv64/syscall_arch.h
(gdb) bt
#0  __syscall_cp_c (nr=98, u=<optimized out>, v=128, w=-2147483646, x=0, y=0, 
z=0) at ./arch/riscv64/syscall_arch.h:70
#1  0x0000003fbafda876 in __futex4_cp (addr=0x2ac006a050 <my_rwlock>, op=128, 
val=-2147483646, to=<optimized out>) at src/thread/__timedwait.c:24
#2  __timedwait_cp (addr=addr@entry=0x2ac006a050 <my_rwlock>, 
val=val@entry=-2147483646, clk=clk@entry=0, at=at@entry=0x0, 
priv=priv@entry=128) at src/thread/__timedwait.c:52
#3  0x0000003fbafda928 in __timedwait (addr=addr@entry=0x2ac006a050 
<my_rwlock>, val=-2147483646, clk=clk@entry=0, at=at@entry=0x0, priv=128) at 
src/thread/__timedwait.c:68
#4  0x0000003fbafdd40c in __pthread_rwlock_timedwrlock (rw=<optimized out>, 
at=<optimized out>) at src/thread/pthread_rwlock_timedwrlock.c:18
#5  __pthread_rwlock_timedwrlock (rw=rw@entry=0x2ac006a050 <my_rwlock>, 
at=at@entry=0x0) at src/thread/pthread_rwlock_timedwrlock.c:3
#6  0x0000003fbafdd536 in __pthread_rwlock_wrlock (rw=rw@entry=0x2ac006a050 
<my_rwlock>) at src/thread/pthread_rwlock_wrlock.c:5
#7  0x0000002ac0067fd2 in rwlock_mutator_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:124
#8  0x0000003fbafdbff4 in start (p=0x3fbae28b00) at 
src/thread/pthread_create.c:207
#9  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 12
[Switching to thread 12 (LWP 6729)]
#0  sched_yield () at ./arch/riscv64/syscall_arch.h:13
warning: 13     ./arch/riscv64/syscall_arch.h: No such file or directory
(gdb) bt
#0  sched_yield () at ./arch/riscv64/syscall_arch.h:13
#1  0x0000002ac0067f58 in rwlock_checker_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:157
#2  0x0000003fbafdbff4 in start (p=0x3fbae4bb00) at 
src/thread/pthread_create.c:207
#3  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 13
[Switching to thread 13 (LWP 6728)]
#0  sched_yield () at ./arch/riscv64/syscall_arch.h:13
13      in ./arch/riscv64/syscall_arch.h
(gdb) bt
#0  sched_yield () at ./arch/riscv64/syscall_arch.h:13
#1  0x0000002ac0067f58 in rwlock_checker_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:157
#2  0x0000003fbafdbff4 in start (p=0x3fbae6eb00) at 
src/thread/pthread_create.c:207
#3  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 14
[Switching to thread 14 (LWP 6727)]
#0  sched_yield () at ./arch/riscv64/syscall_arch.h:13
13      in ./arch/riscv64/syscall_arch.h
(gdb) bt
#0  sched_yield () at ./arch/riscv64/syscall_arch.h:13
#1  0x0000002ac0067f58 in rwlock_checker_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:157
#2  0x0000003fbafdbff4 in start (p=0x3fbae91b00) at 
src/thread/pthread_create.c:207
#3  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 15
[Switching to thread 15 (LWP 6726)]
#0  sched_yield () at ./arch/riscv64/syscall_arch.h:13
13      in ./arch/riscv64/syscall_arch.h
(gdb) bt
#0  sched_yield () at ./arch/riscv64/syscall_arch.h:13
#1  0x0000002ac0067f58 in rwlock_checker_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:157
#2  0x0000003fbafdbff4 in start (p=0x3fbaeb4b00) at 
src/thread/pthread_create.c:207
#3  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 16
[Switching to thread 16 (LWP 6725)]
#0  sched_yield () at ./arch/riscv64/syscall_arch.h:13
13      in ./arch/riscv64/syscall_arch.h
(gdb) bt
#0  sched_yield () at ./arch/riscv64/syscall_arch.h:13
#1  0x0000002ac0067f58 in rwlock_checker_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:157
#2  0x0000003fbafdbff4 in start (p=0x3fbaed7b00) at 
src/thread/pthread_create.c:207
#3  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 17
[Switching to thread 17 (LWP 6724)]
#0  0x0000003fbafdd472 in a_cas (p=0x2ac006a050 <my_rwlock>, t=-2147483643, 
s=-2147483642) at ./arch/riscv64/atomic_arch.h:11
warning: 11     ./arch/riscv64/atomic_arch.h: No such file or directory
(gdb) bt
#0  0x0000003fbafdd472 in a_cas (p=0x2ac006a050 <my_rwlock>, t=-2147483643, 
s=-2147483642) at ./arch/riscv64/atomic_arch.h:11
#1  __pthread_rwlock_tryrdlock (rw=rw@entry=0x2ac006a050 <my_rwlock>) at 
src/thread/pthread_rwlock_tryrdlock.c:11
#2  0x0000003fbafdd2b0 in __pthread_rwlock_timedrdlock 
(rw=rw@entry=0x2ac006a050 <my_rwlock>, at=at@entry=0x0) at 
src/thread/pthread_rwlock_timedrdlock.c:7
#3  0x0000003fbafdd2a0 in __pthread_rwlock_rdlock (rw=rw@entry=0x2ac006a050 
<my_rwlock>) at src/thread/pthread_rwlock_rdlock.c:5
#4  0x0000002ac0067f70 in rwlock_checker_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:152
#5  0x0000003fbafdbff4 in start (p=0x3fbaefab00) at 
src/thread/pthread_create.c:207
#6  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 18
[Switching to thread 18 (LWP 6723)]
#0  0x0000003fbafdd4c6 in a_cas (p=0x2ac006a050 <my_rwlock>, t=-2147483644, 
s=-2147483645) at ./arch/riscv64/atomic_arch.h:11
warning: 11     ./arch/riscv64/atomic_arch.h: No such file or directory
(gdb) bt
#0  0x0000003fbafdd4c6 in a_cas (p=0x2ac006a050 <my_rwlock>, t=-2147483644, 
s=-2147483645) at ./arch/riscv64/atomic_arch.h:11
#1  __pthread_rwlock_unlock (rw=rw@entry=0x2ac006a050 <my_rwlock>) at 
src/thread/pthread_rwlock_unlock.c:12
#2  0x0000002ac0067f3a in rwlock_checker_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:154
#3  0x0000003fbafdbff4 in start (p=0x3fbaf1db00) at 
src/thread/pthread_create.c:207
#4  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 19
[Switching to thread 19 (LWP 6722)]
#0  sched_yield () at ./arch/riscv64/syscall_arch.h:13
warning: 13     ./arch/riscv64/syscall_arch.h: No such file or directory
(gdb) bt
#0  sched_yield () at ./arch/riscv64/syscall_arch.h:13
#1  0x0000002ac0067f58 in rwlock_checker_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:157
#2  0x0000003fbafdbff4 in start (p=0x3fbaf40b00) at 
src/thread/pthread_create.c:207
#3  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 20
[Switching to thread 20 (LWP 6721)]
#0  0x0000003fbafdd4c6 in a_cas (p=0x2ac006a050 <my_rwlock>, t=-2147483641, 
s=-2147483642) at ./arch/riscv64/atomic_arch.h:11
warning: 11     ./arch/riscv64/atomic_arch.h: No such file or directory
(gdb) bt
#0  0x0000003fbafdd4c6 in a_cas (p=0x2ac006a050 <my_rwlock>, t=-2147483641, 
s=-2147483642) at ./arch/riscv64/atomic_arch.h:11
#1  __pthread_rwlock_unlock (rw=rw@entry=0x2ac006a050 <my_rwlock>) at 
src/thread/pthread_rwlock_unlock.c:12
#2  0x0000002ac0067f3a in rwlock_checker_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:154
#3  0x0000003fbafdbff4 in start (p=0x3fbaf63b00) at 
src/thread/pthread_create.c:207
#4  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 21
[Switching to thread 21 (LWP 6720)]
#0  0x0000003fbafdd472 in a_cas (p=0x2ac006a050 <my_rwlock>, t=-2147483644, 
s=-2147483643) at ./arch/riscv64/atomic_arch.h:11
warning: 11     ./arch/riscv64/atomic_arch.h: No such file or directory
(gdb) bt
#0  0x0000003fbafdd472 in a_cas (p=0x2ac006a050 <my_rwlock>, t=-2147483644, 
s=-2147483643) at ./arch/riscv64/atomic_arch.h:11
#1  __pthread_rwlock_tryrdlock (rw=rw@entry=0x2ac006a050 <my_rwlock>) at 
src/thread/pthread_rwlock_tryrdlock.c:11
#2  0x0000003fbafdd2b0 in __pthread_rwlock_timedrdlock 
(rw=rw@entry=0x2ac006a050 <my_rwlock>, at=at@entry=0x0) at 
src/thread/pthread_rwlock_timedrdlock.c:7
#3  0x0000003fbafdd2a0 in __pthread_rwlock_rdlock (rw=rw@entry=0x2ac006a050 
<my_rwlock>) at src/thread/pthread_rwlock_rdlock.c:5
#4  0x0000002ac0067f70 in rwlock_checker_thread (arg=<optimized out>) at 
test-pthread-rwlock.c:152
#5  0x0000003fbafdbff4 in start (p=0x3fbaf86b00) at 
src/thread/pthread_create.c:207
#6  0x0000003fbafdd90e in __clone () at src/thread/riscv64/clone.s:30
Backtrace stopped: frame did not save the PC
(gdb) thread 22
Unknown thread 22.
(gdb) info threads
  Id   Target Id                  Frame 
  1    LWP 6707 "test-pthread-rw" __cp_end () at 
src/thread/riscv64/syscall_cp.s:27
  2    LWP 6739 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483645, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  3    LWP 6738 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483643, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  4    LWP 6737 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483644, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  5    LWP 6736 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483643, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  6    LWP 6735 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483644, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  7    LWP 6734 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483646, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  8    LWP 6733 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483643, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  9    LWP 6732 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483643, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  10   LWP 6731 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483644, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  11   LWP 6730 "test-pthread-rw" __syscall_cp_c (nr=98, u=<optimized out>, 
v=128, w=-2147483646, x=0, y=0, z=0) at ./arch/riscv64/syscall_arch.h:70
  12   LWP 6729 "test-pthread-rw" sched_yield () at 
./arch/riscv64/syscall_arch.h:13
  13   LWP 6728 "test-pthread-rw" sched_yield () at 
./arch/riscv64/syscall_arch.h:13
  14   LWP 6727 "test-pthread-rw" sched_yield () at 
./arch/riscv64/syscall_arch.h:13
  15   LWP 6726 "test-pthread-rw" sched_yield () at 
./arch/riscv64/syscall_arch.h:13
  16   LWP 6725 "test-pthread-rw" sched_yield () at 
./arch/riscv64/syscall_arch.h:13
  17   LWP 6724 "test-pthread-rw" 0x0000003fbafdd472 in a_cas (p=0x2ac006a050 
<my_rwlock>, t=-2147483643, s=-2147483642) at ./arch/riscv64/atomic_arch.h:11
  18   LWP 6723 "test-pthread-rw" 0x0000003fbafdd4c6 in a_cas (p=0x2ac006a050 
<my_rwlock>, t=-2147483644, s=-2147483645) at ./arch/riscv64/atomic_arch.h:11
  19   LWP 6722 "test-pthread-rw" sched_yield () at 
./arch/riscv64/syscall_arch.h:13
  20   LWP 6721 "test-pthread-rw" 0x0000003fbafdd4c6 in a_cas (p=0x2ac006a050 
<my_rwlock>, t=-2147483641, s=-2147483642) at ./arch/riscv64/atomic_arch.h:11
* 21   LWP 6720 "test-pthread-rw" 0x0000003fbafdd472 in a_cas (p=0x2ac006a050 
<my_rwlock>, t=-2147483644, s=-2147483643) at ./arch/riscv64/atomic_arch.h:11
(gdb) 

Reply via email to