ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:112091] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning IO objects after starting a ractor
@ 2023-01-27 19:27 luke-gru (Luke Gruber) via ruby-core
  2023-01-27 19:32 ` [ruby-core:112092] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning " luke-gru (Luke Gruber) via ruby-core
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: luke-gru (Luke Gruber) via ruby-core @ 2023-01-27 19:27 UTC (permalink / raw)
  To: ruby-core; +Cc: luke-gru (Luke Gruber)

Issue #19387 has been reported by luke-gru (Luke Gruber).

----------------------------------------
Bug #19387: Issue with ObjectSpace.each_objects not returning IO objects after starting a ractor
https://bugs.ruby-lang.org/issues/19387

* Author: luke-gru (Luke Gruber)
* Status: Open
* Priority: Normal
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
```ruby
r = Ractor.new do
  receive # block, the problem is not the termination of the ractor but the starting
end

ObjectSpace.each_object(IO) { |io|
  p io # we get no objects
}
```





-- 
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/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:112092] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning objects after starting a ractor
  2023-01-27 19:27 [ruby-core:112091] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning IO objects after starting a ractor luke-gru (Luke Gruber) via ruby-core
@ 2023-01-27 19:32 ` luke-gru (Luke Gruber) via ruby-core
  2023-02-07  6:05 ` [ruby-core:112252] " hsbt (Hiroshi SHIBATA) via ruby-core
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: luke-gru (Luke Gruber) via ruby-core @ 2023-01-27 19:32 UTC (permalink / raw)
  To: ruby-core; +Cc: luke-gru (Luke Gruber)

Issue #19387 has been updated by luke-gru (Luke Gruber).

Subject changed from Issue with ObjectSpace.each_objects not returning IO objects after starting a ractor to Issue with ObjectSpace.each_objects not returning objects after starting a ractor

The problem is actually for any objects, not just IO.

----------------------------------------
Bug #19387: Issue with ObjectSpace.each_objects not returning objects after starting a ractor
https://bugs.ruby-lang.org/issues/19387#change-101525

* Author: luke-gru (Luke Gruber)
* Status: Open
* Priority: Normal
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
```ruby
r = Ractor.new do
  receive # block, the problem is not the termination of the ractor but the starting
end

ObjectSpace.each_object(IO) { |io|
  p io # we get no objects
}
```





-- 
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/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:112252] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning objects after starting a ractor
  2023-01-27 19:27 [ruby-core:112091] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning IO objects after starting a ractor luke-gru (Luke Gruber) via ruby-core
  2023-01-27 19:32 ` [ruby-core:112092] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning " luke-gru (Luke Gruber) via ruby-core
@ 2023-02-07  6:05 ` hsbt (Hiroshi SHIBATA) via ruby-core
  2023-09-05 14:13 ` [ruby-core:114638] " ko1 (Koichi Sasada) via ruby-core
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2023-02-07  6:05 UTC (permalink / raw)
  To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)

Issue #19387 has been updated by hsbt (Hiroshi SHIBATA).

Status changed from Open to Assigned
Assignee set to ko1 (Koichi Sasada)

----------------------------------------
Bug #19387: Issue with ObjectSpace.each_objects not returning objects after starting a ractor
https://bugs.ruby-lang.org/issues/19387#change-101680

* Author: luke-gru (Luke Gruber)
* Status: Assigned
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
```ruby
r = Ractor.new do
  receive # block, the problem is not the termination of the ractor but the starting
end

ObjectSpace.each_object(IO) { |io|
  p io # we get no objects
}
```





-- 
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/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:114638] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning objects after starting a ractor
  2023-01-27 19:27 [ruby-core:112091] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning IO objects after starting a ractor luke-gru (Luke Gruber) via ruby-core
  2023-01-27 19:32 ` [ruby-core:112092] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning " luke-gru (Luke Gruber) via ruby-core
  2023-02-07  6:05 ` [ruby-core:112252] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2023-09-05 14:13 ` ko1 (Koichi Sasada) via ruby-core
  2024-01-04 22:24 ` [ruby-core:116017] " luke-gru (Luke Gruber) via ruby-core
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ko1 (Koichi Sasada) via ruby-core @ 2023-09-05 14:13 UTC (permalink / raw)
  To: ruby-core; +Cc: ko1 (Koichi Sasada)

Issue #19387 has been updated by ko1 (Koichi Sasada).

Status changed from Closed to Assigned

c08fdc68383ee368c18e15e298502e6ee0089e18 is not related to this ticket.

----------------------------------------
Bug #19387: Issue with ObjectSpace.each_objects not returning objects after starting a ractor
https://bugs.ruby-lang.org/issues/19387#change-104467

