VM deadlock between VM shutdown and G1
rednaxelafx at gmail.com
Thu Sep 13 14:06:31 UTC 2018
On Thu, Sep 13, 2018 at 5:00 AM, David Holmes <david.holmes at oracle.com>
> Hi Kris,
> Okay got it now.
> So basically:
> has to be written in such a way that it can safely be called even if
> there's a GC related VMop in execution.
Yes exactly. It's a deadlock and you need two hands to make a clap, so
either Universe::heap()->stop() needs to do more signaling (perhaps setting
a global flag to indicate the concurrent GC threads are gone, and let the
GCs pick it up), or the concurrent GCs themselves have to be more careful
to check for VM exiting conditions when in a wait loop.
More information about the hotspot-dev