RFR(XXS): 8234684: JFR crashes when rotating the JFR output during assertion failure

Erik Gahlin erik.gahlin at oracle.com
Mon Nov 25 11:21:51 UTC 2019


Looks good.

Erik

> On 25 Nov 2019, at 12:11, Markus Gronlund <markus.gronlund at oracle.com> wrote:
> 
> Greetings,
> 
> Please help review the following adjustment:
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8234684 
> Webrev: http://cr.openjdk.java.net/~mgronlun/8234684/webrev/
> Summary:
> JFR Event Streaming modified the emergency dump functionality to reuse the newly added flush mechanism in an attempt to avoid having to perform a relatively complex epoch transition during critical shutdown. flush() asserts that the system is not at a safepoint - a valid assumption in the regular case. But because of emergency dump situations, it cannot assert this categorically and needs to be removed.
> 
> Testing: Manually crashing in a safepoint context
> 
> Diff:
> diff -r 6a897a8ef4af -r 5ab7691c56dd src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp
> --- a/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp        Mon Nov 25 11:08:30 2019 +0100
> +++ b/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp        Mon Nov 25 12:01:41 2019 +0100
> @@ -461,7 +461,6 @@
> }
> 
> size_t JfrCheckpointManager::flush_type_set() {
> -  assert(!SafepointSynchronize::is_at_safepoint(), "invariant");
>   size_t elements = 0;
>   {
>     JfrCheckpointWriter writer(Thread::current());
> 
> Thank you
> Markus



More information about the hotspot-jfr-dev mailing list