It really depends on what "holding the GVL" means. Right now, `ruby_thread_has_gvl_p()` can return `false` in hooks for this event. This is what can cause a deadlock. The stack trace for the deadlock looks like this: ``` frame #3: ...luke-gru (Luke Gruber)
Today, it's possible to get a deadlock when allocating during a hook for this event. I attached a reproduction script using the `gvltools` gem. One way to fix it would be to not allocate during this hook and change the documentation to b...luke-gru (Luke Gruber)
mame (Yusuke Endoh) wrote in #note-3: > Is it difficult to write a regression test for this? I have [another PR](https://github.com/ruby/ruby/pull/17208/) for a similar issue that has 2 regressions tests. Those tests also cover this bug...luke-gru (Luke Gruber)
While freeing a locked mutex, if there is a waiter for the mutex it could call `rb_fiber_scheduler_unblock` which calls into Ruby code. The function `rb_mutex_unlock_th` was a footgun because it was used during normal Ruby code and al...luke-gru (Luke Gruber)
Thank you for your input Peter and Kunshan, I greatly appreciate it. As you may know, I am no GC expert :) ### Parallel marking For parallel marking, I agree that the vast majority of all TypedData mark functions are thread-safe. I was...luke-gru (Luke Gruber)
Our current implementation of parallel sweeping has the sweep thread run both concurrently with the mutator and in parallel with the Ruby GC thread. I would prefer a bit that represents the safety in both situations. For MMTk, since it d...luke-gru (Luke Gruber)
CRuby `TypedData` types are used internally in the VM and in C extensions. Currently any `dfree` functions, which usually are declared `RUBY_TYPED_FREE_IMMEDIATELY`, are run with the VM lock held and a VM barrier stopping all ractors and...luke-gru (Luke Gruber)
Can you please provide the output of `lscpu` and/or `uname -a` along with the version of `gcc`? What happens when you install this exact Ruby version without pkgsrc, like from git or a tarball? Thanks.luke-gru (Luke Gruber)
Oh yeah, thanks. There's even a helpful comment for it. I think changing `rb_gc_update_tbl_refs` to only move values probably makes sense. We could add something like `rb_mark_hash_nopin_values` where it marks values for moving but pins ...luke-gru (Luke Gruber)
Looking into this further, it looks like `gc_update_table_refs` is only used once internally, with the finalizer_table. It looks to me like it's used wrong there because the key (finalized object) is not pinned so can be moved, but the s...luke-gru (Luke Gruber)