I'm not into perl internals, but perhaps someone here can point me
in the right direction...

I'm getting a SIGSEGV in the perl that comes with stock 4.6, three
times in the past 10 days.  Looking at the stack trace, it looks
like Perl_safefree is not safe enough.  It looks like I could hack
perl so that the mutex macro around free() and other places could
block signals.  I'm curious what perl gurus have to say about this.
Perhaps this hole is fixed in the latest ports version?

The program that cored perl is a manager for persistent daemons,
so stability is much more important than execution speed.
Architecturally, it's something that started simple but has grown.
At the moment, the main loop is a call to pause(), with various
signals driving its actions.  At some point, this might become a
select() to handle additional requests.  Had I known what I do
today, I might have coded it in C, but it's not worth the pain
yet...

Thanks,
Romain Kang
[EMAIL PROTECTED]


collector% gdb -c perl.93845.core /usr/bin/perl
GNU gdb 4.18 (FreeBSD)
Copyright 1998 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 "i386-unknown-freebsd"...(no debugging symbols found)...
Core was generated by `perl'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libperl.so.3...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libm.so.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libcrypt.so.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libmd.so.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libc.so.4...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libutil.so.3...(no debugging symbols found)...done.
Reading symbols from /usr/libdata/perl/5.00503/mach/auto/POSIX/POSIX.so...(no 
debugging symbols found)
...done.
Reading symbols from /usr/libdata/perl/5.00503/mach/auto/Socket/Socket.so...(no 
debugging symbols foun
d)...done.
Reading symbols from /usr/libexec/ld-elf.so.1...(no debugging symbols found)...done.
#0  0x281b2359 in bcopy () from /usr/lib/libc.so.4
(gdb) bt
#0  0x281b2359 in bcopy () from /usr/lib/libc.so.4
#1  0x1c in ?? ()
#2  0x281b2d47 in bcopy () from /usr/lib/libc.so.4
#3  0x281b3d9f in __dtoa () from /usr/lib/libc.so.4
#4  0x281b1b8f in vfprintf () from /usr/lib/libc.so.4
#5  0x281afb30 in vfprintf () from /usr/lib/libc.so.4
#6  0x281a12b6 in sprintf () from /usr/lib/libc.so.4
#7  0x280ab499 in Perl_sv_2pv () from /usr/lib/libperl.so.3
#8  0x280b8af0 in Perl_hv_fetch_ent () from /usr/lib/libperl.so.3
#9  0x280b41ea in Perl_pp_helem () from /usr/lib/libperl.so.3
#10 0x2807f11d in Perl_runops_standard () from /usr/lib/libperl.so.3
#11 0x280e96ad in perl_call_sv () from /usr/lib/libperl.so.3
#12 0x280bea01 in Perl_sighandler () from /usr/lib/libperl.so.3
#13 0xbfbfffac in ?? ()
#14 0x281b67a5 in free () from /usr/lib/libc.so.4
#15 0x280bec2b in Perl_safefree () from /usr/lib/libperl.so.3
#16 0x281ea02c in XS_POSIX__SigSet_DESTROY () from 
/usr/libdata/perl/5.00503/mach/auto/POSIX/POSIX.so
#17 0x280b5ff6 in Perl_pp_entersub () from /usr/lib/libperl.so.3
#18 0x280e9696 in perl_call_sv () from /usr/lib/libperl.so.3
#19 0x280ad9e0 in Perl_sv_clear () from /usr/lib/libperl.so.3
#20 0x280adeb1 in Perl_sv_free () from /usr/lib/libperl.so.3
#21 0x2809ab5b in Perl_free_tmps () from /usr/lib/libperl.so.3
#22 0x280e97dd in perl_call_sv () from /usr/lib/libperl.so.3
#23 0x280bea01 in Perl_sighandler () from /usr/lib/libperl.so.3
#24 0xbfbfffac in ?? ()
#25 0x2816e26a in pause () from /usr/lib/libc.so.4
#26 0x281f8e81 in XS_POSIX_pause () from 
/usr/libdata/perl/5.00503/mach/auto/POSIX/POSIX.so
#27 0x280b5ff6 in Perl_pp_entersub () from /usr/lib/libperl.so.3
#28 0x2807f11d in Perl_runops_standard () from /usr/lib/libperl.so.3
#29 0x280e8ef0 in perl_run () from /usr/lib/libperl.so.3
#30 0x8048e75 in main ()
#31 0x8048d61 in _start ()

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to