Issue #19248 has been updated by vo.x (Vit Ondruch).
peterzhu2118 (Peter Zhu) wrote in #note-1:
Thank you for this bug report. Could you run this
script and paste the output? It will help me to debug this issue.
~~~
$ make -C redhat-linux-build/ test-all TESTS="../test_19248.rb"
make: Entering directory
'/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/redhat-linux-build'
--- BEFORE COMPACT
{:count=>8, :time=>19, :heap_allocated_pages=>325, :heap_sorted_length=>611,
:heap_allocatable_pages=>99, :heap_available_slots=>275275,
:heap_live_slots=>17572, :heap_free_slots=>257703, :heap_final_slots=>0,
:heap_marked_slots=>17502, :heap_eden_pages=>325, :heap_tomb_pages=>0,
:total_allocated_pages=>512, :total_freed_pages=>187,
:total_allocated_objects=>72809, :total_freed_objects=>55237,
:malloc_increase_bytes=>62760, :malloc_increase_bytes_limit=>16777216,
:minor_gc_count=>3, :major_gc_count=>5, :compact_count=>1,
:read_barrier_faults=>0, :total_moved_objects=>15899,
:remembered_wb_unprotected_objects=>123,
:remembered_wb_unprotected_objects_limit=>246, :old_objects=>16872,
:old_objects_limit=>33744, :oldmalloc_increase_bytes=>62760,
:oldmalloc_increase_bytes_limit=>16777216}
{0=>{:slot_size=>40, :heap_allocatable_pages=>0, :heap_eden_pages=>85,
:heap_eden_slots=>139182, :heap_tomb_pages=>0, :heap_tomb_slots=>0,
:total_allocated_pages=>263, :total_freed_pages=>178, :force_major_gc_count=>0},
1=>{:slot_size=>80, :heap_allocatable_pages=>0, :heap_eden_pages=>122,
:heap_eden_slots=>99838, :heap_tomb_pages=>0, :heap_tomb_slots=>0,
:total_allocated_pages=>131, :total_freed_pages=>9, :force_major_gc_count=>0},
2=>{:slot_size=>160, :heap_allocatable_pages=>0, :heap_eden_pages=>68,
:heap_eden_slots=>27799, :heap_tomb_pages=>0, :heap_tomb_slots=>0,
:total_allocated_pages=>68, :total_freed_pages=>0, :force_major_gc_count=>0},
3=>{:slot_size=>320, :heap_allocatable_pages=>17, :heap_eden_pages=>33,
:heap_eden_slots=>6725, :heap_tomb_pages=>0, :heap_tomb_slots=>0,
:total_allocated_pages=>33, :total_freed_pages=>0, :force_major_gc_count=>0},
4=>{:slot_size=>640, :heap_allocatable_pages=>82, :heap_eden_pages=>17,
:heap_eden_slots=>1731, :heap_tomb_pages=>0, :heap_tomb_slots=>0,
:total_allocated_pages=>17, :total_freed_pages=>0, :force_major_gc_count=>0}}
{"address":"0x7f6471b0fa68", "type":"OBJECT",
"shape_id":134, "slot_size":40,
"class":"0x7f646c568178", "ivars":10,
"memsize":136, "flags":{"wb_protected":true}}
{"address":"0x7f646ea5fbe8", "type":"OBJECT",
"shape_id":144, "slot_size":160,
"class":"0x7f646c568178", "ivars":10,
"memsize":160, "flags":{"wb_protected":true}}
--- AFTER COMPACT
{:considered=>{:T_OBJECT=>541, :T_CLASS=>444, :T_MODULE=>44, :T_FLOAT=>3,
:T_STRING=>7152, :T_REGEXP=>118, :T_ARRAY=>573, :T_HASH=>41, :T_STRUCT=>7,
:T_BIGNUM=>30, :T_DATA=>277, :T_MATCH=>1, :T_SYMBOL=>8, :T_IMEMO=>7177,
:T_ICLASS=>83}, :moved=>{:T_OBJECT=>541, :T_CLASS=>444, :T_MODULE=>44,
:T_FLOAT=>3, :T_STRING=>7152, :T_REGEXP=>118, :T_ARRAY=>573, :T_HASH=>41,
:T_STRUCT=>7, :T_BIGNUM=>30, :T_DATA=>277, :T_MATCH=>1, :T_SYMBOL=>2,
:T_IMEMO=>7177, :T_ICLASS=>83}, :moved_up=>{}, :moved_down=>{:T_ARRAY=>1}}
{:count=>10, :time=>37, :heap_allocated_pages=>618, :heap_sorted_length=>833,
:heap_allocatable_pages=>65, :heap_available_slots=>516160,
:heap_live_slots=>17639, :heap_free_slots=>498521, :heap_final_slots=>0,
:heap_marked_slots=>17558, :heap_eden_pages=>618, :heap_tomb_pages=>0,
:total_allocated_pages=>1005, :total_freed_pages=>387,
:total_allocated_objects=>73081, :total_freed_objects=>55442,
:malloc_increase_bytes=>3760, :malloc_increase_bytes_limit=>16777216,
:minor_gc_count=>3, :major_gc_count=>7, :compact_count=>2,
:read_barrier_faults=>0, :total_moved_objects=>32392,
:remembered_wb_unprotected_objects=>123,
:remembered_wb_unprotected_objects_limit=>246, :old_objects=>17427,
:old_objects_limit=>34854, :oldmalloc_increase_bytes=>3760,
:oldmalloc_increase_bytes_limit=>16777216}
{0=>{:slot_size=>40, :heap_allocatable_pages=>0, :heap_eden_pages=>160,
:heap_eden_slots=>261987, :heap_tomb_pages=>0, :heap_tomb_slots=>0,
:total_allocated_pages=>513, :total_freed_pages=>353, :force_major_gc_count=>0},
1=>{:slot_size=>80, :heap_allocatable_pages=>0, :heap_eden_pages=>222,
:heap_eden_slots=>181663, :heap_tomb_pages=>0, :heap_tomb_slots=>0,
:total_allocated_pages=>256, :total_freed_pages=>34, :force_major_gc_count=>0},
2=>{:slot_size=>160, :heap_allocatable_pages=>0, :heap_eden_pages=>136,
:heap_eden_slots=>55598, :heap_tomb_pages=>0, :heap_tomb_slots=>0,
:total_allocated_pages=>136, :total_freed_pages=>0, :force_major_gc_count=>0},
3=>{:slot_size=>320, :heap_allocatable_pages=>0, :heap_eden_pages=>66,
:heap_eden_slots=>13450, :heap_tomb_pages=>0, :heap_tomb_slots=>0,
:total_allocated_pages=>66, :total_freed_pages=>0, :force_major_gc_count=>0},
4=>{:slot_size=>640, :heap_allocatable_pages=>65, :heap_eden_pages=>34,
:heap_eden_slots=>3462, :heap_tomb_pages=>0, :heap_tomb_slots=>0,
:total_allocated_pages=>34, :total_freed_pages=>0, :force_major_gc_count=>0}}
{"address":"0x7f646bfaafb0", "type":"OBJECT",
"shape_id":134, "slot_size":40,
"class":"0x7f646b26ece8", "ivars":10,
"memsize":136, "flags":{"wb_protected":true,
"old":true, "uncollectible":true, "marked":true}}
{"address":"0x7f646ea5fbe8", "type":"OBJECT",
"shape_id":144, "slot_size":160,
"class":"0x7f646b26ece8", "ivars":10,
"memsize":160, "flags":{"wb_protected":true,
"pinned":true}}
Run options:
--seed=23777
"--ruby=./miniruby -I/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/lib -I.
-I.ext/common /builddir/build/BUILD/ruby-3.2.0-6af6857ecf/tool/runruby.rb --extout=.ext
-- --disable-gems"
--excludes-dir=/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/test/excludes
--name=!/memory_leak/
# Running tests:
Finished tests in 0.009343s, 0.0000 tests/s, 0.0000 assertions/s.
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
ruby -v: ruby 3.2.0dev (2022-12-21 master 6af6857ecf) [x86_64-linux]
make: Leaving directory
'/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/redhat-linux-build'
~~~
eightbitraptor (Matthew Valentine-House) wrote in #note-2:
is it consistent or intermittent?
It seems to be consistent. 5 failures out of 5 attempts:
~~~
$ make -C redhat-linux-build/ test-all TESTS="-v -n
/TestGCCompact#test_moving_objects_between_size_pools/"
make: Entering directory
'/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/redhat-linux-build'
Run options:
--seed=40875
"--ruby=./miniruby -I/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/lib -I.
-I.ext/common /builddir/build/BUILD/ruby-3.2.0-6af6857ecf/tool/runruby.rb --extout=.ext
-- --disable-gems"
--excludes-dir=/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/test/excludes
--name=!/memory_leak/
-v
-n
/TestGCCompact#test_moving_objects_between_size_pools/
# Running tests:
[1/0] TestGCCompact#test_moving_objects_between_size_pools = 0.12 s
1) Error:
TestGCCompact#test_moving_objects_between_size_pools:
NoMethodError: undefined method `>=' for nil:NilClass
/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/test/ruby/test_gc_compact.rb:278:in
`<main>'
/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/test/ruby/test_gc_compact.rb:256:in
`test_moving_objects_between_size_pools'
/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/tool/test/runner.rb:23:in `<top
(required)>'
/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/test/runner.rb:16:in
`require_relative'
/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/test/runner.rb:16:in `<main>'
Finished tests in 4.621852s, 0.2164 tests/s, 0.6491 assertions/s.
1 tests, 3 assertions, 0 failures, 1 errors, 0 skips
ruby -v: ruby 3.2.0dev (2022-12-21 master 6af6857ecf) [x86_64-linux]
make: *** [uncommon.mk:856: yes-test-all] Error 1
make: Leaving directory
'/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/redhat-linux-build'
~~~
----------------------------------------
Bug #19248: TestGCCompact#test_moving_objects_between_size_pools test failure
https://bugs.ruby-lang.org/issues/19248#change-100758
* Author: vo.x (Vit Ondruch)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.2.0dev (2022-12-21 master 6af6857ecf) [x86_64-linux]
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
Testing on Fedora Rawhide with commit:git|6af6857ecf, I observe the following error:
~~~
1) Error:
TestGCCompact#test_moving_objects_between_size_pools:
NoMethodError: undefined method `>=' for nil:NilClass
/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/test/ruby/test_gc_compact.rb:278:in
`<main>'
/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/test/ruby/test_gc_compact.rb:256:in
`test_moving_objects_between_size_pools'
/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/tool/test/runner.rb:23:in `<top
(required)>'
/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/test/runner.rb:16:in
`require_relative'
/builddir/build/BUILD/ruby-3.2.0-6af6857ecf/test/runner.rb:16:in `<main>'
~~~
Testing previously with commit:git|11acb7f7bc, everything was fine. I might just guess
that this is related to commit:git|bfc66e07b7e0134dfa2041c311dc56941fe1caf0
--
https://bugs.ruby-lang.org/