Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

threaded regex problem in _57 #169

Closed
p5pRT opened this issue Jul 7, 1999 · 5 comments

Comments

@p5pRT
Copy link

commented Jul 7, 1999

Migrated from rt.perl.org#974 (status was 'resolved')

Searchable as RT974$

@p5pRT

This comment has been minimized.

Copy link
Author

commented Jul 7, 1999

From bl@incyte.com

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

Perl Info


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

@p5pRT

This comment has been minimized.

Copy link
Author

commented Jul 3, 2000

From [Unknown Contact. See original ticket]

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

@p5pRT

This comment has been minimized.

Copy link
Author

commented Jul 4, 2000

From @gsar

On Mon, 03 Jul 2000 18​:08​:48 +0200, Christophe VG wrote​:
[about the match-variables-aren't-thread-safe issue]

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

@p5pRT

This comment has been minimized.

Copy link
Author

commented Aug 7, 2002

@gbarr - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this Aug 7, 2002
@p5pRT

This comment has been minimized.

Copy link
Author

commented Aug 7, 2002

From @gbarr

Bug was with 5.005 threads which are no longer supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.