Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.24.0] gettimeofday.t fails "time left should be zero" #15317

Closed
p5pRT opened this issue May 10, 2016 · 12 comments
Closed

[5.24.0] gettimeofday.t fails "time left should be zero" #15317

p5pRT opened this issue May 10, 2016 · 12 comments

Comments

@p5pRT
Copy link

p5pRT commented May 10, 2016

Migrated from rt.perl.org#128111 (status was 'rejected')

Searchable as RT128111$

@p5pRT
Copy link
Author

p5pRT commented May 10, 2016

From plate@patterner.de

../dist/Time-HiRes/t/gettimeofday.t ............................... ok

# Failed test 'time left should be zero'
# at t/itimer.t line 63.
# got​: '0.000999999999999999955'
# expected​: '0'

t/itimer.t​: overall time allowed for tests (360s) exceeded!
../dist/Time-HiRes/t/itimer.t .....................................
Failed 1/2 subtests

@p5pRT
Copy link
Author

p5pRT commented May 10, 2016

From plate@patterner.de

clang 3.8.0

perlbrew install perl-5.24.0 -DPERL_SUB_DEPTH_WARN=1000 -Dusethreads -Dcccdlflags=-fPIC -Dcc=clang -Doptimize="-march=native -O3 -pipe" -Duseshrplib -Duse64bitall -DEBUGGING=none -Duselongdouble -Dusesitecustomize -Dusemorebits

@p5pRT
Copy link
Author

p5pRT commented May 10, 2016

From [Unknown Contact. See original ticket]

clang 3.8.0

perlbrew install perl-5.24.0 -DPERL_SUB_DEPTH_WARN=1000 -Dusethreads -Dcccdlflags=-fPIC -Dcc=clang -Doptimize="-march=native -O3 -pipe" -Duseshrplib -Duse64bitall -DEBUGGING=none -Duselongdouble -Dusesitecustomize -Dusemorebits

@p5pRT
Copy link
Author

p5pRT commented May 11, 2016

From @jkeenan

On Tue May 10 07​:48​:32 2016, plate wrote​:

clang 3.8.0

perlbrew install perl-5.24.0 -DPERL_SUB_DEPTH_WARN=1000 -Dusethreads
-Dcccdlflags=-fPIC -Dcc=clang -Doptimize="-march=native -O3 -pipe"
-Duseshrplib -Duse64bitall -DEBUGGING=none -Duselongdouble
-Dusesitecustomize -Dusemorebits

Could you post the complete output of 'perl -V' for this build of Perl?

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented May 11, 2016

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented May 12, 2016

From @jkeenan

On Tue May 10 07​:48​:32 2016, plate wrote​:

clang 3.8.0

perlbrew install perl-5.24.0 -DPERL_SUB_DEPTH_WARN=1000 -Dusethreads
-Dcccdlflags=-fPIC -Dcc=clang -Doptimize="-march=native -O3 -pipe"
-Duseshrplib -Duse64bitall -DEBUGGING=none -Duselongdouble
-Dusesitecustomize -Dusemorebits

I tried to reproduce your test failure but could not. But I did experience a strange problem when I compiled and built perl with clang and your list of switches to Configure.

First, I configured as I normally do with gcc, but used clang instead. On my machine, I only have available clang version 3.6.0.
#####
$ sh ./Configure -des -Dusedevel -Dcc=clang && make test
$ make -j8 test_harness
#####

All tests passed; see attachment for output of ./perl -Ilib -V. I then called​:

#####
$ cd t;./perl harness -v ../dist/Time-HiRes/t/itimer.t;cd -

ok 1 - ITIMER_VIRTUAL defined with sufficient granularity
ok 2 - time left should be zero
ok
All tests successful.
Files=1, Tests=2, 2 wallclock secs ( 0.01 usr 0.00 sys + 1.71 cusr 0.01 csys = 1.73 CPU)
Result​: PASS
#####

I then reconfigured with clang and your complete list of switches​:
#####
$ sh ./Configure -des -Dusedevel -DPERL_SUB_DEPTH_WARN=1000 -Dusethreads -Dcccdlflags=-fPIC -Dcc=clang -Doptimize="-march=native -O3 -pipe" -Duseshrplib -Duse64bitall -DEBUGGING=none -Duselongdouble -Dusesitecustomize -Dusemorebits
$ make -j8 test_harness
#####

