Subject: Re: thread problem bilding perl 5.8.6 on 2.0/sparc
To: None <tech-userlevel@NetBSD.org>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-userlevel
Date: 03/05/2005 12:19:16
On Sat, 5 Mar 2005, Hubert Feyrer wrote:
> Building perl 5.8.6 on NetBSD 2.0/sparc from pkgsrc-current leads to miniperl 
> dumping core. gdb says:
>
> 	#0  0x1030c100 in pthread__lock_ras_end () from 
> /usr/lib/libpthread.so.0
>
> Is this a known problem, how does one work around it? Is it fixed on the 
> netbsd-2 or maybe netbsd-2-0 branch, and if so, what component needs 
> rebuilding - kernel, libpthread, ...?

FWIW, I have built and installed libpthread from the netbsd-2 branch, and 
it dies at the same place:

 	#0  0x1030c190 in pthread__lock_ras_end () from /usr/lib/libpthread.so.0


  - Hubert



Script started on Sat Mar  5 12:12:50 2005
# sh -v l2
LD_LIBRARY_PATH=/usr/pkgsrc/lang/perl58/work/perl-5.8.6 ./miniperl -w -Ilib -MExporter -e '<?>' 
[1]   Segmentation fault (core dumped) LD_LIBRARY_PATH=...
# gdb miniperl miniperl.core
GNU gdb 5.3nb1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc--netbsdelf"...
Core was generated by `miniperl'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.elf_so...done.
Loaded symbols for /usr/libexec/ld.elf_so
Reading symbols from /usr/pkgsrc/lang/perl58/work/perl-5.8.6/libperl.so...done.
Loaded symbols for /usr/pkgsrc/lang/perl58/work/perl-5.8.6/libperl.so
Reading symbols from /usr/lib/libm.so.0...done.
Loaded symbols for /usr/lib/libm.so.0
Reading symbols from /usr/lib/libcrypt.so.0...done.
Loaded symbols for /usr/lib/libcrypt.so.0
Reading symbols from /usr/lib/libpthread.so.0...done.
Loaded symbols for /usr/lib/libpthread.so.0
Reading symbols from /usr/lib/libc.so.12...done.
Loaded symbols for /usr/lib/libc.so.12
#0  0x1030c190 in pthread__lock_ras_end () from /usr/lib/libpthread.so.0
(gdb) bt
#0  0x1030c190 in pthread__lock_ras_end () from /usr/lib/libpthread.so.0
#1  0x1030c2d0 in pthread_spinlock () from /usr/lib/libpthread.so.0
#2  0x1030714c in __sigaction14 () from /usr/lib/libpthread.so.0
#3  0x10145f60 in Perl_rsignal_save (my_perl=0x48000, signo=8, handler=0,
     save=0xeffff220) at util.c:2200
#4  0x102090bc in Perl_do_exec3 (my_perl=0x48000,
     cmd=0x571c0 "/bin/csh -cf 'set nonomatch; glob ?' 2>/dev/null", fd=6,
     do_report=1) at doio.c:1563
#5  0x1014582c in Perl_my_popen (my_perl=0x48000,
     cmd=0x571c0 "/bin/csh -cf 'set nonomatch; glob ?' 2>/dev/null",
     mode=0xeffff4d0 "r") at util.c:1936
#6  0x1020382c in Perl_do_openn (my_perl=0x48000, gv=0x556a0,
     name=0x571c0 "/bin/csh -cf 'set nonomatch; glob ?' 2>/dev/null", len=48,
     as_raw=0, rawmode=0, rawperm=0, supplied_fp=0x0, svp=0x0, num_svs=0)
     at doio.c:498
#7  0x1020134c in Perl_do_open (my_perl=0x48000, gv=0x556a0,
     name=0x4f680 "/bin/csh -cf 'set nonomatch; glob ?' 2>/dev/null |", len=50,
     as_raw=0, rawmode=0, rawperm=0, supplied_fp=0x0) at doio.c:62
#8  0x1020c218 in Perl_start_glob (my_perl=0x48000, tmpglob=0x556f4,
     io=0x556b8) at doio.c:2371
#9  0x1016a25c in Perl_do_readline (my_perl=0x48000) at pp_hot.c:1536
#10 0x101dda4c in Perl_pp_glob (my_perl=0x48000) at pp_sys.c:420
#11 0x1013e4b8 in Perl_runops_debug (my_perl=0x48000) at dump.c:1449
#12 0x100af37c in S_run_body (my_perl=0x48000, oldscope=1) at perl.c:1934
#13 0x100aebc8 in perl_run (my_perl=0x48000) at perl.c:1853
#14 0x00013c94 in main (argc=6, argv=0xeffffa4c, env=0xeffffa68)
     at miniperlmain.c:98
#15 0x0001388c in ___start ()
(gdb) quit
# ^D

Script done on Sat Mar  5 12:13:47 2005

-- 
NetBSD - Free AND Open!      (And of course secure, portable, yadda yadda)