* Author: luke-gru (Luke Gruber)
* Status: Assigned
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
```ruby
r = Ractor.new do
  receive # block, the problem is not the termination of the ractor but the starting
end

ObjectSpace.each_object(IO) { |io|
  p io # we get no objects
}
```





-- 
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/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:116017] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning objects after starting a ractor
  2023-01-27 19:27 [ruby-core:112091] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning IO objects after starting a ractor luke-gru (Luke Gruber) via ruby-core
                   ` (2 preceding siblings ...)
  2023-09-05 14:13 ` [ruby-core:114638] " ko1 (Koichi Sasada) via ruby-core
@ 2024-01-04 22:24 ` luke-gru (Luke Gruber) via ruby-core
  2024-01-11  3:34 ` [ruby-core:116168] " luke-gru (Luke Gruber) via ruby-core
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: luke-gru (Luke Gruber) via ruby-core @ 2024-01-04 22:24 UTC (permalink / raw)
  To: ruby-core; +Cc: luke-gru (Luke Gruber)

Issue #19387 has been updated by luke-gru (Luke Gruber).

ruby -v set to 3.3.0

I believe this was closed prematurely due to an unrelated git commit that wrongly tagged it. Please reopen :)

----------------------------------------
Bug #19387: Issue with ObjectSpace.each_objects not returning objects after starting a ractor
https://bugs.ruby-lang.org/issues/19387#change-106007

* Author: luke-gru (Luke Gruber)
* Status: Closed
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* ruby -v: 3.3.0
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
```ruby
r = Ractor.new do
  receive # block, the problem is not the termination of the ractor but the starting
end

ObjectSpace.each_object(IO) { |io|
  p io # we get no objects
}
```





-- 
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/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:116168] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning objects after starting a ractor
  2023-01-27 19:27 [ruby-core:112091] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning IO objects after starting a ractor luke-gru (Luke Gruber) via ruby-core
                   ` (3 preceding siblings ...)
  2024-01-04 22:24 ` [ruby-core:116017] " luke-gru (Luke Gruber) via ruby-core
@ 2024-01-11  3:34 ` luke-gru (Luke Gruber) via ruby-core
  2025-03-12 20:12 ` [ruby-core:121311] " Eregon (Benoit Daloze) via ruby-core
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: luke-gru (Luke Gruber) via ruby-core @ 2024-01-11  3:34 UTC (permalink / raw)
  To: ruby-core; +Cc: luke-gru (Luke Gruber)

Issue #19387 has been updated by luke-gru (Luke Gruber).


It happened again :( I notified the committer of the mistake. Please reopen, thanks!

----------------------------------------
Bug #19387: Issue with ObjectSpace.each_objects not returning objects after starting a ractor
https://bugs.ruby-lang.org/issues/19387#change-106176

* Author: luke-gru (Luke Gruber)
* Status: Closed
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* ruby -v: 3.3.0
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
```ruby
r = Ractor.new do
  receive # block, the problem is not the termination of the ractor but the starting
end

ObjectSpace.each_object(IO) { |io|
  p io # we get no objects
}
```





-- 
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/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:121311] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning objects after starting a ractor
  2023-01-27 19:27 [ruby-core:112091] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning IO objects after starting a ractor luke-gru (Luke Gruber) via ruby-core
                   ` (4 preceding siblings ...)
  2024-01-11  3:34 ` [ruby-core:116168] " luke-gru (Luke Gruber) via ruby-core
