[#62297] Re: [ruby-cvs:52906] nari:r45760 (trunk): * gc.c (gc_after_sweep): suppress unnecessary expanding heap. — Eric Wong <normalperson@...>
nari@ruby-lang.org wrote:
7 messages
2014/05/02
[#62307] Re: [ruby-cvs:52906] nari:r45760 (trunk): * gc.c (gc_after_sweep): suppress unnecessary expanding heap.
— SASADA Koichi <ko1@...>
2014/05/03
(2014/05/03 4:41), Eric Wong wrote:
[#62402] Re: [ruby-cvs:52906] nari:r45760 (trunk): * gc.c (gc_after_sweep): suppress unnecessary expanding heap.
— Eric Wong <normalperson@...>
2014/05/05
SASADA Koichi <ko1@atdot.net> wrote:
[#62523] [ruby-trunk - Feature #9632] [PATCH 0/2] speedup IO#close with linked-list from ccan — ko1@...
Issue #9632 has been updated by Koichi Sasada.
3 messages
2014/05/11
[#62556] doxygen (Re: Re: [ruby-trunk - Feature #9632] [PATCH 0/2] speedup IO#close with linked-list from ccan) — Tanaka Akira <akr@...>
2014-05-11 8:50 GMT+09:00 Eric Wong <normalperson@yhbt.net>:
3 messages
2014/05/13
[#62727] [RFC] vm_method.c (rb_method_entry_make): avoid freed me in m_tbl — Eric Wong <normalperson@...>
rb_unlink_method_entry may cause old_me to be swept before the new
7 messages
2014/05/24
[#63039] Re: [RFC] vm_method.c (rb_method_entry_make): avoid freed me in m_tbl
— SASADA Koichi <ko1@...>
2014/06/10
Hi,
[#63077] Re: [RFC] vm_method.c (rb_method_entry_make): avoid freed me in m_tbl
— Eric Wong <normalperson@...>
2014/06/10
SASADA Koichi <ko1@atdot.net> wrote:
[#63086] Re: [RFC] vm_method.c (rb_method_entry_make): avoid freed me in m_tbl
— SASADA Koichi <ko1@...>
2014/06/11
(2014/06/11 4:47), Eric Wong wrote:
[#63087] Re: [RFC] vm_method.c (rb_method_entry_make): avoid freed me in m_tbl
— Eric Wong <normalperson@...>
2014/06/11
SASADA Koichi <ko1@atdot.net> wrote:
[#62862] [RFC] README.EXT: document rb_gc_register_mark_object — Eric Wong <normalperson@...>
Any comment on officially supporting this as part of the C API?
5 messages
2014/05/30
[ruby-core:62810] [ruby-trunk - Bug #8523] intermittent unit test failure in test_timeout.rb results in build failures
From:
nobu@...
Date:
2014-05-28 03:17:20 UTC
List:
ruby-core #62810
Issue #8523 has been updated by Nobuyoshi Nakada. Description updated ---------------------------------------- Bug #8523: intermittent unit test failure in test_timeout.rb results in build failures https://bugs.ruby-lang.org/issues/8523#change-46932 * Author: Cyle Riggs * Status: Closed * Priority: High * Assignee: * Category: test * Target version: * ruby -v: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux] * Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN ---------------------------------------- This bug was found in 1.9.3-p392 from fedora. About 20% of our koji builds failed with unit test failures originating in test_timeout.rb. The following build log shows this problem: ~~~ 54) Failure: test_timeout(TestTimeout) [/builddir/ruby19/srpm/ruby-1.9.3-p392/test/test_timeout.rb:19]: [ruby-dev:38319]. Exception raised: <#<Timeout::Error: execution expired>>. 10359 tests, 2235326 assertions, 1 failures, 0 errors, 53 skips make[1]: *** [yes-test-all] Error 1 make[1]: Leaving directory `/builddir/ruby19/srpm/ruby-1.9.3-p392' error: Bad exit status from /var/tmp/rpm-tmp.C2OW6z (%check) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.C2OW6z (%check) make: *** [rpmbuild] Error 1 ``` I expected the unit test to pass consistently, but found that it intermittently failed, causing builds to fail. The build failures that occur due to this unit test failure within koji were reproducible on my local machine as well by performing an rpmbuild. I have identified the problem in the unit test `TestTimeout` and supplied a patch. A description of the flawed unit test logic follows: 1. A flag, `@flag` is set to true. 2. A background thread is started which waits 0.1 seconds and then sets `@flag` to `false`. 3. A block of code which busy waits for `@flag` to become false is executed within the timeout module, which mandates that @flag becomes false in 1 second or less. 4. An assertion is made that the timeout module will not raise an exception of any kind and that the background thread stops the code block before the timeout module does. The unit test fails when the background thread, which is responsible for setting `@flag` to false does not set the value within the expected amount of time and the timeout module, working properly, raises a `Timeout::Error` due to the code block monitoring the `@flag` value running for more than 1 second. This design of the unit test is too sensitive to thread scheduling issues, and routinely fails despite the timeout module working properly. My supplied patch inverts the design of the unit test, such that the background thread operates merely as a secondary method of preventing the unit test from running forever in the case that the timeout module does stop working properly. With my patch the flow will now be: 1. A flag, `@flag` is set to true. 2. A background thread is started which waits 2 seconds and then sets `@flag` to `false`. 3. A code block of "`nil while @flag`" is ran within the timeout module, with a specified maximum execution time of 0.1 seconds. 4. An assertion is made that the timeout module must stop the code block with a `Timeout::Error` before the background thread does. After applying my patch I was able to execute 30 builds sequentially and experienced no failures. ---Files-------------------------------- fix-test_timeout.patch (660 Bytes) -- https://bugs.ruby-lang.org/