# All tests passed, but then ...

#####
$ ./perl -v
./perl​: error while loading shared libraries​: libperl.so​: cannot open shared object file​: No such file or directory
#####

... notwithstanding ...

#####
$ ls -l libperl.so
-rwxrwxr-x 1 jkeenan jkeenan 2225788 May 11 20​:58 libperl.so
#####

So, building with clang and that list of configuration switches, perl got ... confused.

Would you be able to reconfigure with clang but *without* the list of switches and see if you get the test failure you originally reported? If you do not, then you should probably try to reconfigure adding one switch at a time until you get the failure.

Thank you very much.
Jim Keenan

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented May 12, 2016

From @cpansprout

On Wed May 11 18​:15​:33 2016, jkeenan wrote​:

#####
$ ./perl -v
./perl​: error while loading shared libraries​: libperl.so​: cannot open
shared object file​: No such file or directory
#####

... notwithstanding ...

#####
$ ls -l libperl.so
-rwxrwxr-x 1 jkeenan jkeenan 2225788 May 11 20​:58 libperl.so
#####

So, building with clang and that list of configuration switches, perl
got ... confused.

When you build with -Duseshrplib, the perl binary is just a thin wrapper that loads the shared library. If the library has not been installed, you need to set the LD_LIBRARY_PATH env var to . so that the shared library can be located​:

$ LD_LIBRARY_PATH=. ./perl -v

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented May 12, 2016

From @jkeenan

On Wed May 11 21​:25​:16 2016, sprout wrote​:

On Wed May 11 18​:15​:33 2016, jkeenan wrote​:

#####
$ ./perl -v
./perl​: error while loading shared libraries​: libperl.so​: cannot open
shared object file​: No such file or directory
#####

... notwithstanding ...

#####
$ ls -l libperl.so
-rwxrwxr-x 1 jkeenan jkeenan 2225788 May 11 20​:58 libperl.so
#####

So, building with clang and that list of configuration switches, perl
got ... confused.

When you build with -Duseshrplib, the perl binary is just a thin
wrapper that loads the shared library. If the library has not been
installed, you need to set the LD_LIBRARY_PATH env var to . so that
the shared library can be located​:

$ LD_LIBRARY_PATH=. ./perl -v

Thanks, FC, for that suggestion.

#####
[perl] 72 $ export LD_LIBRARY_PATH="/home/jkeenan/gitwork/perl"
[perl] 73 $ cd t; ./perl harness -v ../dist/Time-HiRes/t/itimer.t;cd -

ok 1 - ITIMER_VIRTUAL defined with sufficient granularity
ok 2 - time left should be zero
ok
All tests successful.
Files=1, Tests=2, 2 wallclock secs ( 0.01 usr 0.00 sys + 1.73 cusr 0.00 csys = 1.74 CPU)
Result​: PASS
/home/jkeenan/gitwork/perl
#####

The above was built with clang and the same Configure switches previously listed. So I am unable to reproduce the OP's problem.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented May 19, 2016

From @tonycoz

On Tue May 10 07​:46​:48 2016, plate wrote​:

../dist/Time-HiRes/t/gettimeofday.t ............................... ok

# Failed test 'time left should be zero'
# at t/itimer.t line 63.
# got​: '0.000999999999999999955'
# expected​: '0'

t/itimer.t​: overall time allowed for tests (360s) exceeded!
../dist/Time-HiRes/t/itimer.t .....................................
Failed 1/2 subtests

Provide the output of perl -V please.

If you haven't installed this perl yet, you can do​:

  ./perl -Ilib -V

from the build directory. At this point we can't tell what operating system you're running.

Does the failure occur every time? Is this in a virtual machine (which can cause timing issues) or an operating system running directly on the hardware?

Tony

@p5pRT
Copy link
Author

p5pRT commented May 19, 2016

From plate@patterner.de

Does the failure occur every time?
It's gone and I cannot reproduce it anymore. Feel free to close it when the other comments are resolved.

Is this in a virtual machine (which can cause timing issues)
or an operating system running directly on the hardware?
Debian testing directly on a W530 ThinkPad.

@p5pRT
Copy link
Author

p5pRT commented May 19, 2016

From @jkeenan

Closing per message from original poster.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented May 19, 2016

@jkeenan - Status changed from 'open' to 'rejected'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant