# New Ticket Created by  [EMAIL PROTECTED] 
# Please include the string:  [perl #37133]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=37133 >



This is a bug report for perl from [EMAIL PROTECTED],
generated with the help of perlbug 1.35 running under perl v5.8.4.


-----------------------------------------------------------------
[Please enter your report here]

The simple program below causes a crash in perl on the following platforms:
(5.8.7)  2.6.8-2-mckinley-smp #1 SMP ia64 GNU/Linux
(5.8.4)  2.6.8.1.20040829 #1 SMP i686 GNU/Linux
(5.8.4)  2.4.25 #6 SMP i686 GNU/Linux
(5.8.4)  2.4.27.20040829 #5 SMP i686 GNU/Linux 

(perlbug was run on the 2.4.25 machine, but sent from another machine)

the same program does not appear to crash on the following platforms:
(5.8.4)  2.6.10-5-386 #1 i686 GNU/Linux
(5.8.0)  2.4.21-4.ELsmp #1 SMP i686 i686 i386 GNU/Linux

When perl crashes it gives one of the following errors, depending on the
platform:

== 
panic: destruct destroyed thread [EMAIL PROTECTED]@l0@ during global
destruction.
Segmentation fault
== 
(in cleanup) panic: destruct destroyed thread 828c0e8 (no reference) at
./test.pl line 23.
panic: MUTEX_DESTROY (16) [threads.xs:152] during global destruction.
Segmentation fault
==

the program also sometimes generates a segmentation fault (but no error) when
CTRL-C is pressed while it is running.

Sometimes the thread reference is a valid number, but sometimes it is printed
out as random ascii characters (as in the first message above).  the program
usually crashes within a minute or two.  on the 2.6.10 machine where it did not
crash, i let the program run for 20 minutes or more.


Here is the program:

====
#!/usr/bin/perl -w

use warnings;
use strict;
use threads;
use threads::shared;

my $var : shared = 0;

sub go
{
  lock($var);
}

while(1) {
  my $thr1 = threads->new(\&go);
  $thr1->detach;
} 


[please do not change anything below this line]
-----------------------------------------------------------------
---
flags:
    category=core
    severity=high
---
site configuration information for perl v5.8.4:

configured by debian project at thu feb  3 01:11:27 est 2005.

summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  platform:
    osname=linux, osvers=2.4.27-ti1211, archname=i386-linux-thread-multi
    uname='linux kosh 2.4.27-ti1211 #1 sun sep 19 18:17:45 est 2004 i686 
gnulinux '
    config_args='-dusethreads -duselargefiles -dccflags=-ddebian 
-dcccdlflags=-fpic -darchname=i386-linux -dprefix=/usr 
-dprivlib=/usr/share/perl/5.8 -darchlib=/usr/lib/perl/5.8 -dvendorprefix=/usr 
-dvendorlib=/usr/share/perl5 -dvendorarch=/usr/lib/perl5 
-dsiteprefix=/usr/local -dsitelib=/usr/local/share/perl/5.8.4 
-dsitearch=/usr/local/lib/perl/5.8.4 -dman1dir=/usr/share/man/man1 
-dman3dir=/usr/share/man/man3 -dsiteman1dir=/usr/local/man/man1 
-dsiteman3dir=/usr/local/man/man3 -dman1ext=1 -dman3ext=3perl 
-dpager=/usr/bin/sensible-pager -uafs -ud_csh -uusesfio -uusenm -duseshrplib 
-dlibperl=libperl.so.5.8.4 -dd_dosuid -des'
    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=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  compiler:
    cc='cc', ccflags ='-d_reentrant -d_gnu_source -dthreads_have_pids -ddebian 
-fno-strict-aliasing -i/usr/local/include -d_largefile_source 
-d_file_offset_bits=64',
    optimize='-o2',
    cppflags='-d_reentrant -d_gnu_source -dthreads_have_pids -ddebian 
-fno-strict-aliasing -i/usr/local/include'
    ccversion='', gccversion='3.3.5 (debian 1:3.3.5-8)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    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=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
    perllibs=-ldl -lm -lpthread -lc -lcrypt
    libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so.5.8.4
    gnulibc_version='2.3.2'
  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.4:
    /usr/local/sw/perl
    /etc/perl
    /usr/local/lib/perl/5.8.4
    /usr/local/share/perl/5.8.4
    /usr/lib/perl5
    /usr/share/perl5
    /usr/lib/perl/5.8
    /usr/share/perl/5.8
    /usr/local/lib/site_perl
    .

---
environment for perl v5.8.4:
    home=/home/stefan
    lang (unset)
    language (unset)
    
ld_library_path=/home/stefan/physics/galaxyanalysis/lib:/usr/local/sw/root-i686/lib:/usr/local/sw/intel_cc_80/lib
    logdir (unset)
    
path=/home/stefan/physics/galaxyanalysis/test:/usr/local/sw/bin:/usr/local/sw/bin-i686:/usr/local/bin:/bin:/usr/bin:/usr/x11r6/bin:/home/stefan/bin:.:/usr/local/sw/root-i686/bin:/usr/local/sw/intel_cc_80/bin
    perl5lib=/usr/local/sw/perl
    perl_badlang (unset)
    shell=/usr/bin/tcsh

Reply via email to