k-sareen / mmtk-art

MMTk binding for ART
Apache License 2.0
1 stars 0 forks source link

Make application image creation mutually exclusive with MMTk GC #6

Closed k-sareen closed 1 week ago

k-sareen commented 1 month ago

ART assumes that they will never do a GC while an application image is being created at run-time and that's because they set the heap size to effectively be infinite during the start up process. But this is not the case for MMTk.

The thread which generates the app image (HeapTaskDaemon thread) transitions to a state where it can't be suspended. So we're getting a case where a run-time app image is being created at the same time a GC occurs and we try to suspend the HeapTaskDaemon but we can't because it's in an unsuspendable state. After a time-out of 30s, we give up trying to suspend it and die.

k-sareen commented 1 month ago

Attached is the ART tombstone: https://gist.github.com/k-sareen/0fa3a0a9772e481cf6ad07fc5c254a58