Skip Menu |

This queue is for tickets about the Time-Limit CPAN distribution.

Report information
The Basics
Id: 101411
Status: open
Priority: 0/
Queue: Time-Limit

People
Owner: Nobody in particular
Requestors: parv [...] pair.com
Cc:
AdminCc:

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



Subject: Time-Limit-0.003 - "-group" option produces 'Argument "-TERM" isn't numeric in kill'
Date: Thu, 8 Jan 2015 07:09:11 -1000
To: bug-Time-Limit [...] rt.cpan.org
From: parv [...] pair.com
Environment: Threaded perl here ... # perl -v This is perl 5, version 16, subversion 2 (v5.16.2) built for \ x86_64-linux Copyright 1987-2012, Larry Wall [...] # perl -MTime::Limit -e 'print $Time::Limit::VERSION' 0.003 # uanme -a Linux [...] 2.6.32-504.3.3.el6.x86_64 #1 \ SMP Wed Dec 17 01:55:02 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Description: Line 47 of Time::Limit is ... my $signal = ($counter > 1_000_000) ? 'TERM' : 'KILL'; $signal = -$signal if $opts{group}; ... that causes error when C<-group> option is used from kill that ... Argument "-TERM" isn't numeric in kill at \ /local64/perl-5.16/lib/site_perl/5.16.2/Time/Limit.pm line 50 If the situation is any clearer in perl past 5.16.2, then could you please add perl version check in Time::Limit to be usable. Or, please update the module to work with perl 5.16. Reproduction: After running for more than 2 seconds with perl 5.16.2 ... # perl -MTime::Limit=-group,-verbose,2 \ -E 'say scalar localtime() while 1' 2>&1 | tee x ... easily notice the the error from kill via ... # uniq x ... which, for example, was ... Thu Jan 8 05:26:02 2015 Thu Jan 8 05:26:03 2015 Thu Jan 8 05:26:04 2015 Thu Process 21285 timed out! at -e line 0. Sending -TERM to 21285 at -e line 0. Argument "-TERM" isn't numeric in kill at /local64/perl-5.16/lib/site_perl/5.16.2/Time/Limit.pm line 50. Jan 8 05:26:04 2015 Thu Jan 8 05:26:04 2015 Thu Jan 8 05:26:05 2015 Thu Jan 8 05:26:06 2015 Thu JaSending -TERM to 21285 at -e line 0. Argument "-TERM" isn't numeric in kill at /local64/perl-5.16/lib/site_perl/5.16.2/Time/Limit.pm line 50. n 8 05:26:06 2015 Thu Jan 8 05:26:06 2015 Thu Jan 8 05:26:07 2015 ... --
On 2015-01-08 12:09:29, parv@pair.com wrote: Show quoted text
> Environment: > > Threaded perl here ... > > # perl -v > This is perl 5, version 16, subversion 2 (v5.16.2) built for \ > x86_64-linux > > Copyright 1987-2012, Larry Wall > [...] > > > # perl -MTime::Limit -e 'print $Time::Limit::VERSION' > 0.003 > > # uanme -a > Linux [...] 2.6.32-504.3.3.el6.x86_64 #1 \ > SMP Wed Dec 17 01:55:02 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux > > Description: > Line 47 of Time::Limit is ... > > my $signal = ($counter > 1_000_000) ? 'TERM' : 'KILL'; > $signal = -$signal if $opts{group}; > > ... that causes error when C<-group> option is used from kill that > ... > > Argument "-TERM" isn't numeric in kill at \ > /local64/perl-5.16/lib/site_perl/5.16.2/Time/Limit.pm line 50 > > > If the situation is any clearer in perl past 5.16.2, then could > you please add perl version check in Time::Limit to be usable. Or, > please update the module to work with perl 5.16. > > > Reproduction: > > After running for more than 2 seconds with perl 5.16.2 ... > > # perl -MTime::Limit=-group,-verbose,2 \ > -E 'say scalar localtime() while 1' 2>&1 | tee x > > ... easily notice the the error from kill via ... > > # uniq x > > ... which, for example, was ... > > Thu Jan 8 05:26:02 2015 > Thu Jan 8 05:26:03 2015 > Thu Jan 8 05:26:04 2015 > Thu Process 21285 timed out! at -e line 0. > Sending -TERM to 21285 at -e line 0. > Argument "-TERM" isn't numeric in kill at /local64/perl- > 5.16/lib/site_perl/5.16.2/Time/Limit.pm line 50. > Jan 8 05:26:04 2015 > Thu Jan 8 05:26:04 2015 > Thu Jan 8 05:26:05 2015 > Thu Jan 8 05:26:06 2015 > Thu JaSending -TERM to 21285 at -e line 0. > Argument "-TERM" isn't numeric in kill at /local64/perl- > 5.16/lib/site_perl/5.16.2/Time/Limit.pm line 50. > n 8 05:26:06 2015 > Thu Jan 8 05:26:06 2015 > Thu Jan 8 05:26:07 2015 > ...
The "kill -SIGNAME" syntax was added in perl 5.18.0.
Subject: Re: [rt.cpan.org #101411] AutoReply: Time-Limit-0.003 - "-group" option produces 'Argument "-TERM" isn't numeric in kill'
Date: Thu, 8 Jan 2015 11:30:15 -1000
To: Bugs in Time-Limit via RT <bug-Time-Limit [...] rt.cpan.org>
From: parv [...] pair.com
in message <rt-4.0.18-12382-1420736969-1294.101411-3-0@rt.cpan.org>, wrote Bugs in Time-Limit via RT thusly... Show quoted text
> > This message has been automatically generated in response to the > creation of a trouble ticket regarding: > "Time-Limit-0.003 - "-group" option produces 'Argument "-TERM" isn't numeric in kill'", > a summary of which appears below.
... For the sake of clarity, I need to retract my claim in "Environment" section about perl being threaded. As "perl -v" states, that is not the case (but being threaded has no bearing on the error per SREZIC's note & my own testing.) Thanks SREZIC. - parv --
Subject: Re: [rt.cpan.org #101411] Time-Limit-0.003 - "-group" option produces 'Argument "-TERM" isn't numeric in kill'
Date: Thu, 8 Jan 2015 11:36:35 -1000
To: Slaven_Rezic via RT <bug-Time-Limit [...] rt.cpan.org>
From: parv [...] pair.com
in message <rt-4.0.18-12387-1420737472-48.101411-6-0@rt.cpan.org>, wrote Slaven_Rezic via RT thusly... Show quoted text
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=101411 > > > On 2015-01-08 12:09:29, parv@pair.com wrote:
... Show quoted text
> > # perl -v > > This is perl 5, version 16, subversion 2 (v5.16.2) built for \ > > x86_64-linux
... Show quoted text
> > # perl -MTime::Limit -e 'print $Time::Limit::VERSION' > > 0.003
... Show quoted text
> > Reproduction: > > > > After running for more than 2 seconds with perl 5.16.2 ... > > > > # perl -MTime::Limit=-group,-verbose,2 \ > > -E 'say scalar localtime() while 1' 2>&1 | tee x > > > > ... easily notice the the error from kill via ... > > > > # uniq x > > > > ... which, for example, was ... > > > > Thu Jan 8 05:26:02 2015 > > Thu Jan 8 05:26:03 2015 > > Thu Jan 8 05:26:04 2015 > > Thu Process 21285 timed out! at -e line 0. > > Sending -TERM to 21285 at -e line 0. > > Argument "-TERM" isn't numeric in kill at /local64/perl- > > 5.16/lib/site_perl/5.16.2/Time/Limit.pm line 50.
... Show quoted text
> The "kill -SIGNAME" syntax was added in perl 5.18.0.
Thanks again. Indeed, above code works just dandy in ... # perl -v This is perl 5, version 18, subversion 4 (v5.18.4) built for \ i386-freebsd-thread-multi-64int Copyright 1987-2013, Larry Wall ... # perl -MTime::Limit=-group,-verbose,2 \ -E 'say scalar localtime() while 1' 2>&1 | uniq Thu Jan 8 11:35:08 2015 Thu Jan 8 11:35:09 2015 Thu Jan 8 11:35:10 2015 Thu Jan 8 11:35:1Process 2176 timed out! at -e line 0. Sending -TERM to 2176 at -e line 0. zsh: terminated perl -MTime::Limit=-group,-verbose,2 -E 'say scalar localtime() while 1' 2>&1 | uniq - parv --