Bug #10188
closedRegression of Benchmark.realtime
Description
After r47260, rubyci is sometimes failed. It seems to relate https://bugs.ruby-lang.org/issues/10165 .
- http://chkbuild001.hsbt.org/chkbuild/ruby-trunk/log/20140830T000025Z.fail.html.gz
- http://fb64b.rubyci.org/~chkbuild/ruby-trunk/log/20140830T033300Z.fail.html.gz
I investigate this on Amazon Linux 2014.3
https://gist.github.com/hsbt/2647af71d60121034c1c
In this results, Benchmark.realtime { sleep 0.001 }
returns 0.01 every 10 times.
Eric Wong
How about do you think this fail?
Updated by normalperson (Eric Wong) over 10 years ago
shibata.hiroshi@gmail.com wrote:
I investigate this on Amazon Linux 2014.3
Is this shared machine/VM? What kernel config/version?
Kernel config may be in /proc/config.* , otherwise distros may put
kernel config in /boot/config*
I'm mainly interested in *_HZ and preempt options.
https://gist.github.com/hsbt/2647af71d60121034c1c
In this results,
Benchmark.realtime { sleep 0.001 }
returns 0.01 every 10 times.
Yikes, wild timings :<
Eric Wong
How about do you think this fail?
I think the test case is too fragile. We should increase delta+sleep or
remove test. Based on comments on thread_pthread.c, 0.1s might be a
lower bound on portable timing granularity.
I think this can fail on your system even with the lib/benchmark.rb
optimization in r47260 reverted.
Updated by hsbt (Hiroshi SHIBATA) over 10 years ago
Eric Wong wrote:
shibata.hiroshi@gmail.com wrote:
I investigate this on Amazon Linux 2014.3
Is this shared machine/VM? What kernel config/version?
It's VM(AWS)
$ uname -a
Linux chkbuild001.hsbt.org 3.10.40-50.136.amzn1.x86_64 #1 SMP Tue May 13 21:35:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Kernel config may be in /proc/config.* , otherwise distros may put
kernel config in /boot/config*I'm mainly interested in *_HZ and preempt options.
[hsbt@chkbuild001 ~]$ cat /boot/config-3.10.53-56.140.amzn1.x86_64 | grep HZ
CONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
CONFIG_NO_HZ=y
# CONFIG_RCU_FAST_NO_HZ is not set
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
I think the test case is too fragile. We should increase delta+sleep or
remove test. Based on comments on thread_pthread.c, 0.1s might be a
lower bound on portable timing granularity.I think this can fail on your system even with the lib/benchmark.rb
optimization in r47260 reverted.
nobu added workaround to this issue. I think this regression is only available on
virtual environment.
PS. we discussed this issue using Japanese:
Updated by naruse (Yui NARUSE) almost 7 years ago
- Target version deleted (
2.2.0)
Updated by hsbt (Hiroshi SHIBATA) almost 7 years ago
- Status changed from Open to Rejected
It already fixed current trunk and other branches.