# New Ticket Created by ikegami@ni.aist.go.jp
# Please include the string: [perl #37076]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=37076 >
This is a bug report for perl from ikegami@p06cmp000.asc.hpcc.jp,
generated with the help of perlbug 1.35 running under perl v5.8.7.
-----------------------------------------------------------------
[Please enter your report here]
On dual Opteron (2 GHz) machine, perl 5.8.7 frequently causes
segmentation fault with the following code snippet.
#!/usr/bin/perl
use threads;
use threads::shared;
sub socket () {
require IO;
return;
}
my $s = new threads \&socket;
my $c = new threads \&socket;
$s->join;
$c->join;
It is not reproducible by 100 %, and may not be reproducible on
slow/single-processor machines. As a workaround, put 'use IO'
somewhere. A stack trace taken from core file follows.
#0 0x0000002a95da8d88 in chunk_alloc () from /lib64/libc.so.6
#1 0x0000002a95da8bc1 in malloc () from /lib64/libc.so.6
#2 0x0000000040065cb0 in Perl_safesysmalloc ()
#3 0x000000004007026f in S_save_hek_flags ()
#4 0x00000000400712fb in S_share_hek_flags ()
#5 0x00000000400722ee in S_hv_fetch_common ()
#6 0x0000000040072c20 in Perl_hv_fetch ()
#7 0x0000000040026ff7 in Perl_gv_fetchpv ()
#8 0x00000000400484a6 in Perl_newXS ()
#9 0x0000000040048a9e in Perl_newCONSTSUB ()
#10 0x0000002a9670225a in boot_IO ()
from /home/ikegami/local/perl/lib/5.8.7/x86_64-linux-thread-multi/auto/IO/IO.so
#11 0x000000004007780f in Perl_pp_entersub ()
#12 0x000000004007609e in Perl_runops_standard ()
#13 0x000000004001f92d in S_call_body ()
#14 0x0000000040020741 in Perl_call_sv ()
#15 0x00000000400209ec in Perl_call_list ()
#16 0x00000000400527bc in Perl_newATTRSUB ()
#17 0x00000000400510bb in Perl_utilize ()
#18 0x00000000400434af in Perl_yyparse ()
#19 0x00000000400a6e4a in S_doeval ()
#20 0x00000000400a890d in Perl_pp_require ()
#21 0x000000004007609e in Perl_runops_standard ()
#22 0x000000004001f92d in S_call_body ()
#23 0x0000000040020741 in Perl_call_sv ()
#24 0x00000000400209ec in Perl_call_list ()
#25 0x00000000400527bc in Perl_newATTRSUB ()
#26 0x00000000400510bb in Perl_utilize ()
#27 0x00000000400434af in Perl_yyparse ()
#28 0x00000000400a6e4a in S_doeval ()
#29 0x00000000400a890d in Perl_pp_require ()
#30 0x000000004007609e in Perl_runops_standard ()
#31 0x000000004001f92d in S_call_body ()
#32 0x0000000040020741 in Perl_call_sv ()
#33 0x0000002a95f6f020 in Perl_ithread_run ()
from /home/ikegami/local/perl/lib/5.8.7/x86_64-linux-thread-multi/auto/threads/threads.so
#34 0x0000002a95c22c26 in pthread_start_thread () from /lib64/libpthread.so.0
#35 0x0000002a95dfbc95 in thread_start () from /lib64/libc.so.6
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl v5.8.7:
Configured by ikegami at Tue Jun 21 18:32:40 JST 2005.
Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
Platform:
osname=linux, osvers=2.4.21-251-smp, archname=x86_64-linux-thread-multi
uname='linux p06cmp000.asc.hpcc.jp 2.4.21-251-smp #1 smp sun nov 7 22:25:59 jst 2004 x86_64 unknown '
config_args='-ds -e -Dprefix=/home/ikegami/local/perl -Dusethreads'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=define uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='3.3.3 (SUSE Linux)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.2.5'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Locally applied patches:
---
@INC for perl v5.8.7:
/home/ikegami/lib/perl/x86_64-linux-thread-multi
/home/ikegami/lib/perl
/home/ikegami/local/perl/lib/5.8.7/x86_64-linux-thread-multi
/home/ikegami/local/perl/lib/5.8.7
/home/ikegami/local/perl/lib/site_perl/5.8.7/x86_64-linux-thread-multi
/home/ikegami/local/perl/lib/site_perl/5.8.7
/home/ikegami/local/perl/lib/site_perl
.
---
Environment for perl v5.8.7:
HOME=/home/ikegami
LANG=ja_JP.ujis
LANGUAGE (unset)
LC_COLLATE=POSIX
LD_LIBRARY_PATH=/home/ikegami/local/intel_fc_80/lib:/home/ikegami/local/intel_cc_80/lib:/opt/intel_fc_80/lib:/opt/intel_cc_80/lib:/opt/gt2/lib:/home/ikegami/local/lib
LOGDIR (unset)
PATH=/home/ikegami/local/ninfg-2.4.0/bin:/home/ikegami/bin:/home/ikegami/util:/home/ikegami/local/bin:/opt/gcc33/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/home/ikegami/local/intel_fc_80/bin:/home/ikegami/local/intel_cc_80/bin:/opt/score/bin:/opt/score/sbin:/opt/score/deploy:/usr/pbs/bin:/opt/intel_fc_80/bin:/opt/intel_cc_80/bin:/opt/gt2/bin:/opt/gt2/sbin:/usr/games:/opt/gnome2/bin:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/bin:/opt/gm/bin:/opt/pathscale/bin:/opt/pgi/linux86-64/5.2/bin:/opt/pgi/linux86/5.2/bin:.
PERL5LIB=/home/ikegami/lib/perl
PERL_BADLANG (unset)
SHELL=/bin/bash