NetBSD-Bugs archive

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

lib/59112: libpthread constructors use malloc



>Number:         59112
>Category:       lib
>Synopsis:       libpthread constructors use malloc
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 28 10:30:00 +0000 2025
>Originator:     Martin Husemann
>Release:        NetBSD 10.99.12
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD unpluged.duskware.de 10.99.12 NetBSD 10.99.12 (UNPLUGED) #627: Mon Feb 24 11:21:12 CET 2025 martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src/sys/arch/evbarm/compile/UNPLUGED evbarm
Architecture: earmv5
Machine: evbarm
>Description:

Side note: I guess this is "the" remaining issue with HAVE_JEMALLOC=530
on arm and mips.

Everything that uses libpthread seems to be broken on armv5 with new
jemalloc.

[/tmp] martin@unpluged > gdb gunzip
GNU gdb (GDB) 15.1
Copyright (C) 2024 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 "armv7--netbsdelf-eabihf".
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"...
Reading symbols from gunzip...
Reading symbols from /usr/libdata/debug//usr/bin/gzip.debug...
(gdb) break malloc
Breakpoint 1 at 0x1580
(gdb) run
Starting program: /usr/bin/gunzip 

Breakpoint 1, malloc (size=size@entry=8) at /work/src/external/bsd/jemalloc/lib/../dist/src/jemalloc.c:2773
warning: 2773   /work/src/external/bsd/jemalloc/lib/../dist/src/jemalloc.c: No such file or directory
(gdb) bt
#0  malloc (size=size@entry=8) at /work/src/external/bsd/jemalloc/lib/../dist/src/jemalloc.c:2773
#1  0xbbe0e224 in af_alloc () at /work/src/lib/libc/gen/pthread_atfork.c:85
#2  af_alloc () at /work/src/lib/libc/gen/pthread_atfork.c:79
#3  _pthread_atfork (prepare=0xbbc7a5c0 <pthread_tsd_prefork>, parent=0xbbc7a5b0 <pthread_tsd_postfork>, 
    child=0xbbc7a59c <pthread_tsd_postfork_child>) at /work/src/lib/libc/gen/pthread_atfork.c:120
#4  0xbbc7a5f8 in pthread_tsd_init (tlen=tlen@entry=0xbbc85c20 <__pthread_st_size>) at /work/src/lib/libpthread/pthread_tsd.c:92
#5  0xbbc808a8 in pthread__init () at /work/src/lib/libpthread/pthread.c:214
#6  0xbbe22268 in _libc_init () at /work/src/lib/libc/misc/initfini.c:127
#7  0xbbef2d34 in _rtld_call_initfini_function (mask=<optimized out>, func=0xbbe221fc <_libc_init>)
    at /work/src/libexec/ld.elf_so/rtld.c:152
#8  _rtld_call_init_function (cur_objgen=<optimized out>, mask=<optimized out>, obj=<optimized out>)
    at /work/src/libexec/ld.elf_so/rtld.c:267
#9  _rtld_call_init_function (obj=0xbbe92000, mask=0xbfffe810, cur_objgen=1) at /work/src/libexec/ld.elf_so/rtld.c:241
#10 0xbbef3040 in _rtld_call_init_functions (mask=mask@entry=0xbfffe810) at /work/src/libexec/ld.elf_so/rtld.c:325
#11 0xbbef3b48 in _rtld (sp=<optimized out>, relocbase=<optimized out>) at /work/src/libexec/ld.elf_so/rtld.c:802


>How-To-Repeat:
s/a

>Fix:
n/a



Home | Main Index | Thread Index | Old Index