From: "rkh (Konstantin Haase) via ruby-core" Date: 2026-09-29T10:36:15+00:00 Subject: [ruby-core:126879] [Ruby Bug#22389] Hang on GC.compact Issue #22389 has been reported by rkh (Konstantin Haase). ---------------------------------------- Bug #22389: Hang on GC.compact https://bugs.ruby-lang.org/issues/22389 * Author: rkh (Konstantin Haase) * Status: Open * ruby -v: ruby 4.1.0dev (2026-09-29T07:26:07Z master 64a4a372d7) +PRISM [arm64-darwin25] * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- The following code works on 4.0.7 but hangs on 4.1.0dev (64a4a372d7): ```ruby ready = Ractor::Port.new Ractor.new(ready) do |port| Array.new(10_000) { Object.new } port << true Ractor.receive end ready.receive Thread.new { GC.compact }.join GC.compact ``` A native sample of the hung process shows: ```text gc_start_global gc_compact_finish gc_update_references_heap rb_iseq_mark_and_move rb_gc_mark_and_move rb_gc_impl_location + 180 ``` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/