Skip Menu |
Report information
Id: 974
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: bl [at] incyte.com
Cc:
AdminCc:

Operating System: irix
PatchStatus: (no value)
Severity: medium
Type: library
Perl Version: (no value)
Fixed In: (no value)



Date: Wed, 7 Jul 1999 17:25:36 -0700 (PDT)
From: Brett Lemoine <bl [...] incyte.com>
To: perlbug [...] perl.com
Subject: threaded regex problem in _57
Download (untitled) / with headers
text/plain 3.2k
----------------------------------------------------------------- [Please enter your report here] The following script reaches the 'ERROR' part on a multi-processor box. It doesn't fail on a uni-proc box. #!/opt/perl5.005_57/bin/perl use Thread; my $msg = 'aaa'; my @thrds; my $cnt=100; foreach my $n ( 0..$cnt ) { $thrds[$n] = new Thread \&loop, $msg; } foreach $thrd ( @thrds ) { $thrd->join; } sub loop { my $string = shift; while ( 1 ) { my ( $i ) = ( $string =~ /^.(.).$/ ); unless ( $i ) { print "ERROR: string: '$string'\t\ti: '$i'.\n"; kill 9 => $$; } } } It usually takes less than a second to die. Looks like $1..$9 aren't sufficiently protected between threads. Tested under IRIX and Solaris. bl [Please do not change anything below this line] ----------------------------------------------------------------- --- Site configuration information for perl 5.00557: Configured by bl at Wed Jul 7 15:23:53 PDT 1999. Summary of my perl5 (revision 5.0 version 5 subversion 57) configuration: Platform: osname=irix, osvers=6.5, archname=IP30-irix-thread uname='irix64 blah 6.5 04151556 ip30 mips ' config_args='-Dprefix=/opt/perl5.005_57 -Dusethreads -Doptimize=-g' hint=recommended, useposix=true, d_sigaction=define usethreads=define useperlio=undef d_sfio=undef use64bits=undef usemultiplicity=undef Compiler: cc='cc -n32', optimize='-g', gccversion= cppflags='-D_BSD_TYPES -D_BSD_TIME -OPT:Olimit=0:space=ON -DDEBUGGING -I/usr/local/include -I/usr/gnu/include -DLANGUAGE_C' ccflags ='-D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -OPT:Olimit=0:space=ON -DDEBUGGING -I/usr/local/include -I/usr/gnu/include -DLANGUAGE_C' stdchar='unsigned char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='cc -n32', ldflags =' -L/usr/local/lib32 -L/usr/local/lib -L/usr/gnu/lib' libpth=/usr/local/lib /usr/gnu/lib /usr/lib32 /lib32 /lib /usr/lib libs=-ldb -lm -lrt -lpthread libc=/usr/lib32/libc.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-n32 -shared -L/usr/local/lib32 -L/usr/local/lib -L/usr/gnu/lib' Locally applied patches: --- @INC for perl 5.00557: /opt/perl5.005_57/lib/5.00557/IP30-irix-thread /opt/perl5.005_57/lib/5.00557 /opt/perl5.005_57/lib/site_perl/5.00557/IP30-irix-thread /opt/perl5.005_57/lib/site_perl/5.00557 . --- Environment for perl 5.00557: HOME=/u/cuss/bl LANG= LANGUAGE (unset) LD_LIBRARY_PATH=/usr/X11/xview:/usr/local/lib:/usr/freeware/lib:/usr/sgitcl/lib:/u/cuss/bl/lib/sgi LOGDIR (unset) PATH=/usr/cdr/bin/SGI:/u/cuss/bl/bin:/u/cuss/bl/bin/irix:/usr/local/bin:/opt/MIPSpro/bin:/usr/freeware/bin:/usr/Cadmin/bin:/usr/Motif-1.2/bin:/usr/Motif-2.1/bin:/usr/OnRamp/bin:/usr/SGImeeting/bin:/usr/ToolTalk/bin:/usr/WebFace/bin:/usr/demos/bin:/usr/diags/bin:/usr/gnu/bin:/usr/java/bin:/usr/pcp/bin:/usr/pkg/bin:/usr/sgitcl/bin:/usr/ssm/bin:/usr/sysadm/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bsd:/bin/X11:/usr/etc:/etc:/usr/lib PERL_BADLANG (unset) SHELL=/bin/tcsh
Date: Mon, 03 Jul 2000 18:08:48 +0200
From: Christophe VG <christophe.vanginneken [...] ubizen.com>
To: perl5-porters [...] perl.org
Subject: bug 19990707.008
Download (untitled) / with headers
text/plain 470b
Hi, in my search for 'the bug' in our code, I stumbled upon the "real" problem ... which was identified as bug 19990707.008. as far as I can see this problem doesn't seem to be fixed. can anyone tell me wrong ? or what's the status on this one ? the original msg : http://bugs.perl.org/perlbug.cgi?req=tidmids&tidmids=19990707.008&range=32405&format=h a proposed solution : http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/1999-11/msg00809.html Christophe VG
To: Christophe VG <christophe.vanginneken [...] ubizen.com>
Cc: perl5-porters [...] perl.org
Subject: Re: bug 19990707.008
Date: Tue, 04 Jul 2000 10:06:22 -0700
From: Gurusamy Sarathy <gsar [...] ActiveState.com>
Download (untitled) / with headers
text/plain 792b
On Mon, 03 Jul 2000 18:08:48 +0200, Christophe VG wrote: [about the match-variables-aren't-thread-safe issue] Show quoted text
>in my search for 'the bug' in our code, I stumbled upon the "real" >problem ... which was identified as bug 19990707.008. as far as I can >see this problem doesn't seem to be fixed. can anyone tell me wrong ? or >what's the status on this one ?
Harry Wolfson <HarryWolfson@ll.mit.edu> worked on an implementation, but had to give up on it for lack of time. IIRC, his partial implementation still had problems with the rather seriously broken implementation of (?{}) and (??{}) (which uses a fake PL_curpad without ensuring that it is a proper clone of the real pad). Please talk to Harry to find out more if you're interested in working on this. Sarathy gsar@ActiveState.com
Bug was with 5.005 threads which are no longer supported


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org