Project

General

Profile

Actions

Bug #17306

closed

TestGCCompact#test_ast_compacts test failures

Added by vo.x (Vit Ondruch) about 4 years ago. Updated about 4 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 3.0.0dev (2020-11-04 master 704fb0b815) [s390x-linux]
[ruby-core:100715]

Description

Trying to build recent master, I randomly observe following issue:

[ 8682/20873] TestGCCompact#test_ast_compacts<internal:gc>:202: [BUG] Couldn't unprotect page 0x0000000123ab4000
ruby 3.0.0dev (2020-11-04 master 704fb0b815) [powerpc64le-linux]
-- Control frame information -----------------------------------------------
c:0031 p:0010 s:0179 e:000174 METHOD <internal:gc>:202
c:0030 p:0031 s:0171 e:000169 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/test/ruby/test_gc_compact.rb:120
c:0029 p:0052 s:0165 e:000164 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:1232
c:0028 p:0065 s:0159 e:000158 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:1320
c:0027 p:0013 s:0150 e:000149 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit/testcase.rb:18
c:0026 p:0077 s:0145 e:000144 BLOCK  /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:969 [FINISH]
c:0025 p:---- s:0138 e:000137 CFUNC  :map
c:0024 p:0006 s:0134 e:000133 BLOCK  /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:962
c:0023 p:0163 s:0130 E:0016e0 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:989
c:0022 p:0042 s:0118 e:000117 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:1085
c:0021 p:0010 s:0111 e:000109 BLOCK  /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:576 [FINISH]
c:0020 p:---- s:0105 e:000104 CFUNC  :each
c:0019 p:0054 s:0101 E:002618 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:574
c:0018 p:0008 s:0094 E:000c58 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:611
c:0017 p:0140 s:0087 E:000808 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:904
c:0016 p:0016 s:0074 E:0000b8 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:1022
c:0015 p:0005 s:0069 E:000540 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:1137
c:0014 p:0006 s:0065 E:002708 BLOCK  /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:1124 [FINISH]
c:0013 p:---- s:0061 e:000060 CFUNC  :each
c:0012 p:0047 s:0057 E:0001a8 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:1123
c:0011 p:0013 s:0052 E:001888 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:1111
c:0010 p:0008 s:0047 E:0010b0 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:796
c:0009 p:0008 s:0041 E:000ec0 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:644
c:0008 p:0015 s:0035 E:000a78 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:34
c:0007 p:0006 s:0030 E:0026e8 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:1124
c:0006 p:0032 s:0025 E:001f90 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:1194
c:0005 p:0009 s:0021 E:000158 METHOD /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:1198
c:0004 p:0172 s:0016 E:001f88 TOP    /builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/test/runner.rb:23 [FINISH]
c:0003 p:---- s:0011 e:000010 CFUNC  :require_relative
c:0002 p:0092 s:0006 E:001c60 EVAL   ./test/runner.rb:11 [FINISH]
c:0001 p:0000 s:0003 E:001f40 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
./test/runner.rb:11:in `<main>'
./test/runner.rb:11:in `require_relative'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/test/runner.rb:23:in `<top (required)>'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:1198:in `run'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:1194:in `run'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:1124:in `run'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:34:in `run'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:644:in `run'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:796:in `run'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:1111:in `run'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:1123:in `_run'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:1123:in `each'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:1124:in `block in _run'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:1137:in `run_tests'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:1022:in `_run_anything'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:904:in `_run_anything'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:611:in `_run_suites'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:574:in `_run_suites'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:574:in `each'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:576:in `block in _run_suites'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:1085:in `_run_suite'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:989:in `_run_suite'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:962:in `block in _run_suite'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:962:in `map'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:969:in `block (2 levels) in _run_suite'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit/testcase.rb:18:in `run'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/minitest/unit.rb:1320:in `run'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/tool/lib/test/unit.rb:1232:in `run_test'
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/test/ruby/test_gc_compact.rb:120:in `test_ast_compacts'
<internal:gc>:202:in `compact'
-- C level backtrace information -------------------------------------------
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_vm_bugreport+0x13c) [0x7fff94004aac] vm_dump.c:758
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_bug+0x9c) [0x7fff93d3ef08] error.c:745
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(gc_sweep_step+0x1574) [0x7fff93e0ac14] gc.c:5149
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(gc_sweep+0x12c) [0x7fff93e0ad6c] gc.c:5172
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(gc_start+0x968) [0x7fff93e08358] gc.c:7316
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(garbage_collect+0x60) [0x7fff93e08910] gc.c:8041
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(gc_start_internal+0xb0) [0x7fff93e0b8a0] gc.c:3218
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(builtin_invoker4+0x34) [0x7fff93fcf7a4] vm_insnhelper.c:5145
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(vm_exec_core+0x1b6c) [0x7fff93feb1bc] vm_insnhelper.c:4866
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_vm_exec+0x140) [0x7fff93feef40] vm_insnhelper.c:412
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(invoke_block_from_c_bh+0x398) [0x7fff93ff34a8] vm.c:1261
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_yield+0xb0) [0x7fff93ff4de0] vm.c:1396
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_ary_collect+0x74) [0x7fff93d4a524] array.c:3566
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(call_cfunc_0+0x24) [0x7fff93fceec4] vm_insnhelper.c:2473
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(vm_call_cfunc_with_frame+0x14c) [0x7fff93fe2bdc] vm_insnhelper.c:2641
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(vm_sendish+0xac) [0x7fff93fd2e0c] vm_insnhelper.c:4231
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(vm_exec_core+0x1a0) [0x7fff93fe97f0] vm_insnhelper.c:4162
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_vm_exec+0x140) [0x7fff93feef40] vm_insnhelper.c:412
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(invoke_block_from_c_bh+0x398) [0x7fff93ff34a8] vm.c:1261
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_yield+0xb0) [0x7fff93ff4de0] vm.c:1396
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_ary_each+0x54) [0x7fff93d41044] array.c:2454
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(call_cfunc_0+0x24) [0x7fff93fceec4] vm_insnhelper.c:2473
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(vm_call_cfunc_with_frame+0x14c) [0x7fff93fe2bdc] vm_insnhelper.c:2641
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(vm_call_method_each_type+0x710) [0x7fff93ff15e0] vm_insnhelper.c:3123
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(vm_sendish+0xac) [0x7fff93fd2e0c] vm_insnhelper.c:4231
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(vm_exec_core+0x1a0) [0x7fff93fe97f0] vm_insnhelper.c:4162
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_vm_exec+0x140) [0x7fff93feef40] vm_insnhelper.c:412
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(invoke_block_from_c_bh+0x398) [0x7fff93ff34a8] vm.c:1261
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_yield+0xb0) [0x7fff93ff4de0] vm.c:1396
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_ary_each+0x54) [0x7fff93d41044] array.c:2454
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(call_cfunc_0+0x24) [0x7fff93fceec4] vm_insnhelper.c:2473
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(vm_call_cfunc_with_frame+0x14c) [0x7fff93fe2bdc] vm_insnhelper.c:2641
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(vm_call_method_each_type+0x710) [0x7fff93ff15e0] vm_insnhelper.c:3123
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(vm_sendish+0xac) [0x7fff93fd2e0c] vm_insnhelper.c:4231
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(vm_exec_core+0x1a0) [0x7fff93fe97f0] vm_insnhelper.c:4162
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_vm_exec+0x140) [0x7fff93feef40] vm_insnhelper.c:412
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_iseq_eval+0x130) [0x7fff93ff01a0] vm.c:2405
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(require_internal+0x7bc) [0x7fff93e4e0bc] load.c:594
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_require_string+0x44) [0x7fff93e4fbc4] load.c:1116
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_f_require_relative+0x48) [0x7fff93e4fcb8] load.c:857
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(call_cfunc_1+0x28) [0x7fff93fcef18] vm_insnhelper.c:2479
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(vm_call_cfunc_with_frame+0x14c) [0x7fff93fe2bdc] vm_insnhelper.c:2641
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(vm_sendish+0xac) [0x7fff93fd2e0c] vm_insnhelper.c:4231
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(vm_exec_core+0x130) [0x7fff93fe9780] insns.def:772
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_vm_exec+0x140) [0x7fff93feef40] vm_insnhelper.c:412
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_iseq_eval_main+0xdc) [0x7fff93ff02ec] vm.c:2416
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(rb_ec_exec_node+0xb8) [0x7fff93ddf2b8] eval.c:318
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/libruby.so.3.0.0(ruby_run_node+0x7c) [0x7fff93de3fec] eval.c:376
/builddir/build/BUILD/ruby-3.0.0-704fb0b815/ruby(main+0x90) [0x1020e0b70] ./main.c:50
-- Other runtime information -----------------------------------------------

... snip ...

So far, this crashed on s390x and on ppc64le.


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #17871: TestGCCompact#test_ast_compacts test failing againClosedActions

Updated by vo.x (Vit Ondruch) about 4 years ago

Please note that previously, I was using 02e17d473a and that worked without issues.

Updated by vo.x (Vit Ondruch) about 4 years ago

There is probably more failures. Disabling the $SUBJECT test case, another failing test is TestGCCompact#test_compact_count. The backtrace looks similar.

Updated by vo.x (Vit Ondruch) about 4 years ago

This is still issue:

ruby 3.0.0dev (2020-11-20 master 1f7b557890) [powerpc64le-linux]
ruby 3.0.0dev (2020-11-20 master 1f7b557890) [s390x-linux]

Updated by tenderlovemaking (Aaron Patterson) about 4 years ago

  • Assignee set to tenderlovemaking (Aaron Patterson)

vo.x (Vit Ondruch) wrote in #note-3:

This is still issue:

ruby 3.0.0dev (2020-11-20 master 1f7b557890) [powerpc64le-linux]
ruby 3.0.0dev (2020-11-20 master 1f7b557890) [s390x-linux]

I don't have access to those architectures to test on. This error happens when mprotect can't change protection on that region. If you have access to those machines can you run this program and send the output?

ruby -retc -e'p Etc.sysconf(Etc::SC_PAGE_SIZE)'

We may have to just disable read barrier protection (probably also compaction support) on those architectures.

Thanks!

Updated by vo.x (Vit Ondruch) about 4 years ago

These are results from all Fedora supported platforms:

+ make runruby 'TESTRUN_SCRIPT=-v -retc -e'\''p Etc.sysconf(Etc::SC_PAGE_SIZE)'\'''
./revision.h unchanged
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -v -retc -e'p Etc.sysconf(Etc::SC_PAGE_SIZE)'
ruby 3.0.0dev (2020-11-20 master 1f7b557890) [s390x-linux]
4096

+ make runruby 'TESTRUN_SCRIPT=-v -retc -e'\''p Etc.sysconf(Etc::SC_PAGE_SIZE)'\'''
./revision.h unchanged
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -v -retc -e'p Etc.sysconf(Etc::SC_PAGE_SIZE)'
ruby 3.0.0dev (2020-11-20 master 1f7b557890) [powerpc64le-linux]
65536

+ make runruby 'TESTRUN_SCRIPT=-v -retc -e'\''p Etc.sysconf(Etc::SC_PAGE_SIZE)'\'''
./revision.h unchanged
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -v -retc -e'p Etc.sysconf(Etc::SC_PAGE_SIZE)'
ruby 3.0.0dev (2020-11-20 master 1f7b557890) [aarch64-linux]
4096

+ make runruby 'TESTRUN_SCRIPT=-v -retc -e'\''p Etc.sysconf(Etc::SC_PAGE_SIZE)'\'''
./revision.h unchanged
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -v -retc -e'p Etc.sysconf(Etc::SC_PAGE_SIZE)'
ruby 3.0.0dev (2020-11-20 master 1f7b557890) [x86_64-linux]
4096

+ make runruby 'TESTRUN_SCRIPT=-v -retc -e'\''p Etc.sysconf(Etc::SC_PAGE_SIZE)'\'''
./revision.h unchanged
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -v -retc -e'p Etc.sysconf(Etc::SC_PAGE_SIZE)'
ruby 3.0.0dev (2020-11-20 master 1f7b557890) [i386-linux]
4096

+ make runruby 'TESTRUN_SCRIPT=-v -retc -e'\''p Etc.sysconf(Etc::SC_PAGE_SIZE)'\'''
./revision.h unchanged
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -v -retc -e'p Etc.sysconf(Etc::SC_PAGE_SIZE)'
ruby 3.0.0dev (2020-11-20 master 1f7b557890) [armv7hl-linux]
4096

Updated by tenderlovemaking (Aaron Patterson) about 4 years ago

Great, thank you!

+ make runruby 'TESTRUN_SCRIPT=-v -retc -e'\''p Etc.sysconf(Etc::SC_PAGE_SIZE)'\'''
./revision.h unchanged
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -v -retc -e'p Etc.sysconf(Etc::SC_PAGE_SIZE)'
ruby 3.0.0dev (2020-11-20 master 1f7b557890) [powerpc64le-linux]
65536

This makes sense. Ruby's pages are aligned on 4096 (not 65536), so we can't use this read barrier on the powerpc64le platform. I'll make a patch that disables compaction on this platform.

You said we're getting an error on [s390x-linux] too? It looks like that platform has page sizes of 4096. Are you sure it was the same error? Specifically, the Couldn't unprotect page error.

Again, thank you for the information!

Updated by vo.x (Vit Ondruch) about 4 years ago

tenderlovemaking (Aaron Patterson) wrote in #note-6:

You said we're getting an error on [s390x-linux] too? It looks like that platform has page sizes of 4096. Are you sure it was the same error? Specifically, the Couldn't unprotect page error.

Frankly, I am not sure it is the same issue. This is all I get:

[ 8717/20915] TestGCCompact#test_complex_hash_keysmake: *** [uncommon.mk:800: yes-test-all] Segmentation fault (core dumped)

It died silently. But given the state of the SIGSEV handler on all but x86_64 platforms, this is not that uncommon. Unfortunately, these are just builders where I don't have ssh access.

Again, thank you for the information!

YAW. Thank you for looking into this.

Actions #8

Updated by tenderlovemaking (Aaron Patterson) about 4 years ago

  • Status changed from Open to Closed

Applied in changeset git|63ad55cd882e4010fe313d271af006a430b5ffa8.


Disable auto compaction on platforms that can't support it

Auto Compaction uses mprotect to implement a read barrier. mprotect can
only work on regions of memory that are a multiple of the OS page size.
Ruby's pages are a multiple of 4kb, but some platforms (like ppc64le)
don't have 4kb page sizes. This commit disables the features on those
platforms.

Fixes [Bug #17306]

Updated by vo.x (Vit Ondruch) about 4 years ago

  • Status changed from Closed to Assigned

Re-opening, because the commit fixing this issue was reverted later. Testing with git|7aaf6676c4, I can still reproduce the issue.

Actions #10

Updated by tenderlovemaking (Aaron Patterson) about 4 years ago

  • Status changed from Assigned to Closed

Applied in changeset git|c32218de1ba094223420a4ea017707f48d0009c5.


Disable auto compaction on platforms that can't support it

Both explicit compaction routines (gc_compact and the verify references form)
need to clear the heap before executing compaction. Otherwise some
objects may not be alive, and we'll need the read barrier. The heap
must only contain live objects if we want to disable the read barrier
during explicit compaction.

The previous commit was missing the "clear the heap" phase from the
"verify references" explicit compaction function.

Fixes [Bug #17306]

Updated by vo.x (Vit Ondruch) about 4 years ago

Testing with git|6be9d18a4d and so far so good. Thank you.

Updated by tenderlovemaking (Aaron Patterson) about 4 years ago

vo.x (Vit Ondruch) wrote in #note-11:

Testing with git|6be9d18a4d and so far so good. Thank you.

Great! Thanks for reporting this :)

Actions #13

Updated by mame (Yusuke Endoh) over 3 years ago

  • Related to Bug #17871: TestGCCompact#test_ast_compacts test failing again added
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0