changeset 57589:decd3d2953b6 jdk-14+31

8236487: JFR Recorder Thread crashed due to "assert(_chunkwriter.is_valid()) failed: invariant" Reviewed-by: mgronlun, mseledtsov
author egahlin
date Wed, 08 Jan 2020 19:12:20 +0100
parents 80d8e00ec63a
children 59e74aa436b9
files src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp	Wed Jan 08 14:36:48 2020 +0100
+++ b/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp	Wed Jan 08 19:12:20 2020 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -671,7 +671,9 @@
 
 void JfrRecorderService::flushpoint() {
   MutexLocker lock(JfrStream_lock, Mutex::_no_safepoint_check_flag);
-  invoke_flush();
+  if (_chunkwriter.is_valid()) {
+    invoke_flush();
+  }
 }
 
 void JfrRecorderService::process_full_buffers() {