tech-userlevel archive

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

malloc-related SIGSEGV when cross-building i386 on NetBSD-10.0/amd64



Hello

I cross-build i386 packages on an amd64 machine, using pkg_comp with
CFLAHS-m32 in /etc/mk.conf.

That worked well on NetBSD-9 but after upgradint to NetBSD-10.0, I get
random SIGSEGV. Here are a few backtrace examples:

In sed:
#0  0xf0d63c00 in je_malloc_tsd_boot0 () from /lib/libc.so.12
#1  0xf0dc17ea in malloc_init_hard () from /lib/libc.so.12
#2  0xfb8d6633 in _rtld_call_init_function () from /usr/libexec/ld.elf_so
#3  0xfb8d68f0 in _rtld_call_init_functions () from /usr/libexec/ld.elf_so
#4  0xfb8d7297 in _rtld () from /usr/libexec/ld.elf_so
#5  0xfb8d051a in rtld_start () from /usr/libexec/ld.elf_so

In perl:
#0  0xf47fd5d9 in calloc () from /lib/libc.so.12
#1  0xf4a44064 in Perl_safesyscalloc ()
   from /usr/pkg/lib/perl5/5.38.0/i386-netbsd-thread-multi/CORE/libperl.so
#2  0xf4a66ccb in Perl_hv_common ()
   from /usr/pkg/lib/perl5/5.38.0/i386-netbsd-thread-multi/CORE/libperl.so
#3  0xf4a68010 in Perl_hv_common_key_len ()
   from /usr/pkg/lib/perl5/5.38.0/i386-netbsd-thread-multi/CORE/libperl.so
#4  0xf49987b8 in Perl_gv_fetchpvn_flags ()
   from /usr/pkg/lib/perl5/5.38.0/i386-netbsd-thread-multi/CORE/libperl.so
#5  0xf498e186 in perl_parse ()
   from /usr/pkg/lib/perl5/5.38.0/i386-netbsd-thread-multi/CORE/libperl.so
#6  0x00eb0ecb in main ()


In rm:
#0  0xf7bec157 in free () from /lib/libc.so.12
#1  0xf7c52cfd in fclose () from /lib/libc.so.12
#2  0x002deca0 in main ()

In sh:
#)  0xefe46ae7 in _malloc_postfork_child () from /lib/libc.so.12
#1  0xefeb5d32 in fork () from /lib/libc.so.12
#2  0x00a72602 in forkshell ()
#3  0x00a65a4e in evalbackcmd ()
#4  0x00a6980f in expbackq ()
#5  0x00a6bf63 in argstr ()
#6  0x00a6c489 in expandarg ()
#7  0x00a6532e in evalcase ()
#8  0x00a64b38 in evaltree ()
#9  0x00a65178 in evalfor ()
#10 0x00a64b66 in evaltree ()
#11 0x00a72b44 in cmdloop ()
#12 0x00a82fe3 in main §)

I also often get SIGSEGV in cc1 but gdb is unsable to provide a backtrace 
with symbols.

Ths thing seems related to memory allocation. I tried 
ulimit -d unlimited / ulimit -m unlimited with no luck.

I also tried to disable syectl security.pax.mprotect.enabled 
and security.pax.aslt.enabled, it does not help either.

-- 
Emmanuel Dreyfus
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index