Update: I've now run the test program above on 4 different multi-cpu boxes and it always crashes there (sometimes I need to up the number of threads from 2). I've also run it on two different single CPU machines and I cannot get it to crash, no matter what I do.
It crashes for me with both Linux 2.4 (Perl 5.8.5) and Windows XP (ActiveState Perl 5.8.4). These are both hyperthreaded (or multi-cpu) machines. I notice the original bug report #31851 states that it crashes on a "multiprocessor box". Anyone out there running a multiprocessor box? Anyone else got it to crash? I suppose you could try fiddling with the 99999 above and/or the number of threads in this line:
do_threads(2); # try increasing the number of threads
to see if it makes any difference. More details of my crashes below.
On Linux 2.4.18-3smp:
# perl z.pl
parent 24192: continue
kid 0 before local
parent 24192: continue
parent 24192: waiting for join
kid 1 before local
Memory fault
# perl -V
Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
Platform:
osname=linux, osvers=2.4.18-3smp, archname=i686-linux-thread-multi
uname='linux rh73 2.4.18-3smp #1 smp thu apr 18 07:27:31 edt 2002
+i686 unknown '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemulti
+plicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef 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 -I/usr/in
+clude/gdbm',
optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-stri
+ct-aliasing -pipe -I/usr/local
/include -I/usr/include/gdbm'
ccversion='', gccversion='2.96 20000731 (Red Hat Linux 7.3 2.96-11
+0)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1
+2
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
+ lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.2.5.so, 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'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL
+_IMPLICIT_CONTEXT
Built under linux
Compiled at Nov 21 2004 09:48:50
@INC:
/home/knob/thperl585/lib/5.8.5/i686-linux-thread-multi
/home/knob/thperl585/lib/5.8.5
/home/knob/thperl585/lib/site_perl/5.8.5/i686-linux-thread-multi
/home/knob/thperl585/lib/site_perl/5.8.5
/home/knob/thperl585/lib/site_perl
.
On Windows XP (Intel hyper-threaded machine):
C:\TEMP>perl z.pl
kid 0 before local
parent 3140: continue
parent 3140: continue
parent 3140: waiting for join
kid 1 before local
Free to wrong pool 232ae8 not 23d420 at z.pl line 13.
C:\TEMP>perl -V
Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
Platform:
osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
usethreads=undef use5005threads=undef useithreads=define usemultip
+licity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cl', ccflags ='-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D
+_CONSOLE -DNO_STRICT -DHAVE_DE
S_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -
+DUSE_PERLIO -DPERL_MSVCRT_READ
FIX',
optimize='-MD -Zi -DNDEBUG -O1',
cppflags='-DWIN32'
ccversion='', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64
+', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -l
+ibpath:"C:\perl58\lib\CORE" -
machine:x86'
libpth="C:\Program Files\Microsoft Visual Studio\VC98\lib"
libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
+ comdlg32.lib advapi32.lib sh
ell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mp
+r.lib winmm.lib version.lib o
dbc32.lib odbccp32.lib msvcrt.lib
perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool
+.lib comdlg32.lib advapi32.li
b shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.li
+b mpr.lib winmm.lib version.l
ib odbc32.lib odbccp32.lib msvcrt.lib
libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib
gnulibc_version='undef'
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:
+ref,icf -libpath:"C:\perl58\l
ib\CORE" -machine:x86'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL
+_IMPLICIT_CONTEXT PERL_IMPLICI
T_SYS
Locally applied patches:
ActivePerl Build 810
22751 Update to Test.pm 1.25
21540 Fix backward-compatibility issues in if.pm
Built under MSWin32
Compiled at Jul 30 2004 09:49:05
@INC:
C:/perl58/lib
C:/perl58/site/lib
.
|