Skip Menu |

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

Report information
The Basics
Id: 54196
Status: resolved
Priority: 0/
Queue: Time-HiRes

People
Owner: Nobody in particular
Requestors: nick [...] ccl4.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 1.9713
  • 1.9714
  • 1.9715
  • 1.9716
  • 1.9717
  • 1.9718
  • 1.9719
Fixed in: (no value)



Subject: alarm and ularm return values are bogus
The return value for alarm was broken by 1.9713. (As was setting the alarm) The return value for ualarm was broken by 1.9716 (which fixed setting the alarm) Working version (1.9712): $ perl5.8.9 -Mblib -MTime::HiRes=alarm -e 'warn $Time::HiRes::VERSION; warn alarm 3; warn alarm 3; sleep 5' 1.9712 at -e line 1. 0 at -e line 1. 2.999941 at -e line 1. Alarm clock Completely broken (1.9713): $ perl5.8.9 -Mblib -MTime::HiRes=alarm -e 'warn $Time::HiRes::VERSION; warn alarm 3; warn alarm 3; sleep 5' 1.9713 at -e line 1. 4.94065645841247e-324 at -e line 1. 4.94065645841247e-324 at -e line 1. Bad return value (1.9716): $ perl5.8.9 -Mblib -MTime::HiRes=alarm -e 'warn $Time::HiRes::VERSION; warn alarm 3; warn alarm 3; sleep 5' 1.9716 at -e line 1. 0 at -e line 1. 0 at -e line 1. Alarm clock Working version (1.9715): $ perl5.8.9 -Mblib -MTime::HiRes=ualarm -e 'warn $Time::HiRes::VERSION; warn ualarm 9e5; warn ualarm 9e5; sleep 5' 1.9715 at -e line 1. 0 at -e line 1. 899946 at -e line 1. Alarm clock Bad return value (1.9716): $ perl5.8.9 -Mblib -MTime::HiRes=ualarm -e 'warn $Time::HiRes::VERSION; warn ualarm 9e5; warn ualarm 9e5; sleep 5' 1.9716 at -e line 1. 0 at -e line 1. 0 at -e line 1. Alarm clock Code patch attached. I don't have a proper regression test (yet).
Subject: HR
Download HR
application/octet-stream 1.9k

Message body not shown because it is not plain text.

From: nick [...] ccl4.org
On Mon Feb 01 12:32:35 2010, nick@ccl4.org wrote: Show quoted text
> The return value for alarm was broken by 1.9713. (As was setting the
alarm) Show quoted text
> The return value for ualarm was broken by 1.9716 (which fixed setting > the alarm)
Show quoted text
> Code patch attached. I don't have a proper regression test (yet).
Test patch attached.
Subject: test
Download test
application/octet-stream 3.3k

Message body not shown because it is not plain text.

