Port-mips archive

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

Re: New jemalloc breaks mipsn64 (the 64bit userland)



On Mon, Feb 03, 2025 at 07:28:40AM +0100, Martin Husemann wrote:
> Hey folks,
> 
> the recent switch to newer jemalloc in libc causes my 64bit userland
> (evbmipsn64-eb) to break big time, I get coredumps from most binaries
> including sshd and login.

With the "TINY" changes to jemalloc proposed on tech-toolchain the situation
improves, but it still does not work.

Now it seems everything using libpthread crashes. I can run
"file" and get the usage message, but if I do "file /bin/ls" I get a crash
right after libpthread has been loaded. No new thread has been created
(AFAICT) yet, and the last system call is _lwp_getprivate, which returns
the proper (only valid) TCB for the main thread.

Shortly after that the cpu jumps to a address that I can't explain
and where (AFAICT) nothing is mapped:

 26324  26324 file     CALL  mmap(0,0xc000,PROT_READ|PROT_WRITE,0xe001002<PRIVATE,ANONYMOUS,ALIGN=16KB>,0xffffffffffffffff,0,0)
 26324  26324 file     RET   mmap 1099378769920/0xfff814c000, 1
 26324  26324 file     CALL  _lwp_getprivate
 26324  26324 file     RET   _lwp_getprivate 1099384508432/0xfff86c5010, 858980355/0x33330003
 26324  26324 file     CALL  _lwp_getprivate
 26324  26324 file     RET   _lwp_getprivate 1099384508432/0xfff86c5010, 858980355/0x33330003
 26324  26324 file     PSIG  SIGSEGV SIG_DFL: code=SEGV_MAPERR, addr=0x1fff0a07140, trap=2)
 26324  26324 file     NAMI  "file.core"

The ktrace (with ld.elf_so debugging enabled) shows no signs of any
newly created thread:

       "obj->path: /lib/libpthread.so.1"
       "maxvertab: 0"
       "initializing initial Thread Local Storage offsets"
       "/usr/lib/libc.so.12: static tls offset 0x0 size 2680\n"
       "relocating objects"
       "doing non-PLT relocations"
       "doing lazy PLT binding"
       "fixing up PLTGOT"
       "doing non-PLT relocations"  
       "doing lazy PLT binding"
       "fixing up PLTGOT"
       "doing non-PLT relocations"  
       "doing lazy PLT binding"
       "fixing up PLTGOT"
       "doing non-PLT relocations"  
       "doing lazy PLT binding"
...
       "doing copy relocations"
       "initializing Thread Local Storage for main thread"
       "_rtld_tls_static_space 2744"
       "lwp 26324 tls tcb 0xfff86be000"
       "/usr/bin/file: [lwp 26324] tls dtv 0xfff86be010 index 0 offset 0"
       "/usr/lib/libmagic.so.8: [lwp 26324] tls dtv 0xfff86be010 index 0 offset 0"
       "/usr/lib/liblzma.so.2: [lwp 26324] tls dtv 0xfff86be010 index 0 offset 0"
       "/usr/lib/libbz2.so.1: [lwp 26324] tls dtv 0xfff86be010 index 0 offset 0"
       "/usr/lib/libz.so.1: [lwp 26324] tls dtv 0xfff86be010 index 0 offset 0"
       "/usr/lib/libc.so.12: [lwp 26324] tls dtv 0xfff86be010 index 2 offset 0"
       "/usr/lib/libgcc_s.so.1: [lwp 26324] tls dtv 0xfff86be010 index 0 offset 0"
       "/lib/libpthread.so.1: [lwp 26324] tls dtv 0xfff86be010 index 0 offset 0"
       "calling _init functions"
       "_rtld_call_init_functions()"
       "_rtld_initlist_tsort"
       "calling init function /usr/lib/libc.so.12 at 0xfff8251518 (DF_1_INITFIRST)"
       "calling init_array function /usr/lib/libc.so.12 at 0xfff8402c80 (DF_1_INITFIRST)"
       "calling init_array function /usr/lib/libc.so.12 at 0xfff8402ec0 (DF_1_INITFIRST)"
       "calling init function /lib/libpthread.so.1 at 0xfff81968d0"
       "calling init function /usr/lib/libgcc_s.so.1 at 0xfff81c3e90"
       "calling init function /usr/lib/liblzma.so.2 at 0xfff8614d70"
       "calling init function /usr/lib/libbz2.so.1 at 0xfff85e16e8"
       "calling init function /usr/lib/libz.so.1 at 0xfff85b2de0"
       "calling init function /usr/lib/libmagic.so.8 at 0xfff865b1a8"
       "control at program entry point = 0x11c80, obj = 0xfff86f4000, exit = 0 xfff86cafa0"


Any ideas?

Martin


Home | Main Index | Thread Index | Old Index