Skip Menu |
Report information
Id: 128445
Status: open
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: randir <sergey.aleynikov [at] gmail.com>
Cc:
AdminCc:

Operating System: (no value)
PatchStatus: (no value)
Severity: medium
Type: core
Perl Version: 5.25.3
Fixed In: (no value)



Subject: Time::HiRes test failure on threaded dawrin build
Download (untitled) / with headers
text/plain 4.6k
This is a bug report for perl from sergey.aleynikov@gmail.com, generated with the help of perlbug 1.40 running under perl 5.25.3. ----------------------------------------------------------------- [Please describe your issue here] The following test consistently fails on threaded build (and passes on non-threaded): ./perl -Ilib -Idist/Time-HiRes dist/Time-HiRes/t/clock.t 1..5 # I am the main process 52997, starting the watchdog process... # The watchdog process 52998 launched, continuing testing... # I am the watchdog process 52998, sleeping for 360 seconds... ok 1 - require Time::HiRes; # have_clock_gettime = 1 # have_clock_getres = 1 # have_clock_nanosleep = 1 # have_clock = 1 # CLOCK_REALTIME: try = 1 panic: MUTEX_LOCK (22) [HiRes.xs:773] at dist/Time-HiRes/t/clock.t line 40. # I am the main process 52997, terminating the watchdog process 52998 before it terminates me in 360 seconds (testing took 0 seconds). # kill KILL 52998 = 1 # All done. # Looks like your test exited with 255 just after 1. [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=medium --- Site configuration information for perl 5.25.3: Configured by dur-randir at Tue Jun 21 14:51:01 MSK 2016. Summary of my perl5 (revision 5 version 25 subversion 3) configuration: Snapshot of: 143048c08af5307d9b4ff95c3322a6c67cff93cd Platform: osname=darwin osvers=13.4.0 archname=darwin-thread-multi-2level uname='darwin isengard.local 13.4.0 darwin kernel version 13.4.0: wed mar 18 16:20:14 pdt 2015; root:xnu-2422.115.14~1release_x86_64 x86_64 ' config_args='-de -Dprefix=/Users/dur-randir/perlbrew/perls/perl-blead-thr-dbg -Dusethreads -DDEBUGGING -Dusedevel -Aeval:scriptdir=/Users/dur-randir/perlbrew/perls/perl-blead-thr-dbg/bin' hint=recommended useposix=true d_sigaction=define useithreads=define usemultiplicity=define use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n bincompat5005=undef Compiler: cc='cc' ccflags ='-fno-common -DPERL_DARWIN -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' optimize='-O3 -g' cppflags='-fno-common -DPERL_DARWIN -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='' gccversion='4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)' gccosandvers='' intsize=4 longsize=8 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=define longlongsize=8 d_longdbl=define longdblsize=16 longdblkind=3 ivtype='long' ivsize=8 nvtype='double' nvsize=8 Off_t='off_t' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc' ldflags =' -fstack-protector -L/usr/local/lib' libpth=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/lib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib /usr/local/lib /usr/lib libs=-lpthread -lgdbm -ldbm -ldl -lm -lutil -lc perllibs=-lpthread -ldl -lm -lutil -lc libc= so=dylib useshrplib=false libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs dlext=bundle d_dlsymun=undef ccdlflags=' ' cccdlflags=' ' lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector' --- @INC for perl 5.25.3: lib /Users/dur-randir/perlbrew/perls/perl-blead-thr-dbg/lib/site_perl/5.25.3/darwin-thread-multi-2level /Users/dur-randir/perlbrew/perls/perl-blead-thr-dbg/lib/site_perl/5.25.3 /Users/dur-randir/perlbrew/perls/perl-blead-thr-dbg/lib/5.25.3/darwin-thread-multi-2level /Users/dur-randir/perlbrew/perls/perl-blead-thr-dbg/lib/5.25.3 . --- Environment for perl 5.25.3: DYLD_LIBRARY_PATH (unset) HOME=/Users/dur-randir LANG=en_US.UTF-8 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/Users/dur-randir/perlbrew/bin:/Users/dur-randir/perlbrew/perls/perl-5.20.2/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin PERLBREW_BASHRC_VERSION=0.69 PERLBREW_HOME=/Users/dur-randir/.perlbrew PERLBREW_MANPATH=/Users/dur-randir/perlbrew/perls/perl-5.20.2/man PERLBREW_PATH=/Users/dur-randir/perlbrew/bin:/Users/dur-randir/perlbrew/perls/perl-5.20.2/bin PERLBREW_PERL=perl-5.20.2 PERLBREW_ROOT=/Users/dur-randir/perlbrew PERLBREW_VERSION=0.69 PERL_BADLANG (unset) SHELL=/usr/local/bin/zsh
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.1k
On Tue Jun 21 05:31:08 2016, randir wrote: Show quoted text
> The following test consistently fails on threaded build (and passes on > non-threaded): > > ./perl -Ilib -Idist/Time-HiRes dist/Time-HiRes/t/clock.t > 1..5 > # I am the main process 52997, starting the watchdog process... > # The watchdog process 52998 launched, continuing testing... > # I am the watchdog process 52998, sleeping for 360 seconds... > ok 1 - require Time::HiRes; > # have_clock_gettime = 1 > # have_clock_getres = 1 > # have_clock_nanosleep = 1 > # have_clock = 1 > # CLOCK_REALTIME: try = 1 > panic: MUTEX_LOCK (22) [HiRes.xs:773] at dist/Time-HiRes/t/clock.t > line 40. > # I am the main process 52997, terminating the watchdog process 52998 > before it terminates me in 360 seconds (testing took 0 seconds). > # kill KILL 52998 = 1 > # All done. > # Looks like your test exited with 255 just after 1. >
This appears to have been fixed in blead, probably by commit c4a535af41823cc84534bf8dbecfdcc3eb7daa86 Author: Steve Hay <steve.m.hay@googlemail.com> Date: Fri Jul 1 08:27:18 2016 +0100 Upgrade Time::HiRes from version 1.9734 to 1.9739 which is confusing, since it's blead upstream. Tony
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 326b
On Tue Jul 19 22:45:43 2016, tonyc wrote: Show quoted text
> This appears to have been fixed in blead, probably by > > commit c4a535af41823cc84534bf8dbecfdcc3eb7daa86 > Author: Steve Hay <steve.m.hay@googlemail.com> > Date: Fri Jul 1 08:27:18 2016 +0100 > > Upgrade Time::HiRes from version 1.9734 to 1.9739
Yes, it passes tests now.
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.2k
Dne Wed, 20 Jul 2016 04:42:48 -0700 je randir napisal: Show quoted text
> > Yes, it passes tests now.
I'm probably experiencing the same problem with 5.24.1 (on OS X 10.7), but I checked 5.25.9 after finding this thread and all the tests pass on 5.25.9. Is there any chance to backport the fix? Thank you. Some additional information below. Just in case here's the relevant chuck from the tests (to make sure it's the same issue?): dist/Time-HiRes/t/clock ....................................... panic: MUTEX_LOCK (22) [HiRes.xs:773] at t/clock.t line 40. # Looks like you planned 5 tests but ran 1. # Looks like your test exited with 255 just after 1. FAILED--expected 5 tests, saw 1 This might be related to: https://rt.perl.org/Public/Bug/Display.html?id=128972 Also relevant. I'm using the following patch for 5.24, else the build would fail on Sierra: --- dist/Time-HiRes/HiRes.xs.orig +++ dist/Time-HiRes/HiRes.xs @@ -940,7 +940,7 @@ BOOT: } # endif #endif -#if defined(PERL_DARWIN) +#if defined(PERL_DARWIN) && !defined(CLOCK_REALTIME) # ifdef USE_ITHREADS MUTEX_INIT(&darwin_time_mutex); # endif It could also be that the test fails because of this patch. https://trac.macports.org/ticket/52012 https://trac.macports.org/ticket/53440
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 915b
The tests succeed with perl5.25.9. One of our developers says that the problem is in the included version of Time::HiRes: v5.22.3 1.9726 v5.24.1 1.9733 v5.25.9 1.9741 Citing David: Show quoted text
> 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.
From: Leon Timmermans <fawaka [...] gmail.com>
Subject: Re: [perl #128445] Time::HiRes test failure on threaded darwin build
To: perlbug <perlbug-followup [...] perl.org>
CC: Perl5 Porters <perl5-porters [...] perl.org>
Date: Fri, 17 Feb 2017 11:15:54 +0100
Download (untitled) / with headers
text/plain 453b
On Mon, Jan 30, 2017 at 12:59 PM, Mojca Miklavec via RT <perlbug-followup@perl.org> wrote: Show quoted text
> Dne Wed, 20 Jul 2016 04:42:48 -0700 je randir napisal:
>> >> Yes, it passes tests now.
> > I'm probably experiencing the same problem with 5.24.1 (on OS X 10.7), but I checked 5.25.9 after finding this thread and all the tests pass on 5.25.9. Is there any chance to backport the fix? Thank you.
Yeah, this does sound like a sensible thing to backport. Leon
Subject: Re: [perl #128445] Time::HiRes test failure on threaded darwin build
To: Leon Timmermans <fawaka [...] gmail.com>, perlbug <perlbug-followup [...] perl.org>
CC: Perl5 Porters <perl5-porters [...] perl.org>
Date: Fri, 24 Feb 2017 11:15:58 +0100
From: Sawyer X <xsawyerx [...] gmail.com>
Download (untitled) / with headers
text/plain 509b
On 02/17/2017 11:15 AM, Leon Timmermans wrote: Show quoted text
> On Mon, Jan 30, 2017 at 12:59 PM, Mojca Miklavec via RT > <perlbug-followup@perl.org> wrote:
>> Dne Wed, 20 Jul 2016 04:42:48 -0700 je randir napisal:
>>> Yes, it passes tests now.
>> I'm probably experiencing the same problem with 5.24.1 (on OS X 10.7), but I checked 5.25.9 after finding this thread and all the tests pass on 5.25.9. Is there any chance to backport the fix? Thank you.
> Yeah, this does sound like a sensible thing to backport.
I agree.
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 122b
Note: Backporting a newer Time::HiRes for 5.24.3 is under discussion in https://rt.perl.org/Ticket/Display.html?id=128427.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org