RFR: Make sure debug builds fail predictably on safepoint timeout
Roman Kennke
rkennke at redhat.com
Mon Oct 1 18:32:31 UTC 2018
Good idea! Go!
Roman
> In sh/jdk8, we have a very intermittent deadlock on VM shutdown in stress tests. gdb session says it
> is caused by safepoint synchronization never completing. Let's make sure we are failing reliably
> when that happens:
>
> diff -r cb6ddc702b08 src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp
> --- a/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp Mon Oct 01 19:11:33 2018 +0200
> +++ b/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp Mon Oct 01 20:23:11 2018 +0200
> @@ -192,6 +192,16 @@
> FLAG_SET_DEFAULT(NodeLimitFudgeFactor, NodeLimitFudgeFactor * 3);
> }
> #endif
> +
> + // Make sure safepoint deadlocks are failing predictably. This sets up VM to report
> + // fatal error after 10 seconds of wait for safepoint syncronization (not the VM
> + // operation itself). There is no good reason why Shenandoah would spend that
> + // much time synchronizing.
> +#ifdef ASSERT
> + FLAG_SET_DEFAULT(SafepointTimeout, true);
> + FLAG_SET_DEFAULT(SafepointTimeoutDelay, 10000);
> + FLAG_SET_DEFAULT(DieOnSafepointTimeout, true);
> +#endif
> }
>
> size_t ShenandoahArguments::conservative_max_heap_alignment() {
>
> Testing: tier3_gc_shenandoah
>
> Thanks,
> -Aleksey
>
More information about the shenandoah-dev
mailing list