NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/57628: multithread programs may deadlock in ld.elf_so (sparc on sparc64)



>Number:         57628
>Category:       lib
>Synopsis:       multithread programs may deadlock in ld.elf_so (sparc on sparc64)
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 25 09:40:01 +0000 2023
>Originator:     Martin Husemann
>Release:        NetBSD 10.99.9
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD nelly.aprisoft.de 10.99.9 NetBSD 10.99.9 (NELLY) #75: Sun Sep 24 09:30:35 CEST 2023 martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src/sys/arch/sparc64/compile/NELLY sparc
Architecture: sparc
Machine: sparc
>Description:

Running sparc userland ATF tests on sparc64 shows a few tests deadlocking
like this:

[~] root@nelly # gdb -p 15928
GNU gdb (GDB) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "sparc--netbsdelf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Attaching to process 15928
Reading symbols from /usr/bin/rump_server...
Reading symbols from /usr/libdata/debug//usr/bin/rump_server.debug...
[New LWP 15537 of process 15928]
[New LWP 19607 of process 15928]
[New LWP 21178 of process 15928]
[New LWP 18138 of process 15928]
[New LWP 18206 of process 15928]
[New LWP 17453 of process 15928]
[New LWP 17889 of process 15928]
[New LWP 9653 of process 15928]
[New LWP 17218 of process 15928]
[New LWP 18547 of process 15928]
[New LWP 14775 of process 15928]
[New LWP 3924 of process 15928]
[New LWP 3116 of process 15928]
[New LWP 19701 of process 15928]
[New LWP 15928 of process 15928]
Reading symbols from /usr/lib/librumpkern_sysproxy.so.0...
Reading symbols from /usr/libdata/debug//usr/lib/librumpkern_sysproxy.so.0.0.debug...
Reading symbols from /usr/lib/librump.so.0...
Reading symbols from /usr/libdata/debug//usr/lib/librump.so.0.0.debug...
Reading symbols from /usr/lib/librumpvfs_nofifofs.so.0...
Reading symbols from /usr/libdata/debug//usr/lib/librumpvfs_nofifofs.so.0.0.debug...
Reading symbols from /usr/lib/librumpvfs.so.0...
Reading symbols from /usr/libdata/debug//usr/lib/librumpvfs.so.0.0.debug...
Reading symbols from /usr/lib/librumpuser.so.0...
Reading symbols from /usr/libdata/debug//usr/lib/librumpuser.so.0.1.debug...
Reading symbols from /usr/lib/libpthread.so.1...
Reading symbols from /usr/libdata/debug//usr/lib/libpthread.so.1.4.debug...
Reading symbols from /usr/lib/libsparc_v8.so.0...
Reading symbols from /usr/libdata/debug//usr/lib/libsparc_v8.so.0.0.debug...
(No debugging symbols found in /usr/libdata/debug//usr/lib/libsparc_v8.so.0.0.debug)
Reading symbols from /usr/lib/libc.so.12...
Reading symbols from /usr/libdata/debug//usr/lib/libc.so.12.221.debug...
Reading symbols from /usr/lib/libgcc_s.so.1...
Reading symbols from /usr/libdata/debug//usr/lib/libgcc_s.so.1.0.debug...
Reading symbols from /usr/lib/librumpkern_simplehook_tester.so...
Reading symbols from /usr/libdata/debug//usr/lib/librumpkern_simplehook_tester.so.0.0.debug...
Reading symbols from /usr/libexec/ld.elf_so...
Reading symbols from /usr/libdata/debug//usr/libexec/ld.elf_so.debug...
[Switching to LWP 19391 of process 15928]
_rtld_shared_enter () at /work/src/libexec/ld.elf_so/rtld.c:1716
1716    /work/src/libexec/ld.elf_so/rtld.c: No such file or directory.
(gdb) bt
#0  _rtld_shared_enter () at /work/src/libexec/ld.elf_so/rtld.c:1716
#1  0x2ad113b4 in _rtld_bind (obj=0x3eda4800, reloff=6504)
    at /work/src/libexec/ld.elf_so/arch/sparc/mdreloc.c:420
#2  0x2ad10f10 in _rtld_bind_start () from /usr/libexec/ld.elf_so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) info thread
  Id   Target Id                              Frame 
* 1    LWP 19391 of process 15928 "entbutler" _rtld_shared_enter ()
    at /work/src/libexec/ld.elf_so/rtld.c:1716
  2    LWP 15537 of process 15928 "xcall/1"   pthread_cond_timedwait (
    cond=0x3edcaba0, mutex=0x3edc7c80, abstime=0x0)
    at /work/src/lib/libpthread/pthread_cond.c:172
  3    LWP 19607 of process 15928 "sipbnc"    pthread_cond_timedwait (
    cond=0x3edca940, mutex=0x3edc7900, abstime=0x0)
    at /work/src/lib/libpthread/pthread_cond.c:172
  4    LWP 21178 of process 15928 "rumpclk1"  pthread_cond_timedwait (
    cond=0x3edca960, mutex=0x3edc7980, abstime=0x0)
    at /work/src/lib/libpthread/pthread_cond.c:172
  5    LWP 18138 of process 15928 "xcall/0"   pthread_cond_timedwait (
    cond=0x3edca940, mutex=0x3edc7900, abstime=0x0)
    at /work/src/lib/libpthread/pthread_cond.c:172
  6    LWP 18206 of process 15928 "rsi1/0"    pthread_cond_timedwait (
    cond=0x3edcab00, mutex=0x3edc7980, abstime=0x0)
    at /work/src/lib/libpthread/pthread_cond.c:172
  7    LWP 17453 of process 15928 "rsi0/0"    pthread_cond_timedwait (
    cond=0x3edca940, mutex=0x3edc7900, abstime=0x0)
    at /work/src/lib/libpthread/pthread_cond.c:172
  8    LWP 17889 of process 15928 "rsi1/3"    pthread_cond_timedwait (
    cond=0x3edcab60, mutex=0x3edc7980, abstime=0x0)
    at /work/src/lib/libpthread/pthread_cond.c:172
  9    LWP 9653 of process 15928 "rsi0/3"     pthread_cond_timedwait (
    cond=0x3edca940, mutex=0x3edc7900, abstime=0x0)
    at /work/src/lib/libpthread/pthread_cond.c:172
  10   LWP 17218 of process 15928 "rsi1/2"    pthread_cond_timedwait (
    cond=0x3edcab40, mutex=0x3edc7980, abstime=0x0)
    at /work/src/lib/libpthread/pthread_cond.c:172
  11   LWP 18547 of process 15928 "rsi0/2"    pthread_cond_timedwait (
    cond=0x3edca940, mutex=0x3edc7900, abstime=0x0)
    at /work/src/lib/libpthread/pthread_cond.c:172
  12   LWP 14775 of process 15928 "sipbnc"    pthread_cond_timedwait (
    cond=0x3edcab80, mutex=0x3edc7f80, abstime=0x0)
    at /work/src/lib/libpthread/pthread_cond.c:172
  13   LWP 3924 of process 15928 "rumpclk0"   pthread_cond_timedwait (
    cond=0x3edca940, mutex=0x3edc7900, abstime=0x0)
    at /work/src/lib/libpthread/pthread_cond.c:172
  14   LWP 3116 of process 15928 "rsi1/1"     pthread_cond_timedwait (
    cond=0x3edcab20, mutex=0x3edc7980, abstime=0x0)
    at /work/src/lib/libpthread/pthread_cond.c:172
  15   LWP 19701 of process 15928 "rsi0/1"    pthread_cond_timedwait (
    cond=0x3edca940, mutex=0x3edc7900, abstime=0x0)
    at /work/src/lib/libpthread/pthread_cond.c:172
  16   LWP 15928 of process 15928 ""          _rtld_shared_enter ()
    at /work/src/libexec/ld.elf_so/rtld.c:1716
(gdb) thread 16
[Switching to thread 16 (LWP 15928 of process 15928)]
#0  _rtld_shared_enter () at /work/src/libexec/ld.elf_so/rtld.c:1716
1716    in /work/src/libexec/ld.elf_so/rtld.c
(gdb) bt
#0  _rtld_shared_enter () at /work/src/libexec/ld.elf_so/rtld.c:1716
#1  0x2ad113b4 in _rtld_bind (obj=0x3eda4800, reloff=7044)
    at /work/src/libexec/ld.elf_so/arch/sparc/mdreloc.c:420
#2  0x2ad10f10 in _rtld_bind_start () from /usr/libexec/ld.elf_so


>How-To-Repeat:

just try to run ATF tests with 32bit userland on a sparc64 kernel

>Fix:
n/a



Home | Main Index | Thread Index | Old Index