Skip to content

ignore confirming belonging while finrializer #13542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 7, 2025

Conversation

ko1
Copy link
Contributor

@ko1 ko1 commented Jun 6, 2025

A finalizer registerred in Ractor A can be invoked in B.

require "tempfile"
r = Ractor.new{
  10_000.times{|i|
    Tempfile.new(["file_to_require_from_ractor#{i}", ".rb"])
  }
}
sleep 0.1

For example, above script makes tempfiles which have finalizers on Ractor r, but at the end of the process, main Ractor will invoke finalizers and it violates belonging check. This patch just ignore the belonging check to avoid CI failure.

Of course it violates Ractor's isolation and wrong workaround. This issue will be solved with Ractor local GC.

@ko1
Copy link
Contributor Author

ko1 commented Jun 6, 2025

@ko1 ko1 force-pushed the ignore_confirming_belonging_while_finalizer branch from 43b76c6 to 44ab6fb Compare June 6, 2025 08:07
A finalizer registerred in Ractor A can be invoked in B.

```ruby
require "tempfile"
r = Ractor.new{
  10_000.times{|i|
    Tempfile.new(["file_to_require_from_ractor#{i}", ".rb"])
  }
}
sleep 0.1
```

For example, above script makes tempfiles which have finalizers
on Ractor r, but at the end of the process, main Ractor will invoke
finalizers and it violates belonging check. This patch just ignore
the belonging check to avoid CI failure.

Of course it violates Ractor's isolation and wrong workaround.
This issue will be solved with Ractor local GC.
@ko1 ko1 force-pushed the ignore_confirming_belonging_while_finalizer branch from 44ab6fb to 6b800df Compare June 6, 2025 08:12
@ko1 ko1 merged commit 1605704 into ruby:master Jun 7, 2025
82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant