RFR (xxs) JDK-8012525 gc/metaspace/G1AddMetaspaceDependency.java Test fails a safepoint timeout assertion or hangs.
Bengt Rutisson
bengt.rutisson at oracle.com
Wed Oct 2 10:52:54 UTC 2013
Hi Mikael,
Looks good.
Bengt
On 10/1/13 11:44 AM, Mikael Gerdin wrote:
> Hi
>
> Please review this small test fix to work around a problem where the
> test accidentally provokes a very slow execution path in the VM.
> This slow path can cause very long GC pauses or delayed safepoints.
>
> Summary of the bug:
> The byte array allocation causes a big MemRegion to be stored as the
> thread's deferred_card_mark. This can cause two separate slow code paths:
>
> * A slow GC pause because CollectedHeap::ensure_parsability flushes
> the cards through the VM barrier code and dirtying a large region is
> expensive with the small G1UpdateBufferSize.
> * A thread_in_java being slow in reaching safepoint because it's
> flushing the cards in OptoRuntime::new_array_C at the call to
> new_store_pre_barrier, this ends up in the same code as
> ensure_parsability and can therefore be slow.
>
> I've ran the test with the large allocation removed and it still
> successfully reproduces the bug it was written to provoke on an
> unfixed build, so my suggestion is to simply remove the byte array
> allocation.
>
> The bug is unfortunately not externally visible.
>
> Webrev: http://cr.openjdk.java.net/~mgerdin/8012525/webrev
>
> /Mikael
More information about the hotspot-gc-dev
mailing list