RFR: [8u] Critical backports to sh/jdk8u
Aleksey Shipilev
shade at redhat.com
Fri Jan 26 17:40:30 UTC 2018
On 01/26/2018 06:37 PM, Christine Flood wrote:
> void ShenandoahHeap::try_inject_alloc_failure() {
> + if (ShenandoahAllocFailureALot && !cancelled_concgc() &&
> ((os::random() % 1000) > 950)) {
> + _inject_alloc_failure.set();
> + Thread::current()->_ParkEvent->park(1);
> + if (cancelled_concgc()) {
> + log_info(gc)("Allocation failure was successfully injected");
> + }
> + }
> + }
>
> Is it possible that there is a race and we get to the test for
> cancelled_concgc before it actually gets set?
Yes, but we don't care. This is mostly to observe that any thread had reacted on this failure within
the time set -- a debugging measure.
> Is there any reason not to try JCStressTests with frequent allocation
> failures?
JCStressTests are mostly for testing internal compiler/oop verification, supposed to be fast. Other
tests figure out what happens on alloc failures.
-Aleksey
More information about the shenandoah-dev
mailing list