Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Polite way to ask status of bug regarding Time::HiRes and newer versions of Perl

by jimhallsun (Sexton)
on May 02, 2018 at 16:11 UTC ( #1213954=perlquestion: print w/replies, xml ) Need Help??

jimhallsun has asked for the wisdom of the Perl Monks concerning the following question:

I am using perlbrew to install a newer version of perl onto a new MacBook I received (yay me!).

Install breaks down it seems due to Time::HiRes and some newer time functions in MacOS. Here is what I believe to be the responsible ticket:

It looks like patch is identified in the ticket and *looks* like the dev team was going to supply a back port fix for 5.24 and 5.26, but at least the perlbrew distro of 5.26.2 & 5.26.4 does not have the patch applied still.

What is the polite way to ask status on this ticket and just let the appropriate people know this fix impacts me in a nice and friendly way?



  • Comment on Polite way to ask status of bug regarding Time::HiRes and newer versions of Perl

Replies are listed 'Best First'.
Re: Polite way to ask status of bug regarding Time::HiRes and newer versions of Perl
by 1nickt (Abbot) on May 02, 2018 at 17:58 UTC

    Hi, you don't say so, but I assume you are building a threaded perl since that's where the problem occurs. Note that there are no issues with non-threaded perls.

    The definitive story seems to be buried in that thread:

    Versions of OS X prior to Sierra do not provide the functions clock_getres(), clock_gettime(), clock_nanosleep() and consequently versions of Time::HiRes prior to 1.9729 just disabled this functionality. perl5.22 @5.22.3 has 1.9726 so passes the test.

    Time::HiRes 1.9729 then implemented emulation of clock_getres(), clock_gettime(), clock_nanosleep() on OS X platforms as an enhancement

    Sierra however introduced clock_getres(), clock_gettime() but not clock_nanosleep() which broke the 1.9729 emulation code. This was fixed in Time::HiRes 1.9739 but perl5.24 @5.24.1 has 1.9733 so fails on Sierra.

    perl5.25 @5.25.9 has 1.9741 with this Sierra fix (and a few others for Sierra and El Capitan) so passes the test.

    So if you just make sure to install Time::HiRes >= v1.9741, you should be OK. Current version in CPAN is 1.9758. (Note that Time::HiRes is a so-called "dual-life" module that exists in Core and also standalone on CPAN. In such cases the CPAN version is usually more recent.)

    I'm building a threaded perl now so I can test this, will report back. Will you too, please?

    Hope this helps!

    The way forward always starts with a minimal test.

      Well, interestingly clock.t passes but now a different test fails, and sadly it is the same test that fails on the attempted Core Time::HiRes install, stat.t:

      ~/.cpanm/latest-build/Time-HiRes-1.9758 $ prove -lrv t/stat.t t/stat.t .. 1..43 # I am the main process 31657, starting the watchdog process... # The watchdog process 31658 launched, continuing testing... # I am the watchdog process 31658, sleeping for 360 seconds... ok 1 ok 2 ok 3 ok 4 ok 5 ok 6 ok 7 ok 8 ok 9 ok 10 ok 11 ok 12 not ok 13 # Failed test at t/stat.t line 35. # Structures begin differing at: # $got->[8] = '1525284927' # $expected->[8] = '1525284926' ok 14 ok 15 ok 16 ok 17 ok 18 ok 19 ok 20 ok 21 ok 22 ok 23 ok 24 ok 25 ok 26 ok 27 ok 28 ok 29 ok 30 ok 31 ok 32 ok 33 ok 34 ok 35 # mtime = 1525284926 1525284927 1525284927 1525284927 1525284927 # atime = 1525284926 1525284927 1525284927 1525284927 1525284928 # ai = 4, mi = 4, ss = 0 ok 36 # skip no subsecond timestamps detected ok 37 ok 38 ok 39 ok 40 ok 41 ok 42 ok 43 # I am the main process 31657, terminating the watchdog process 31658 +before it terminates me in 358 seconds (testing took 2 seconds). # kill KILL 31658 = 1 # All done. # Looks like you failed 1 test of 43. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/43 subtests (less 1 skipped subtest: 41 okay) Test Summary Report ------------------- t/stat.t (Wstat: 256 Tests: 43 Failed: 1) Failed test: 13 Non-zero exit status: 1 Files=1, Tests=43, 2 wallclock secs ( 0.03 usr 0.00 sys + 0.05 cusr + 0.01 csys = 0.09 CPU) Result: FAIL

      I guess the only thing left to try is 5.25.9 which according to that thread is patched.

      The way forward always starts with a minimal test.

      I am not building a threaded perl. Here is the relevant snippet from the perlbrew log:


      Getting the current patchlevel... (You have perl5 version 24 subversion 4.)

      Perl can be built to offer a form of threading support on some systems To do so, Configure can be run with -Dusethreads.

      Note that Perl built with threading support runs slightly slower and uses slightly more memory than plain Perl.

      If this doesn't make any sense to you, just accept the default 'n'. Build a threading Perl? n


      But there are sections of the build log that state the configure script is finding -lpthread and such....

      I am running macOS High Sierra 10.13.4, which I think is the latest.

        Hi there, if you are not building a threaded perl then I don't think you linked to the relevant issue. This seems to be an issue with stat.t which is thus far unreported.

        I note that on Sierra also, with an unthreaded 5.26.1, the latest Time::HiRes fails to install, as does the one installed as the Core version (1.9741) when I try to reinstall it from CPAN. Very odd. It obviously installed correctly when I built my perl(s). Given that, you might simply try building Perl 5.26.1 as your next attempt.

        Hope this helps!

        PS I guess CPAN Testers needs more Mac OS test reports, see App::Cpanminus::reporter.

        PPS I guess this is an intermittent issue; I am able to install Time::HiRes 1.9758 successfully on 5.26.1 about half the time.

        PPPS Given that it's intermittent, I would be wary of trusting Time::HiRes for accuracy. Maybe the issue is that it's just blocking your Perl install, in which case you could almost ignore it, or maybe it's critical to you, in which case you might have to install a Linux VM on your Macbook, I guess :-(

        The way forward always starts with a minimal test.
        Is there someone we should let know? Or do you think this will just sort in a reasonable amount of time?
Re: Polite way to ask status of bug regarding Time::HiRes and newer versions of Perl
by stevieb (Canon) on May 02, 2018 at 17:06 UTC

    What I'd do first, is /msg 1nickt and point him to this thread in case he doesn't come on for a while and misses the thread. Nick is one of our resident Mac folks around here and he usually knows about these types of things.

    Hopefully he can provide some guidance. I'm quite sure he's posted some Time::HiRes examples for our fellow Monks previously.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1213954]
Approved by haukex
Front-paged by haukex
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2020-08-11 03:19 GMT
Find Nodes?
    Voting Booth?
    Which rocket would you take to Mars?

    Results (58 votes). Check out past polls.