develooper Front page | perl.perl5.porters | Postings from December 2010

[perl #81074] Perl reports SIGINT handler "IGNORE" not defined in multi-threaded apps

Thread Next
From:
jens . schmidt35 @ arcor . de
Date:
December 21, 2010 13:10
Subject:
[perl #81074] Perl reports SIGINT handler "IGNORE" not defined in multi-threaded apps
Message ID:
rt-3.6.HEAD-5425-1292931993-1156.81074-75-0@perl.org
# New Ticket Created by  jens.schmidt35@arcor.de 
# Please include the string:  [perl #81074]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81074 >



This is a bug report for perl from jens.schmidt35@arcor.de,
generated with the help of perlbug 1.39 running under perl 5.12.2.


-----------------------------------------------------------------
[Please describe your issue here]

Consider the following testcase:

---- snip ----
use strict;
use warnings;
use threads;

my $th = threads->create( sub { $SIG{INT} = 'IGNORE';  while ( 1 ) { sleep( 10 ) } } );

$SIG{INT} = sub{ print threads->tid(), "\n" };
while ( 1 ) { sleep( 10 ); }
---- snip ----

Run it in the background as "perl test.pl 1>test.out 2>&1 &".
Then start a signalling loop, like this:

  bash$ while true; do kill -INT %1; done 

In my set-up, the generated file test.out contains warnings
'SIGINT handler "IGNORE" not defined.'

The same happens for "inter-thread signals" delivered via
$th->signal( "INT" ).

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=library
    severity=medium
    module=threads
---
Site configuration information for perl 5.12.2:

Configured by oraic at Mon Dec 20 11:09:30 CET 2010.

Summary of my perl5 (revision 5 version 12 subversion 2) configuration:
   
  Platform:
    osname=linux, osvers=2.6.18-8.el5, archname=i686-linux-thread-multi
    uname='linux ls3094 2.6.18-8.el5 #1 smp fri jan 26 14:15:21 est 2007 i686 i686 i386 gnulinux '
    config_args='-d -Dusethreads=yes -Dusevendorprefix=no -Dprefix=/sapmnt/oraic/tools/perl-5.12'
    hint=recommended, useposix=true, d_sigaction=define
    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 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.1.1 20070105 (Red Hat 4.1.1-52)', 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 =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.5.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.5'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'

Locally applied patches:
    

---
@INC for perl 5.12.2:
    /sapmnt/oraic/tools/perl-5.12/lib/site_perl/5.12.2/i686-linux-thread-multi
    /sapmnt/oraic/tools/perl-5.12/lib/site_perl/5.12.2
    /sapmnt/oraic/tools/perl-5.12/lib/5.12.2/i686-linux-thread-multi
    /sapmnt/oraic/tools/perl-5.12/lib/5.12.2
    .

---
Environment for perl 5.12.2:
    HOME=/sapmnt/home2/oraic
    LANG=C
    LANGUAGE (unset)
    LC_COLLATE=C
    LC_TIME=POSIX
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin
    PERL_BADLANG (unset)
    SHELL=/bin/csh


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