This patch appears to have gone in as of Time-HiRes-1.9720. Since then, test 42 is failing on multiple systems I build against. Note that I am building inside of vmware guests which are notoriously sketchy with respect to clock, but until now, I have had no issues with this test suite. I'd also suspect this test may be unstable in core if parallel tests are run? Note that I am testing against bleed Perl. A partial list of the guests that crashed for me are: 64/fedora/3]]: Failed test: 42 64/fedora/2]]: Failed test: 42 64/mandrake/2006]]: Failed test: 42 64/redhat/ES-4]]: Failed test: 42 64/suse/9.1]]: Failed test: 42 64/suse/9.3]]: Failed test: 42 caos/2]]: Failed test: 42
The test in question is: ok(42, $got > 0 && $got <= 1.7, $got); This I Assume is on the original alarm: my $got = Time::HiRes::alarm(2.7); The value I'm getting back is 1.7004 Is it possible this is a 64bit floating point error and we should tweak it on test 42? I'd even go for.. -ok(42, $got > 0 && $got <= 1.7, $got); +ok(42, $got > 0 && $got < 1.71, $got);
On Fri Feb 26 16:07:11 2010, TODDR wrote: Show quoted text
> The value I'm getting back is 1.7004
Sorry, I gave the wrong value. The value I'm getting is 1.700741 and Re-running prove only sometimes fails.
I also see test failures on test 42 here on many of our build machines (OS X, Linux x86-64, Windows x86, HP-UX). Our AIX, Linux x86, Solaris builds pass this test.
Subject: Re: [rt.cpan.org #54196] alarm and ularm return values are bogus
Date: Mon, 15 Mar 2010 17:41:31 -0400
To: bug-Time-HiRes [...] rt.cpan.org
From: Jarkko Hietaniemi <jhi [...] iki.fi>
On Monday-201003-15 17:29, Gisle_Aas via RT wrote: Show quoted text
> Queue: Time-HiRes > Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=54196> > > I also see test failures on test 42 here on many of our build machines (OS X, Linux x86-64, > Windows x86, HP-UX). Our AIX, Linux x86, Solaris builds pass this test. >
Patches welcome.
Subject: Re: [rt.cpan.org #54196] alarm and ularm return values are bogus
Date: Tue, 16 Mar 2010 09:10:35 +0000
To: "jhi [...] iki.fi via RT" <bug-Time-HiRes [...] rt.cpan.org>
From: Nicholas Clark <nick [...] ccl4.org>
On Mon, Mar 15, 2010 at 05:42:35PM -0400, jhi@iki.fi via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=54196 > > > On Monday-201003-15 17:29, Gisle_Aas via RT wrote:
> > Queue: Time-HiRes > > Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=54196> > > > > I also see test failures on test 42 here on many of our build machines (OS X, Linux x86-64, > > Windows x86, HP-UX). Our AIX, Linux x86, Solaris builds pass this test. > >
> > Patches welcome.
For this bug, I don't think that I can do better than the patches I've already sent. Sorry. Works on "my" machine, for all systems I have access to. Nicholas Clark
Subject: Re: [rt.cpan.org #54196] alarm and ularm return values are bogus
Date: Tue, 16 Mar 2010 17:39:29 -0400
To: bug-Time-HiRes [...] rt.cpan.org
From: Jarkko Hietaniemi <jhi [...] iki.fi>
On Tuesday-201003-16 6:42, Nicholas Clark via RT wrote: Show quoted text
> Queue: Time-HiRes > Ticket<URL: http://rt.cpan.org/Ticket/Display.html?id=54196> > > On Mon, Mar 15, 2010 at 05:42:35PM -0400, jhi@iki.fi via RT wrote:
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=54196> >> >> On Monday-201003-15 17:29, Gisle_Aas via RT wrote:
>>> Queue: Time-HiRes >>> Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=54196> >>> >>> I also see test failures on test 42 here on many of our build machines (OS X, Linux x86-64, >>> Windows x86, HP-UX). Our AIX, Linux x86, Solaris builds pass this test. >>>
>> >> Patches welcome.
> > For this bug, I don't think that I can do better than the patches I've already > sent. Sorry. Works on "my" machine, for all systems I have access to.
My words exactly. Show quoted text
> Nicholas Clark > >
With the attached patch the build now pass on all our Unix machines. Our HP-UX machine needed even more leeway than what Todd proposed in his version of this patch. We still have test failures on Windows but that seem to be a separate issue. Jan will look into that.
Subject: 0001-Make-test-42-less-strict.patch
From 82db38a31ce2270c8487bbd061e8271df8c2c02a Mon Sep 17 00:00:00 2001 From: Todd Rinaldo <> Date: Mon, 15 Mar 2010 22:40:15 +0100 Subject: [PATCH] Make test 42 less strict https://rt.cpan.org/Ticket/Display.html?id=54196 --- t/HiRes.t | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/t/HiRes.t b/t/HiRes.t index db25fea..986eecd 100644 --- a/t/HiRes.t +++ b/t/HiRes.t @@ -775,7 +775,7 @@ unless ($can_subsecond_alarm) { 1 while time() - $t0 <= 1; $got = Time::HiRes::alarm(0); - ok(42, $got > 0 && $got <= 1.7, $got); + ok(42, $got > 0 && $got < 1.8, $got); ok(43, $alrm == 0, $alrm); -- 1.6.6.rc1.31.g1a56b
See Time::HiRes 1.9721.