Closed casperisfine closed 3 weeks ago
Alright, I'm able to reproduce it locally with GC.auto_compact = true
.
The mark function is very fishy:
void mark() {
// We don't mark the objects, but we MUST mark the frames, otherwise they
// can be garbage collected.
// When we stop collection we will stringify the remaining frames, and then
// clear them from the set, allowing them to be removed from out output.
stack_table->mark_frames();
rb_gc_mark(stack_table_value);
rb_gc_mark(tp_newobj);
rb_gc_mark(tp_freeobj);
}
It says it doesn't mark the objects, but we crash because while iterating over for (auto& obj: collector->object_list) {
some objects are clearly garbage.
So I suspect we should mark them so they are pinned?
We started seeing crashes on our nightly CI since last friday night.
The first commit to fail was https://github.com/ruby/ruby/commit/cb39283cbfcfeb920fff66d3ef77e4ed7f2f8d93 (but could be a close parent).
I'll see if I can figure out what it is, but filing it here just in case.