[#121791] [Ruby Bug#21298] `ObjectSpace.allocation_class_path` returns inconsistent results depending on `TracePoint` state — "mame (Yusuke Endoh) via ruby-core" <ruby-core@...>

Issue #21298 has been reported by mame (Yusuke Endoh).

6 messages 2025/05/01

[#121830] [Ruby Feature#21309] Can Thread::Mutex be Ractor shareable? — "osyoyu (Daisuke Aritomo) via ruby-core" <ruby-core@...>

Issue #21309 has been reported by osyoyu (Daisuke Aritomo).

11 messages 2025/05/05

[#121837] [Ruby Feature#21311] Namespace on read (revised) — "tagomoris (Satoshi Tagomori) via ruby-core" <ruby-core@...>

Issue #21311 has been reported by tagomoris (Satoshi Tagomori).

109 messages 2025/05/06

[#121941] [Ruby Bug#21315] Finalizers violate the `rb_ractor_confirm_belonging` assertion — "byroot (Jean Boussier) via ruby-core" <ruby-core@...>

Issue #21315 has been reported by byroot (Jean Boussier).

8 messages 2025/05/09

[#121950] [Ruby Bug#21316] Namespaces leak with permanent names — "fxn (Xavier Noria) via ruby-core" <ruby-core@...>

Issue #21316 has been reported by fxn (Xavier Noria).

10 messages 2025/05/09

[#121956] [Ruby Bug#21321] Namespaces do not support extending mixins — "fxn (Xavier Noria) via ruby-core" <ruby-core@...>

Issue #21321 has been reported by fxn (Xavier Noria).

8 messages 2025/05/09

[#121973] [Ruby Bug#21322] Namespaces and builtin classes as arguments and return values — "fxn (Xavier Noria) via ruby-core" <ruby-core@...>

Issue #21322 has been reported by fxn (Xavier Noria).

8 messages 2025/05/10

[#122054] [Ruby Bug#21333] heap-use-after-free caused by rehash during update — "cyruscyliu (Qiang Liu) via ruby-core" <ruby-core@...>

Issue #21333 has been reported by cyruscyliu (Qiang Liu).

9 messages 2025/05/13

[#122086] [Ruby Bug#21337] Using `not` on the RHS of a logical operator becomes valid syntax with Prism — "koic (Koichi ITO) via ruby-core" <ruby-core@...>

Issue #21337 has been reported by koic (Koichi ITO).

7 messages 2025/05/14

[#122101] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines — "christo (Chris Alberti) via ruby-core" <ruby-core@...>

Issue #21340 has been reported by christo (Chris Alberti).

12 messages 2025/05/14

[#122114] [Ruby Bug#21341] `Namespace is not a module (TypeError)` without enabling the namespace — "yahonda (Yasuo Honda) via ruby-core" <ruby-core@...>

Issue #21341 has been reported by yahonda (Yasuo Honda).

7 messages 2025/05/15

[#122121] [Ruby Bug#21342] Segfault: invalid keeping_mutexes when using Mutex in Thread then Fiber after GC — "maciej.mensfeld (Maciej Mensfeld) via ruby-core" <ruby-core@...>

Issue #21342 has been reported by maciej.mensfeld (Maciej Mensfeld).

11 messages 2025/05/15

[#122154] [Ruby Feature#21346] Introduce `String#ensure_suffix` — "matheusrich (Matheus Richard) via ruby-core" <ruby-core@...>

Issue #21346 has been reported by matheusrich (Matheus Richard).

21 messages 2025/05/16

[#122164] [Ruby Feature#21347] Add `open_timeout` as an overall timeout option for `Socket.tcp` — "shioimm (Misaki Shioi) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxMzQ3IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IHNoaW9pbW0gKE1pc2FraSBTaGlvaSku

9 messages 2025/05/17

[#122184] [Ruby Misc#21350] Bundled gems lack online documentation — "osyoyu (Daisuke Aritomo) via ruby-core" <ruby-core@...>

Issue #21350 has been reported by osyoyu (Daisuke Aritomo).

8 messages 2025/05/18

[#122218] [Ruby Bug#21357] Crash in Hash#merge! with ruby-dev in rubocop-rspec test suite — "Earlopain (Earlopain _) via ruby-core" <ruby-core@...>

Issue #21357 has been reported by Earlopain (Earlopain _).

7 messages 2025/05/21

[#122228] [Ruby Feature#21359] Introduce `Exception#cause=` for Post-Initialization Assignment — "ioquatix (Samuel Williams) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxMzU5IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGlvcXVhdGl4IChTYW11ZWwgV2lsbGlh

9 messages 2025/05/22

[#122242] [Ruby Feature#21365] Add `Namespace#eval` — "tenderlovemaking (Aaron Patterson) via ruby-core" <ruby-core@...>

Issue #21365 has been reported by tenderlovemaking (Aaron Patterson).

12 messages 2025/05/22

[#122258] [Ruby Misc#21367] Remove link to ruby-doc.org from www.ruby-lang.org/en/documentation/ — "p8 (Petrik de Heus) via ruby-core" <ruby-core@...>

Issue #21367 has been reported by p8 (Petrik de Heus).

11 messages 2025/05/23

[#122277] [Ruby Bug#21371] Proposal to Remove SPARC Architecture Support from Ruby — "ioquatix (Samuel Williams) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxMzcxIGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGlvcXVhdGl4IChTYW11ZWwgV2lsbGlh

10 messages 2025/05/24

[#122343] [Ruby Misc#21385] Namespace: Suggesting a rename — "fxn (Xavier Noria) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxMzg1IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGZ4biAoWGF2aWVyIE5vcmlhKS4NCg0K

32 messages 2025/05/30

[#122345] [Ruby Feature#21386] Introduce `Enumerable#join_map` — "matheusrich (Matheus Richard) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxMzg2IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IG1hdGhldXNyaWNoIChNYXRoZXVzIFJp

12 messages 2025/05/30

[ruby-core:121946] [Ruby Bug#21315] Finalizers violate the `rb_ractor_confirm_belonging` assertion

From: "jhawthorn (John Hawthorn) via ruby-core" <ruby-core@...>
Date: 2025-05-09 19:45:19 UTC
List: ruby-core #121946
Issue #21315 has been updated by jhawthorn (John Hawthorn).


> When a Ractor terminates just before it actually does so it should probably run the remaining finalizers

Objects aren't necessarily unreferenced/garbage collectable at this point (they could have been made shareable, or be the return value taken by a another Ractor). I guess we could do this, but it does seem extremely surprising behaviour to run a finalizer on an accessible live object.

> For terminated Ractors I don't think it's a big deal, as long as we do what is necessary so that Ractor.current and Ractor local storage still work as expected.

The final return value of a Ractor is not made shareable, so the `take`-ing Ractor may have access with whatever objects were captured in the finalizer proc. I think we probably need to track that and forward the finalizer to the "next" Ractor (possibly following that several levels until we find a still-running Ractor).

----------------------------------------
Bug #21315: Finalizers violate the `rb_ractor_confirm_belonging` assertion
https://bugs.ruby-lang.org/issues/21315#change-113066

* Author: byroot (Jean Boussier)
* Status: Open
* Assignee: ractor
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
Reproduction (with assertions enabled):

```ruby
require "tempfile"

Ractor.new do
  10.times do
    Tempfile.new
  end
end.take

GC.start
```

```
  <OBJ_INFO:rb_ractor_confirm_belonging@../src/ractor_core.h:375> (File)
  /home/runner/work/ruby/ruby/src/lib/tempfile.rb:387: [BUG] rb_ractor_confirm_belonging object-ractor id:1, current-ractor id:2
  ruby 3.5.0dev (2025-05-09T15:51:24Z pull/13291/merge e289a1dc58) +PRISM [x86_64-linux]
  
  -- Control frame information -----------------------------------------------
  c:0005 p:0007 s:0025 e:000024 METHOD /home/runner/work/ruby/ruby/src/lib/tempfile.rb:387 [FINISH]
  c:0004 p:0022 s:0020 e:000019 METHOD /home/runner/work/ruby/ruby/src/lib/prism/parse_result.rb:833 [FINISH]
  c:0003 p:---- s:0012 e:000011 CFUNC  :parse_lex_file
  c:0002 p:0006 s:0007 e:000006 BLOCK  /home/runner/work/ruby/ruby/src/test/prism/ractor_test.rb:26 [FINISH]
  c:0001 p:---- s:0003 e:000002 DUMMY  [FINISH]
  
  -- Ruby level backtrace information ----------------------------------------
  /home/runner/work/ruby/ruby/src/test/prism/ractor_test.rb:26:in 'block in test_parse_lex_file'
  /home/runner/work/ruby/ruby/src/test/prism/ractor_test.rb:26:in 'parse_lex_file'
  /home/runner/work/ruby/ruby/src/lib/prism/parse_result.rb:833:in 'initialize'
  /home/runner/work/ruby/ruby/src/lib/tempfile.rb:387:in 'call'
  
  -- Threading information ---------------------------------------------------
  Total ractor count: 2
  Ruby thread count for this ractor: 1
  
  -- C level backtrace information -------------------------------------------
  /home/runner/work/ruby/ruby/build/ruby(rb_print_backtrace+0x14) [0x561441aeedbf] ../src/vm_dump.c:843
  /home/runner/work/ruby/ruby/build/ruby(rb_vm_bugreport) ../src/vm_dump.c:1175
  /home/runner/work/ruby/ruby/build/ruby(bug_report_end+0x0) [0x561441aa3f39] ../src/error.c:1097
  /home/runner/work/ruby/ruby/build/ruby(rb_bug_without_die_internal) ../src/error.c:1097
  /home/runner/work/ruby/ruby/build/ruby(die+0x0) [0x5614416e237f] ../src/error.c:1115
  /home/runner/work/ruby/ruby/build/ruby(rb_bug) ../src/error.c:1117
  /home/runner/work/ruby/ruby/build/ruby(rb_ractor_confirm_belonging+0xde) [0x56144188c6be] ../src/ractor_core.h:376
  /home/runner/work/ruby/ruby/build/ruby(vm_exec_core+0xef) [0x5614418b23ef] /home/runner/work/ruby/ruby/build/vm.inc:2500
  /home/runner/work/ruby/ruby/build/ruby(rb_vm_exec+0x156) [0x5614418a4676] ../src/vm.c:2618
  /home/runner/work/ruby/ruby/build/ruby(vm_call0_cc+0x13d) [0x5614418aa1dd] ../src/vm_eval.c:101
  /home/runner/work/ruby/ruby/build/ruby(rb_vm_call0+0x4c) [0x5614418b1cc5] ../src/vm_eval.c:61
  /home/runner/work/ruby/ruby/build/ruby(rb_vm_call_kw) ../src/vm_eval.c:326
  /home/runner/work/ruby/ruby/build/ruby(rb_check_funcall_default_kw) ../src/vm_eval.c:694
  /home/runner/work/ruby/ruby/build/ruby(rb_gc_run_obj_finalizer+0x1cf) [0x56144170220f] ../src/gc.c:306
  /home/runner/work/ruby/ruby/build/ruby(rb_multi_ractor_p+0x0) [0x56144170246f] ../src/gc/default/default.c:2820
  /home/runner/work/ruby/ruby/build/ruby(rb_vm_lock_enter) ../src/vm_sync.h:74
  /home/runner/work/ruby/ruby/build/ruby(rb_gc_vm_lock) ../src/gc.c:137
  /home/runner/work/ruby/ruby/build/ruby(finalize_list) ../src/gc/default/default.c:2843
  /home/runner/work/ruby/ruby/build/ruby(finalize_deferred_heap_pages) ../src/gc/default/default.c:2866
```

I think it wouldn't be hard to disable that check when running a finalizer, but I don't know if it's the correct thing to do. 



-- 
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/


In This Thread