develooper Front page | perl.perl5.porters | Postings from September 2000

[ID 20000926.001] [5.6.0+5005threads] odd require failures

From:
hv
Date:
September 26, 2000 09:15
Subject:
[ID 20000926.001] [5.6.0+5005threads] odd require failures
Message ID:
200009261615.RAA04300@localhost.localdomain
I'm seeing some odd failures under load here, wherein valid code will
suddenly start giving failures such as syntax errors on the first code
line of a file required by 'use base'; note that I am using $SIG{__DIE__}
here to upgrade it to a Carp::longmess:

syntax error at Transport/Receiver.pm line 13, near "package Transport::Receiver"
BEGIN not safe after errors--compilation aborted at Transport/Receiver.pm line 21.
    require Transport/Receiver.pm called at (eval 9) line 3
    eval 'require Transport::Receiver
;' called at /opt/perl-5.6.0/lib/5.6.0/base.pm line 59
    base::import('base', 'Transport::Receiver', 'Net::Daemon', 'DB::LoadConfig', 'Tools::Log') called at Device/Generic.pm line 53
    Device::Generic::BEGIN() called at Transport/Receiver.pm line 21
    require 0 called at Transport/Receiver.pm line 21
    require Device/Generic.pm called at (eval 8) line 3
    eval 'require Device::Generic
;' called at /opt/perl-5.6.0/lib/5.6.0/base.pm line 59
    base::import('base', 'Device::Generic', 'Transport::Transmitter', 'DB::Connection') called at Device/Service.pm line 23
    Device::Service::BEGIN() called at Transport/Receiver.pm line 21
    require 0 called at Transport/Receiver.pm line 21
    require Device/Service.pm called at (eval 7) line 2
    main::BEGIN() called at Transport/Receiver.pm line 21
    require 0 called at Transport/Receiver.pm line 21
    eval 'use Device::Service
;' called at Daemon/start.pl line 25

Are there dummy entries on the caller stack that are perhaps wrongly
getting reported as the current file, here? Has anyone seen something
similar? I'm assuming that it is triggered by some threading-specific
race condition, since it is not reproducible but seems to occur only
when the load is high. The pattern of the problem is the same each
time, but it is reported against various different packages.

Hugo

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.2.14-5.0, archname=i686-linux-thread
    uname='linux hugo 2.2.14-5.0 #1 tue mar 7 21:07:39 est 2000 i686 unknown '
    config_args='-des -Dusethreads -Duse5005threads -Dprefix=/opt/perl-5.6.0 -Doptimize=-g -O6'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=define useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='cc', optimize='-g -O6', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
    cppflags='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing'
    ccflags ='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    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, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lpthread -lc -lposix -lcrypt
    libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: DEBUGGING USE_THREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
  Built under linux
  Compiled at Sep 14 2000 16:28:56
  @INC:
    /opt/perl-5.6.0/lib/5.6.0/i686-linux-thread
    /opt/perl-5.6.0/lib/5.6.0
    /opt/perl-5.6.0/lib/site_perl/5.6.0/i686-linux-thread
    /opt/perl-5.6.0/lib/site_perl/5.6.0
    /opt/perl-5.6.0/lib/site_perl
    .




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About