develooper Front page | perl.perl5.porters | Postings from July 2014

[perl #122202] Benchmark.t fails due time prediction failure with TEST_JOBS=2 + make test_harness

Thread Previous | Thread Next
From:
Kent Fredric
Date:
July 1, 2014 09:43
Subject:
[perl #122202] Benchmark.t fails due time prediction failure with TEST_JOBS=2 + make test_harness
Message ID:
rt-4.0.18-4924-1404207788-1500.122202-75-0@perl.org
# New Ticket Created by  Kent Fredric 
# Please include the string:  [perl #122202]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=122202 >


perl: 5.18.2


It doesn't make much sense to me to have a test that relies on CPU time being predictable.

https://gist.github.com/kentfredric/264d2b9a0f169f72c148

__
TESTFILE=harness LD_LIBRARY_PATH=/tmp/portage/dev\-lang\-perl\-5.18.2/work/perl\-5.18.2 ./runtests choose
No saved state, selection will be empty
base/cond.t ....................................................... ok   

...

../lib/AnyDBM_File.t .............................................. ok
===( 243983;1819 16532/? 10/196 )===================================
# Failed test 'is 50.6378802747792 within 0.4 of estimate (159.34)'
# at ../lib/Benchmark.t line 93.
# '2.14665620155039'
# <=
# '0.4'
# in_threesecs = 1603
# in_threesecs_adj = 478.031809145129
# cpu3 = 10.06
# sys3 = 0.91
# estimate = 159.34
# in_onesec = 516
# in_onesec_adj = 50.6378802747792
# cpu1 = 10.19
# sys1 = 1.17
../lib/Benchmark.t ................................................ Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/196 subtests 

There's a reference or two to this being a problem with TEST_JOBS, and a suggested patch, its just not clear that that patch ever got merged:

http://www.nntp.perl.org/group/perl.perl5.porters/2010/02/msg156265.html

And there's similar failures from jenkins I dug up: 

http://www.nntp.perl.org/group/perl.perl5.porters/2012/09/msg193348.html 

Overall, it just seems unwise to have this test being something that can fail to start with, CPU time is notoriously unpredictable. 

For instance, if you're running close to capacity and don't have ideal cooling (ie: laptops), thermal throttle can kick in winding CPU clock speed back to a mere 33% of standard performance, and that could be momentary, or somewhat lengthy, and it can enter a state of hysteresis, bursting between high performance and throttled at every 5 seconds.

( This computer in question is not usually subject to that specific hysteresis issue, but I have another one that has that problem routinely )


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About