Skip Menu |

This queue is for tickets about the Sys-SigAction CPAN distribution.

Report information
The Basics
Id: 21777
Status: resolved
Worked: 7 hours (420 min)
Priority: 0/
Queue: Sys-SigAction

People
Owner: lab [...] lincolnbaxter.com.MAKE.ME.VALID
Requestors: fduranti [...] q8.it
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: Problem with perl 5.8.0 on RHEL3
Using Sys::SigAction 0.06. It seems that the "safe" signal handling in 5.8.0 at least on RedHat is completely broken when used with Sys::SigAction. The make test fail and also the simplest program using the set_sig_handler fail. This is the make test output: PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/attrs......skipped all skipped: requires perl 5.8.2 or later t/name.......ok t/nested.....ok 1/5Can't locate auto/POSIX/SigAction/safe.al in @INC (@INC contains: /root/.cpan/build/Sys-SigAction-0.06/blib/lib /root/.cpan/build/Sys-SigAction-0.06/blib/arch /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 . /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at /root/.cpan/build/Sys-SigAction-0.06/blib/lib/Sys/SigAction.pm line 84 # Looks like you planned 5 tests but only ran 1. # Looks like your test died just after 1. t/nested.....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-5 Failed 4/5 tests, 20.00% okay t/number.....ok t/timeout....ok 1/7# Failed test (t/timeout.t at line 32) t/timeout....ok 5/7# Failed test (t/timeout.t at line 51) t/timeout....NOK 6# Failed test (t/timeout.t at line 52) t/timeout....NOK 7# Looks like you failed 3 tests of 7. t/timeout....dubious Test returned status 3 (wstat 768, 0x300) DIED. FAILED tests 2, 6-7 Failed 3/7 tests, 57.14% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/nested.t 255 65280 5 4 80.00% 2-5 t/timeout.t 3 768 7 3 42.86% 2 6-7 1 test skipped. Failed 2/5 test scripts, 60.00% okay. 7/18 subtests failed, 61.11% okay. make: *** [test_dynamic] Error 2 I did some test and it's impossible to use the SigAction on it. This simple test will fail: #!/usr/bin/perl use strict; use warnings; use Sys::SigAction qw(set_sig_handler); use POSIX ':signal_h' ; my $errmsg=""; my $h=set_sig_handler( 'ALRM' ,sub { $errmsg="Timeout!"; }); with this error: Can't locate auto/POSIX/SigAction/safe.al in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at /usr/lib/perl5/site_perl/5.8.0/Sys/SigAction.pm line 84 SigAction.pm line 84 is: $act->safe($attrs->{safe}); It try to load auto/POSIX/SigAction/safe.al but at least on my RHEL machines that file don't exist. [root@ITROMLX101 root]# ls /usr/lib/perl5/5.8.0/auto/POSIX/SigAction/ flags.al handler.al mask.al Only 3 file exists here. for now I changed the line to $act->safe($attrs->{safe}) if ($attrs->{safe}); and it's working (at least if I don't define "safe"). [root@ITROMLX101 root]# uname -a Linux ITROMLX101 2.4.21-40.ELsmp #1 SMP Thu Feb 2 22:22:39 EST 2006 i686 i686 i386 GNU/Linux [root@ITROMLX101 root]# cat /etc/redhat-release Red Hat Enterprise Linux ES release 3 (Taroon Update 7) [root@ITROMLX101 root]# perl -V Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: Platform: osname=linux, osvers=2.4.21-25.elsmp, archname=i386-linux-thread-multi uname='linux porky.build.redhat.com 2.4.21-25.elsmp #1 smp fri nov 12 21:34:51 est 2004 i686 i686 i386 gnulinux ' config_args='-des -Doptimize=-O2 -g -pipe -march=i386 -mcpu=i686 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.0 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef 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='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O2 -g -pipe -march=i386 -mcpu=i686', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='3.2.3 20030502 (Red Hat Linux 3.2.3-54)', 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='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.3.2' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT Locally applied patches: MAINT18379 Built under linux Compiled at Dec 13 2005 16:27:05 @INC: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .
Yep... busted it in Perl < 5.8.2. Problem was... I and I knew this, is that I was not testing the perl version when >= 5.8.0 before using the safe attribute, which is only available after perl >= 5.8.2. Have a fix, out for testing...
I've built perl 5.6.2 and perl 5.8.1 to test this version with the version I normally use (currently 5.8.8). Version 0.07 uploaded to pause.cpan.org a few minutes ago. Lincoln