Skip to content

Lock VM in fork hooks#48

Merged
peterzhu2118 merged 1 commit into
mainfrom
vm-lock-fork-hook
Nov 14, 2025
Merged

Lock VM in fork hooks#48
peterzhu2118 merged 1 commit into
mainfrom
vm-lock-fork-hook

Conversation

@peterzhu2118
Copy link
Copy Markdown
Member

If we are using multiple Ractors, other Ractors may allocate objects after rb_gc_impl_before_fork is ran because it does not lock the VM. This can cause the GC to be in a bad state since rb_gc_impl_before_fork may have terminated GC threads so a GC cannot run until rb_gc_impl_after_fork is ran.

If we are using multiple Ractors, other Ractors may allocate objects after
rb_gc_impl_before_fork is ran because it does not lock the VM. This can cause
the GC to be in a bad state since rb_gc_impl_before_fork may have terminated
GC threads so a GC cannot run until rb_gc_impl_after_fork is ran.
@peterzhu2118 peterzhu2118 merged commit 6cd24b4 into main Nov 14, 2025
21 of 22 checks passed
@peterzhu2118 peterzhu2118 deleted the vm-lock-fork-hook branch November 14, 2025 03:22
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