Bug #15465
closedTests failed on i386-cygwin
Description
Several tests failed on i386-cygwin
Steps:
$ ./configure
$ make
$ make test |& tee test.log
Failed tests:
$ grep # test.log
#651 test_io.rb:87:in `block in <top (required)>':
#File.open("megasrc", "w") {|f| f << megacontent }
#=> killed by SIGKILL (signal 9) (timeout) megacontent-copy_stream
#920 test_massign.rb:165:in `<top (required)>': core dumped [ruby-dev:32581]
#1376 test_thread.rb:301:in `<top (required)>':
#=> killed by SIGIOT (signal 6)
#1377 test_thread.rb:305:in `<top (required)>':
#=> killed by SIGIOT (signal 6)
#1378 test_thread.rb:310:in `<top (required)>':
#=> killed by SIGIOT (signal 6)
#1379 test_thread.rb:315:in `<top (required)>':
#=> killed by SIGIOT (signal 6)
#1380 test_thread.rb:320:in `<top (required)>':
#=> killed by SIGIOT (signal 6)
#1381 test_thread.rb:325:in `<top (required)>':
#=> killed by SIGIOT (signal 6)
#1382 test_thread.rb:330:in `<top (required)>':
#=> killed by SIGIOT (signal 6)
Files
Updated by mame (Yusuke Endoh) almost 6 years ago
- Status changed from Open to Feedback
As far as I know, there is no active Ruby maintainer for cygwin environment. And there is no CI for cygwin. Contribution is welcome.
Updated by fd0 (Daisuke Fujimura) almost 6 years ago
In case of make btest
, test_massign.rb and test_thread.rb succeeded.
The cause of failures is environment variable RUBY_FIBER_MACHINE_STACK_SIZE=1
in tools/runruby.rb.
The workaround (not beautiful) is as follows:
--- origsrc/ruby-2.6.0/tool/runruby.rb 2018-07-10 02:49:21.000000000 +0900
+++ src/ruby-2.6.0/tool/runruby.rb 2019-01-09 16:39:30.366472100 +0900
@@ -99,6 +99,7 @@ env = {
'RUBY_THREAD_MACHINE_STACK_SIZE' => '1',
'RUBY_FIBER_MACHINE_STACK_SIZE' => '1',
}
+env = {} if /i386-cygwin/ =~ RUBY_PLATFORM
runner = File.join(abs_archdir, "exe/ruby#{config['EXEEXT']}")
runner = nil unless File.exist?(runner)
Updated by jeremyevans0 (Jeremy Evans) almost 4 years ago
fd0 (Daisuke Fujimura) wrote in #note-2:
In case of
make btest
, test_massign.rb and test_thread.rb succeeded.The cause of failures is environment variable
RUBY_FIBER_MACHINE_STACK_SIZE=1
in tools/runruby.rb.The workaround (not beautiful) is as follows:
--- origsrc/ruby-2.6.0/tool/runruby.rb 2018-07-10 02:49:21.000000000 +0900 +++ src/ruby-2.6.0/tool/runruby.rb 2019-01-09 16:39:30.366472100 +0900 @@ -99,6 +99,7 @@ env = { 'RUBY_THREAD_MACHINE_STACK_SIZE' => '1', 'RUBY_FIBER_MACHINE_STACK_SIZE' => '1', } +env = {} if /i386-cygwin/ =~ RUBY_PLATFORM runner = File.join(abs_archdir, "exe/ruby#{config['EXEEXT']}") runner = nil unless File.exist?(runner)
I think that defeats the purpose of the test. The test is specifically to test with the smallest possible machine stack sizes. This should be fixed by using higher minimums for RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN and/or RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN. I notice that on powerpc64 we use a 128KB minimum fiber machine stack size instead of a the 64KB minimum used by default. Maybe we should also do that for cygwin?:
--- a/vm_core.h
+++ b/vm_core.h
@@ -690,7 +690,7 @@ typedef struct rb_vm_struct {
#define RUBY_VM_FIBER_VM_STACK_SIZE ( 16 * 1024 * sizeof(VALUE)) /* 64 KB or 128 KB */
#define RUBY_VM_FIBER_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE)) /* 8 KB or 16 KB */
#define RUBY_VM_FIBER_MACHINE_STACK_SIZE ( 64 * 1024 * sizeof(VALUE)) /* 256 KB or 512 KB */
-#if defined(__powerpc64__)
+#if defined(__powerpc64__) || defined?(__CYGWIN__)
#define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 32 * 1024 * sizeof(VALUE)) /* 128 KB or 256 KB */
#else
#define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE)) /* 64 KB or 128 KB */
Does this fix the issue on cygwin?
Updated by jeremyevans0 (Jeremy Evans) over 3 years ago
- Status changed from Feedback to Closed