<div class="__aliyun_email_body_block"><div  style="line-height:1.7;font-family:simsun;font-size:14.0px;color:#000000;"><div  style="clear:both;">That's a good question and java thread won't throw any exceptions since evacuation failure is an internal</div><div  style="clear:both;">implementation detail which should not affect java behavior. As we know we cannot do <span >immediately gc in a slow path call</span></div><div  style="clear:both;"><span >when evacuation failure happens and we have to return from the LRB leaf call when evacuation </span>failed(return the from space oop)</div><div  style="clear:both;">but there could be races that thread A returned a to-space oop in a successful evacuation and thread B returned a from-space oop</div><div  style="clear:both;">in a failed evacuation which broke to-space invariance. The solution is an evacuation failure protocol described in detail in </div><div  style="clear:both;">shenandoahEvacOOMHandler.hpp. The root trick is that the java thread which encounters evacuation failure will block other evacuation</div><div  style="clear:both;"> to happen and wait for other successful evacuations to finish then resolve the oop.</div><div  style="clear:both;"><span ><span ><br ></span></span></div><div  style="clear:both;"><span ><span ><br ></span></span></div><div  style="clear:both;"><span ><span >Thanks,</span></span></div><div  style="clear:both;"><span ><span >Liang</span></span></div><div  style="clear:both;"><br ></div><div  style="clear:both;"><br ></div><div  style="clear:both;"><br ></div><blockquote  _quote="1" style="margin-right:.0px;margin-top:.0px;margin-bottom:.0px;font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><div  style="clear:both;">------------------------------------------------------------------</div><div  style="clear:both;">From:Florian Weimer <fw@deneb.enyo.de></div><div  style="clear:both;">Send Time:2024 Feb. 27 (Tue.) 03:47</div><div  style="clear:both;">To:"MAO, Liang" <maoliang.ml@alibaba-inc.com></div><div  style="clear:both;">Cc:shenandoah-dev <shenandoah-dev@openjdk.java.net></div><div  style="clear:both;">Subject:Re: Load reference barriers and safepoints</div><div  style="clear:both;"><br ></div>* Liang Mao:<br ><br >> No. Load reference barriers don't have oopmap.  And the slow path<br >> runtime call of LRB is a leaf call which doesn't have oopmap and<br >> cannot suspend in safepoint.<br ><br >Thanks.<br ><br >What happens on evacuation failure?  Is that impossible for mutator<br >threads, or will the thread throw a pre-allocated exception?</blockquote><div  style="line-height:20.0px;clear:both;"><br ></div></div></div>