Description
We observed that, while the new implementation of free_all_kore_mem
looks more accurate from what it's supposed to do, we're now experiencing a segmentation fault when collecting the old generation in kore_collect
.
The reason seems to be that the oldspace allocation_ptr is points to a memory position after the end of the oldspace, and thus, we can't correctly collect it. It's still uncertain why this happens, and the error seems to happen non-deterministically, probably because the program is executed using a pool of threads that (apparently) randomly switch threads during the execution of the program.
For now, the short-term solution is to not call munmap_arena_and_reset
on the oldspace inside the free_all_kore_mem
function, but we have to take a look into this issue GC issue later.