Subject: | HiRes time bug for Time-Format_XS-1.03 on RHEL 6.6 |
Date: | Tue, 10 Feb 2015 15:49:10 -0500 |
To: | bug-Time-Format_XS [...] rt.cpan.org |
From: | Stephen Comoletti <scomoletti [...] gmail.com> |
Was attempting to get Time::Format_XS working on a RHEL 6.6 guest and
noticed that it looses hires timing when using the XS module. Microseconds
return as all zeros.
Without XS when using pure perl it functions as expected.
I could not replicate the behavior on other linux variants even when
installed from same tgz files. I tested on a variety of Linux Mint and
Ubuntu distributions. All performed correctly.
My test script and output are below the system details. I also have some
RHEL 4.4, 4.5, 4.8, 6.4, 6.5, and 6.6 systems available to me for testing
if interested. I'd make an attempt at a fix myself but I haven't touched c
code in probably 15+ years now..
Thanks and regards,
Steve
Module: Time-Format_XS-1.03
[root@rh6-template] Log-File-2.11.00 $ uname -a
Linux rh6-template.amer.csc.com 2.6.32-504.8.1.el6.x86_64 #1 SMP Fri Dec 19
12:09:25 EST 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@rh6-template] Log-File-2.11.00 $ perl -V
Summary of my perl5 (revision 5 version 10 subversion 1) configuration:
Platform:
osname=linux, osvers=2.6.18-398.el5, archname=x86_64-linux-thread-multi
uname='linux x86-022.build.eng.bos.redhat.com 2.6.18-398.el5 #1 smp tue
aug 12 06:26:17 edt 2014 x86_64 x86_64 x86_64 gnulinux '
config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic -DDEBUGGING=-g -Dversion=5.10.1 -Dmyhostname=localhost
-Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dprefix=/usr
-Dvendorprefix=/usr -Dsiteprefix=/usr/local
-Dsitelib=/usr/local/share/perl5 -Dsitearch=/usr/local/lib64/perl5
-Dprivlib=/usr/share/perl5 -Darchlib=/usr/lib64/perl5
-Dvendorlib=/usr/share/perl5/vendor_perl
-Dvendorarch=/usr/lib64/perl5/vendor_perl -Dinc_version_list=5.10.0
-Darchname=x86_64-linux-thread-multi -Dlibpth=/usr/local/lib64 /lib64
/usr/lib64 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles
-Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog
-Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005
-Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto
-Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto
-Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto
-Dscriptdir=/usr/bin -Dusesitecustomize'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
-pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.4.7 20120313 (Red Hat 4.4.7-9)',
gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -fstack-protector'
libpth=/usr/local/lib64 /lib64 /usr/lib64
libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.12'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-rpath,/usr/lib64/perl5/CORE'
cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
USE_64_BIT_ALL
USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
USE_PERLIO USE_REENTRANT_API USE_SITECUSTOMIZE
Built under linux
Compiled at Nov 6 2014 07:57:41
@INC:
/usr/local/lib64/perl5
/usr/local/share/perl5
/usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl
/usr/lib64/perl5
/usr/share/perl5
.
[root@rh6-template] Log-File-2.11.00 $ more timeformat.pl
#!/usr/bin/perl
use Time::HiRes;
use Time::Format;
print "Time is $time{'yyyy-mm-dd hh:mm:ss.uuuuuu'}\n";
[root@rh6-template] Log-File-2.11.00 $ perl timeformat.pl
Time is 2015-02-10 20:32:58.000000
[root@rh6-template] Time-Format_XS-1.03 $ unlink
/usr/local/lib64/perl5/Time/Format_XS.pm
[root@rh6-template] Time-Format_XS-1.03 $ unlink
/usr/local/lib64/perl5/auto/Time/Format_XS/Format_XS.so
[root@rh6-template] Time-Format_XS-1.03 $ unlink
/usr/local/share/man/man3/Time::Format_XS.3pm
[root@rh6-template] Time-Format_XS-1.03 $ unlink
/usr/local/lib64/perl5/auto/Time/Format_XS/.packlist
[root@rh6-template] Log-File-2.11.00 $ perl timeformat.pl
Time is 2015-02-10 20:34:22.645090