Project

General

Profile

Actions

Bug #10188

closed

Regression of Benchmark.realtime

Added by hsbt (Hiroshi SHIBATA) over 9 years ago. Updated about 6 years ago.

Status:
Rejected
Target version:
-
ruby -v:
ruby 2.2.0dev (2014-08-22 trunk 47254) [x86_64-darwin14]
[ruby-core:64667]

Description

After r47260, rubyci is sometimes failed. It seems to relate https://bugs.ruby-lang.org/issues/10165 .

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 9 years ago

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 9 years ago

Eric Wong wrote:

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:

https://twitter.com/kosaki55tea/status/505593070336081920

Actions #3

Updated by naruse (Yui NARUSE) over 6 years ago

  • Target version deleted (2.2.0)

Updated by hsbt (Hiroshi SHIBATA) about 6 years ago

  • Status changed from Open to Rejected

It already fixed current trunk and other branches.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0