develooper Front page | perl.perl5.porters | Postings from March 2007

[perl #42101] Mass suicide occurs when running kill with an undefined value

Thread Next
From:
gwcooper @ pcocd2 . intel . com
Date:
March 26, 2007 12:15
Subject:
[perl #42101] Mass suicide occurs when running kill with an undefined value
Message ID:
rt-3.6.HEAD-30557-1174932435-466.42101-75-0@perl.org
# New Ticket Created by  gwcooper@pcocd2.intel.com 
# Please include the string:  [perl #42101]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=42101 >



This is a bug report for perl from gwcooper@pcocd2.,
generated with the help of perlbug 1.35 running under perl v5.8.5.


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

The version of perl I tested this with is 5.8.2 (initially found
bug with this version after I did a typo), and 5.8.7 (most recent
version we have around).

Sample script:

#!/usr/intel/bin/perl5.87 -w
#
                                                                                                                                                   
my $child;
                                                                                                                                                   
if($child=fork()) {
                                                                                                                                                   
        print "Hi, I'm the parent! PID = $$\n";
                                                                                                                                                   
        local $SIG{INT} = sub { print "Caught SIGINT\n"; };
        local $SIG{KILL} = sub { print "Caught SIGKILL\n"; };
        local $SIG{TERM} = sub { print "Caught SIGTERM\n"; };
                                                                                                                                                   
        local $SIG{ALRM} = sub {
                print "Let's try and kill the child with undef..\n";
                kill(15, undef);
        };
                                                                                                                                                   
        alarm(10);
                                                                                                                                                   
        waitpid(-1, 0);
                                                                                                                                                   
} else {
        print "Hi, I'm the child! PID = $$\n";
        system("sleep 360");
}

Output:

filc8166[196]% pwd
/usr/users/a5fs/gwcooper
filc8166[197]% ./kill.pl
Hi, I'm the parent! PID = 31393
Hi, I'm the child! PID = 31394
Let's try and kill the child with undef..
Use of uninitialized value in kill at ./kill.pl line 18.
Caught SIGTERM
filc8166[198]% ps ux | grep 3139
gwcooper 31710  0.0  0.0   1752   696 pts/50   S+   10:50   0:00 grep 3139
filc8166[199]%

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=high
---
Site configuration information for perl v5.8.5:

Configured by tmnguye3 at Tue Sep 14 12:20:36 MST 2004.

Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
  Platform:
    osname=linux, osvers=2.4.9-45lxset12smp, archname=i686-linux-64int
    uname='linux chlx003 2.4.9-45lxset12smp #1 smp tue jan 27 00:35:25 pst 2004 i686 unknown '
    config_args='-Uusemymalloc -Dprefix=/usr/intel/pkgs/perl/5.8.5 -Dcc=/usr/intel/pkgs/gcc/3.3/bin/gcc -Doptimize=-O3 -Dloclibpth=/usr/intel/00r1/lib /usr/intel/pkgs/libxml2/2.6.11/lib -Dlocincpth=/usr/intel/00r1/include /usr/intel/pkgs/libxml2/2.6.11/include -Duse64bitint -Uinstallusrbinperl -Duselargefiles -Dperladmin=tmnguye3@sedona.intel.com -Duseshrplib=true -Uinstallusrbinperl -des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='/usr/intel/pkgs/gcc/3.3/bin/gcc', ccflags ='-fno-strict-aliasing -pipe -I/usr/intel/00r1/include -I/usr/intel/pkgs/libxml2/2.6.11/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O3',
    cppflags='-fno-strict-aliasing -pipe -I/usr/intel/00r1/include -I/usr/intel/pkgs/libxml2/2.6.11/include -I/usr/include/gdbm'
    ccversion='', gccversion='3.3', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='/usr/intel/pkgs/gcc/3.3/bin/gcc', ldflags =' -L/usr/intel/00r1/lib -L/usr/intel/pkgs/libxml2/2.6.11/lib'
    libpth=/usr/intel/00r1/lib /usr/intel/pkgs/libxml2/2.6.11/lib /lib /usr/lib /usr/local/lib
    libs=-lnsl -lndbm -lgdbm -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.2.4.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.2.4'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/intel/00r1/lib -L/usr/intel/pkgs/libxml2/2.6.11/lib'

Locally applied patches:
    

---
@INC for perl v5.8.5:
    /usr/intel/pkgs/perl/5.8.5/lib/5.8.5/i686-linux-64int
    /usr/intel/pkgs/perl/5.8.5/lib/5.8.5
    /usr/intel/pkgs/perl/5.8.5/lib/site_perl/5.8.5/i686-linux-64int
    /usr/intel/pkgs/perl/5.8.5/lib/site_perl/5.8.5
    /usr/intel/pkgs/perl/5.8.5/lib/site_perl
    .

---
Environment for perl v5.8.5:
    HOME=/usr/users/a5fs/gwcooper
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LC_COLLATE=C
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/opt/gnome/bin:/usr/users/a4fs/environment/imdenv/bin:/usr/intel/bin:/usr/local/bin:/usr/bin:/bin:/usr/ucb:/usr/etc:/etc:/usr/afsws/bin:/usr/bin/X11:/usr/common/script:/usr/users/a4fs/environment/genenv/bin:.:/toolbbs/etc:/usr/asic/bin:/usr/asic/pub/vhdl_utils/bin:/usr/users/a5fs/gwcooper/bin
    PERL_BADLANG (unset)
    SHELL=/usr/intel/00r1.1/bin/tcsh


Thread Next


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