NetBSD-Bugs archive

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

port-evbarm/53752: crash with thread local destructor



>Number:         53752
>Category:       port-evbarm
>Synopsis:       crash with thread local destructor
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-evbarm-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 29 11:20:00 +0000 2018
>Originator:     Martin Husemann
>Release:        NetBSD 8.99.26
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD painkiller.duskware.de 8.99.26 NetBSD 8.99.26 (GENERIC64) #17: Tue Nov 27 12:23:10 CET 2018 martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src/sys/arch/evbarm/compile/GENERIC64 evbarm
Architecture: aarch64
Machine: evbarm
>Description:

One of the ld.elf_so tests fails on aarch64 due to the helper program catching
a SIGSEGV:

Reading symbols from ./h_thread_local_dtor...Reading symbols from /usr/libdata/debug//usr/tests/libexec/ld.elf_so/h_thread_local_dtor.debug...done.
done.
[New process 2]
[New process 1]
Core was generated by `h_thread_local_d'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __cxa_thread_run_atexit () at /work/src/lib/libc/stdlib/cxa_thread_atexit.c:56
56      /work/src/lib/libc/stdlib/cxa_thread_atexit.c: No such file or directory.
[Current thread is 1 (process 2)]
(gdb) bt/full
A syntax error in expression, near `/full'.
(gdb) bt full
#0  __cxa_thread_run_atexit () at /work/src/lib/libc/stdlib/cxa_thread_atexit.c:56
        entry = 0x1
#1  0x0000f6d5ee0dc448 in pthread_exit (retval=0x0) at /work/src/lib/libpthread/pthread.c:659
        cleanup = <optimized out>
        name = <optimized out>
        __func__ = "pthread_exit"
#2  0x0000f6d5ee0dc584 in pthread__create_tramp (cookie=0xf6d5edc18000)
    at /work/src/lib/libpthread/pthread.c:595
        self = 0xf6d5edc18000
        retval = <optimized out>
#3  0x0000f6d5edfc0ecc in __mknod50 () from /usr/lib/libc.so.12

(gdb) info reg
x0             0x10     16
x1             0xfffff0d60b4c   281474722302796
x2             0x0      0
x3             0x0      0
x4             0xf6d5ee0cf008   271398682292232
x5             0xf6d5ed200008   271398666764296
x6             0x0      0
x7             0x1      1
x8             0xffffff80       4294967168
x9             0x0      0
x10            0xf6d5ed200008   271398666764296
x11            0x101010101010101        72340172838076673
x12            0x225000 2248704
x13            0xf6d5ee0cf028   271398682292264
x14            0xc      12
x15            0xf6d5ee0bb000   271398682210304
x16            0xf6d5ee0f0810   271398682429456
x17            0xf6d5edfac0ec   271398681100524
x18            0xf6d5ee0bbf40   271398682214208
x19            0xf6d5edc18000   271398677348352
x20            0x800000 8388608
x21            0xf6d5ed400000   271398668861440
x22            0x40     64
x23            0xf6d5edc18188   271398677348744
x24            0xf6d5ee0dc520   271398682346784
x25            0xf6d5edc18000   271398677348352
x26            0xf6d5ee0fe180   271398682485120
x27            0x0      0
x28            0x0      0
x29            0x0      0
x30            0xf6d5ee0dc584   271398682346884
sp             0xf6d5edbfffe0   0xf6d5edbfffe0
pc             0xf6d5ee0dc584   0xf6d5ee0dc584
cpsr           0x60000000       [ EL=0 C Z ]
fpsr           0x0      0
fpcr           0x0      0
(gdb) x/16i $pc-28
   0xf6d5ee0dc568 <pthread__create_tramp+72>:   adrp    x1, 0xf6d5ee0dd000 <pthread__init+744>
   0xf6d5ee0dc56c <pthread__create_tramp+76>:   mov     w0, #0x1                        // #1
   0xf6d5ee0dc570 <pthread__create_tramp+80>:   add     x1, x1, #0xa08
   0xf6d5ee0dc574 <pthread__create_tramp+84>:   bl      0xf6d5ee0d6410 <err@plt>
   0xf6d5ee0dc578 <pthread__create_tramp+88>:   ldp     x1, x0, [x19, #224]
   0xf6d5ee0dc57c <pthread__create_tramp+92>:   blr     x1
   0xf6d5ee0dc580 <pthread__create_tramp+96>:   bl      0xf6d5ee0d6110 <pthread_exit@plt>
=> 0xf6d5ee0dc584:      nop
   0xf6d5ee0dc588 <pthread__cancelled>: stp     x19, x30, [sp, #-16]!
   0xf6d5ee0dc58c <pthread__cancelled+4>:       mrs     x0, tpidr_el0
   0xf6d5ee0dc590 <pthread__cancelled+8>:       ldr     x0, [x0, #8]
   0xf6d5ee0dc594 <pthread__cancelled+12>:      ldr     x19, [x0, #176]
   0xf6d5ee0dc598 <pthread__cancelled+16>:      str     xzr, [x0, #176]
   0xf6d5ee0dc59c <pthread__cancelled+20>:      
    cbz x19, 0xf6d5ee0dc5ac <pthread__cancelled+36>
   0xf6d5ee0dc5a0 <pthread__cancelled+24>:      mov     x0, x19
   0xf6d5ee0dc5a4 <pthread__cancelled+28>:      
    bl  0xf6d5ee0d6320 <pthread_mutex_held_np@plt>


>How-To-Repeat:

cd /usr/tests/libexec/ld.elf_so
./h_thread_local_dtor

>Fix:
n/a



Home | Main Index | Thread Index | Old Index