* [ruby-core:122208] [Ruby Bug#21354] Symbol#to_proc is not ractor safe
@ 2025-05-20 13:37 luke-gru (Luke Gruber) via ruby-core
2025-05-20 13:46 ` [ruby-core:122209] " luke-gru (Luke Gruber) via ruby-core
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: luke-gru (Luke Gruber) via ruby-core @ 2025-05-20 13:37 UTC (permalink / raw)
To: ruby-core; +Cc: luke-gru (Luke Gruber)
Issue #21354 has been reported by luke-gru (Luke Gruber).
----------------------------------------
Bug #21354: Symbol#to_proc is not ractor safe
https://bugs.ruby-lang.org/issues/21354
* Author: luke-gru (Luke Gruber)
* Status: Open
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
There is caching in `Symbol#to_proc` (`rb_sym_to_proc`) that makes the assumption that we're always in the main ractor. With multiple ractors, this caching logic is not ractor-safe in that cached procs created in one ractor can leak into other ractors. In a debug build, this results in a `ractor_confirm_belonging` assertion failure.
Ruby code that reproduces the issue:
```ruby
:inspect.to_proc
Ractor.new do
:inspect.to_proc
end.take
```
--
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/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:122209] [Ruby Bug#21354] Symbol#to_proc is not ractor safe
2025-05-20 13:37 [ruby-core:122208] [Ruby Bug#21354] Symbol#to_proc is not ractor safe luke-gru (Luke Gruber) via ruby-core
@ 2025-05-20 13:46 ` luke-gru (Luke Gruber) via ruby-core
2025-05-21 0:27 ` [ruby-core:122212] " nobu (Nobuyoshi Nakada) via ruby-core
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: luke-gru (Luke Gruber) via ruby-core @ 2025-05-20 13:46 UTC (permalink / raw)
To: ruby-core; +Cc: luke-gru (Luke Gruber)
Issue #21354 has been updated by luke-gru (Luke Gruber).
PR here: https://github.com/ruby/ruby/pull/13380
----------------------------------------
Bug #21354: Symbol#to_proc is not ractor safe
https://bugs.ruby-lang.org/issues/21354#change-113357
* Author: luke-gru (Luke Gruber)
* Status: Open
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
There is caching in `Symbol#to_proc` (`rb_sym_to_proc`) that makes the assumption that we're always in the main ractor. With multiple ractors, this caching logic is not ractor-safe in that cached procs created in one ractor can leak into other ractors. In a debug build, this results in a `ractor_confirm_belonging` assertion failure.
Ruby code that reproduces the issue:
```ruby
:inspect.to_proc
Ractor.new do
:inspect.to_proc
end.take
```
--
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/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:122212] [Ruby Bug#21354] Symbol#to_proc is not ractor safe
2025-05-20 13:37 [ruby-core:122208] [Ruby Bug#21354] Symbol#to_proc is not ractor safe luke-gru (Luke Gruber) via ruby-core
2025-05-20 13:46 ` [ruby-core:122209] " luke-gru (Luke Gruber) via ruby-core
@ 2025-05-21 0:27 ` nobu (Nobuyoshi Nakada) via ruby-core
2025-05-21 7:51 ` [ruby-core:122213] " byroot (Jean Boussier) via ruby-core
2025-06-14 2:39 ` [ruby-core:122528] " nagachika (Tomoyuki Chikanaga) via ruby-core
3 siblings, 0 replies; 5+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-core @ 2025-05-21 0:27 UTC (permalink / raw)
To: ruby-core; +Cc: nobu (Nobuyoshi Nakada)
Issue #21354 has been updated by nobu (Nobuyoshi Nakada).
Assignee set to ko1 (Koichi Sasada)
Backport changed from 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN to 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED
----------------------------------------
Bug #21354: Symbol#to_proc is not ractor safe
https://bugs.ruby-lang.org/issues/21354#change-113360
* Author: luke-gru (Luke Gruber)
* Status: Open
* Assignee: ko1 (Koichi Sasada)
* Backport: 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED
----------------------------------------
There is caching in `Symbol#to_proc` (`rb_sym_to_proc`) that makes the assumption that we're always in the main ractor. With multiple ractors, this caching logic is not ractor-safe in that cached procs created in one ractor can leak into other ractors. In a debug build, this results in a `ractor_confirm_belonging` assertion failure.
Ruby code that reproduces the issue:
```ruby
:inspect.to_proc
Ractor.new do
:inspect.to_proc
end.take
```
--
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/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:122213] [Ruby Bug#21354] Symbol#to_proc is not ractor safe
2025-05-20 13:37 [ruby-core:122208] [Ruby Bug#21354] Symbol#to_proc is not ractor safe luke-gru (Luke Gruber) via ruby-core
2025-05-20 13:46 ` [ruby-core:122209] " luke-gru (Luke Gruber) via ruby-core
2025-05-21 0:27 ` [ruby-core:122212] " nobu (Nobuyoshi Nakada) via ruby-core
@ 2025-05-21 7:51 ` byroot (Jean Boussier) via ruby-core
2025-06-14 2:39 ` [ruby-core:122528] " nagachika (Tomoyuki Chikanaga) via ruby-core
3 siblings, 0 replies; 5+ messages in thread
From: byroot (Jean Boussier) via ruby-core @ 2025-05-21 7:51 UTC (permalink / raw)
To: ruby-core; +Cc: byroot (Jean Boussier)
Issue #21354 has been updated by byroot (Jean Boussier).
Assignee changed from ko1 (Koichi Sasada) to ractor
----------------------------------------
Bug #21354: Symbol#to_proc is not ractor safe
https://bugs.ruby-lang.org/issues/21354#change-113362
* Author: luke-gru (Luke Gruber)
* Status: Closed
* Assignee: ractor
* Backport: 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED
----------------------------------------
There is caching in `Symbol#to_proc` (`rb_sym_to_proc`) that makes the assumption that we're always in the main ractor. With multiple ractors, this caching logic is not ractor-safe in that cached procs created in one ractor can leak into other ractors. In a debug build, this results in a `ractor_confirm_belonging` assertion failure.
Ruby code that reproduces the issue:
```ruby
:inspect.to_proc
Ractor.new do
:inspect.to_proc
end.take
```
--
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/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:122528] [Ruby Bug#21354] Symbol#to_proc is not ractor safe
2025-05-20 13:37 [ruby-core:122208] [Ruby Bug#21354] Symbol#to_proc is not ractor safe luke-gru (Luke Gruber) via ruby-core
` (2 preceding siblings ...)
2025-05-21 7:51 ` [ruby-core:122213] " byroot (Jean Boussier) via ruby-core
@ 2025-06-14 2:39 ` nagachika (Tomoyuki Chikanaga) via ruby-core
3 siblings, 0 replies; 5+ messages in thread
From: nagachika (Tomoyuki Chikanaga) via ruby-core @ 2025-06-14 2:39 UTC (permalink / raw)
To: ruby-core; +Cc: nagachika (Tomoyuki Chikanaga)
Issue #21354 has been updated by nagachika (Tomoyuki Chikanaga).
Backport changed from 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED to 3.2: REQUIRED, 3.3: DONE, 3.4: REQUIRED
ruby_3_3 commit:d5c8fd2043f4425c3fe2a87558dfbd80ebff9911 merged revision(s) commit:f6cbf499bc98b851034fffb49fcbb59d495f6f7b.
----------------------------------------
Bug #21354: Symbol#to_proc is not ractor safe
https://bugs.ruby-lang.org/issues/21354#change-113753
* Author: luke-gru (Luke Gruber)
* Status: Closed
* Assignee: ractor
* Backport: 3.2: REQUIRED, 3.3: DONE, 3.4: REQUIRED
----------------------------------------
There is caching in `Symbol#to_proc` (`rb_sym_to_proc`) that makes the assumption that we're always in the main ractor. With multiple ractors, this caching logic is not ractor-safe in that cached procs created in one ractor can leak into other ractors. In a debug build, this results in a `ractor_confirm_belonging` assertion failure.
Ruby code that reproduces the issue:
```ruby
:inspect.to_proc
Ractor.new do
:inspect.to_proc
end.take
```
--
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/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-06-14 2:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-20 13:37 [ruby-core:122208] [Ruby Bug#21354] Symbol#to_proc is not ractor safe luke-gru (Luke Gruber) via ruby-core
2025-05-20 13:46 ` [ruby-core:122209] " luke-gru (Luke Gruber) via ruby-core
2025-05-21 0:27 ` [ruby-core:122212] " nobu (Nobuyoshi Nakada) via ruby-core
2025-05-21 7:51 ` [ruby-core:122213] " byroot (Jean Boussier) via ruby-core
2025-06-14 2:39 ` [ruby-core:122528] " nagachika (Tomoyuki Chikanaga) via ruby-core
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).