@ 2025-03-12 20:12 ` Eregon (Benoit Daloze) via ruby-core
  2025-03-25 23:21 ` [ruby-core:121442] [Ruby " tenderlovemaking (Aaron Patterson) via ruby-core
  2025-05-09  4:50 ` [ruby-core:121929] " osyoyu (Daisuke Aritomo) via ruby-core
  7 siblings, 0 replies; 9+ messages in thread
From: Eregon (Benoit Daloze) via ruby-core @ 2025-03-12 20:12 UTC (permalink / raw)
  To: ruby-core; +Cc: Eregon (Benoit Daloze)

Issue #19387 has been updated by Eregon (Benoit Daloze).


One idea to solve this would be to implement `ObjectSpace.each_object` like TruffleRuby does it (at least when there are multiple Ractors):
basically it's just the transitive `ObjectSpace.reachable_objects_from(roots)`.
I.e. it uses the same mechanism as GC traversal/marking to find every object reachable from some roots objects (like `Object` class, the stack frames, etc).

Context: the latest breakage due to this bug: https://github.com/ruby/prism/pull/3491
And I know of many before, it's a very common issue that `Ractor.new` can't be used in `make test-all`.

----------------------------------------
Bug #19387: Issue with ObjectSpace.each_objects not returning objects after starting a ractor
https://bugs.ruby-lang.org/issues/19387#change-112275

* Author: luke-gru (Luke Gruber)
* Status: Assigned
* Assignee: ko1 (Koichi Sasada)
* ruby -v: 3.3.0
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
```ruby
r = Ractor.new do
  receive # block, the problem is not the termination of the ractor but the starting
end

ObjectSpace.each_object(IO) { |io|
  p io # we get no objects
}
```





-- 
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] 9+ messages in thread

* [ruby-core:121442] [Ruby Bug#19387] Issue with ObjectSpace.each_objects not returning objects after starting a ractor
  2023-01-27 19:27 [ruby-core:112091] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning IO objects after starting a ractor luke-gru (Luke Gruber) via ruby-core
                   ` (5 preceding siblings ...)
  2025-03-12 20:12 ` [ruby-core:121311] " Eregon (Benoit Daloze) via ruby-core
@ 2025-03-25 23:21 ` tenderlovemaking (Aaron Patterson) via ruby-core
  2025-05-09  4:50 ` [ruby-core:121929] " osyoyu (Daisuke Aritomo) via ruby-core
  7 siblings, 0 replies; 9+ messages in thread
From: tenderlovemaking (Aaron Patterson) via ruby-core @ 2025-03-25 23:21 UTC (permalink / raw)
  To: ruby-core; +Cc: tenderlovemaking (Aaron Patterson)

Issue #19387 has been updated by tenderlovemaking (Aaron Patterson).

Assignee changed from ko1 (Koichi Sasada) to ractor

----------------------------------------
Bug #19387: Issue with ObjectSpace.each_objects not returning objects after starting a ractor
https://bugs.ruby-lang.org/issues/19387#change-112427

* Author: luke-gru (Luke Gruber)
* Status: Assigned
* Assignee: ractor
* ruby -v: 3.3.0
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
```ruby
r = Ractor.new do
  receive # block, the problem is not the termination of the ractor but the starting
end

ObjectSpace.each_object(IO) { |io|
  p io # we get no objects
}
```





-- 
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] 9+ messages in thread

* [ruby-core:121929] [Ruby Bug#19387] Issue with ObjectSpace.each_objects not returning objects after starting a ractor
  2023-01-27 19:27 [ruby-core:112091] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning IO objects after starting a ractor luke-gru (Luke Gruber) via ruby-core
                   ` (6 preceding siblings ...)
  2025-03-25 23:21 ` [ruby-core:121442] [Ruby " tenderlovemaking (Aaron Patterson) via ruby-core
@ 2025-05-09  4:50 ` osyoyu (Daisuke Aritomo) via ruby-core
  7 siblings, 0 replies; 9+ messages in thread
From: osyoyu (Daisuke Aritomo) via ruby-core @ 2025-05-09  4:50 UTC (permalink / raw)
  To: ruby-core; +Cc: osyoyu (Daisuke Aritomo)

Issue #19387 has been updated by osyoyu (Daisuke Aritomo).


I also ran into this, so I opened an pull request document this behavior.
https://github.com/ruby/ruby/pull/13278

----------------------------------------
Bug #19387: Issue with ObjectSpace.each_objects not returning objects after starting a ractor
https://bugs.ruby-lang.org/issues/19387#change-113039

* Author: luke-gru (Luke Gruber)
* Status: Assigned
* Assignee: ractor
* ruby -v: 3.3.0
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
```ruby
r = Ractor.new do
  receive # block, the problem is not the termination of the ractor but the starting
end

ObjectSpace.each_object(IO) { |io|
  p io # we get no objects
}
```





-- 
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] 9+ messages in thread

end of thread, other threads:[~2025-05-09  4:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-27 19:27 [ruby-core:112091] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning IO objects after starting a ractor luke-gru (Luke Gruber) via ruby-core
2023-01-27 19:32 ` [ruby-core:112092] [Ruby master Bug#19387] Issue with ObjectSpace.each_objects not returning " luke-gru (Luke Gruber) via ruby-core
2023-02-07  6:05 ` [ruby-core:112252] " hsbt (Hiroshi SHIBATA) via ruby-core
2023-09-05 14:13 ` [ruby-core:114638] " ko1 (Koichi Sasada) via ruby-core
2024-01-04 22:24 ` [ruby-core:116017] " luke-gru (Luke Gruber) via ruby-core
2024-01-11  3:34 ` [ruby-core:116168] " luke-gru (Luke Gruber) via ruby-core
2025-03-12 20:12 ` [ruby-core:121311] " Eregon (Benoit Daloze) via ruby-core
2025-03-25 23:21 ` [ruby-core:121442] [Ruby " tenderlovemaking (Aaron Patterson) via ruby-core
2025-05-09  4:50 ` [ruby-core:121929] " osyoyu (Daisuke Aritomo) 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).