Skip to content

Commit 0562caa

Browse files
committed
8236487: JFR Recorder Thread crashed due to "assert(_chunkwriter.is_valid()) failed: invariant"
Reviewed-by: mgronlun, mseledtsov
1 parent 89f2d14 commit 0562caa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -671,7 +671,9 @@ void JfrRecorderService::invoke_flush() {
671671

672672
void JfrRecorderService::flushpoint() {
673673
MutexLocker lock(JfrStream_lock, Mutex::_no_safepoint_check_flag);
674-
invoke_flush();
674+
if (_chunkwriter.is_valid()) {
675+
invoke_flush();
676+
}
675677
}
676678

677679
void JfrRecorderService::process_full_buffers() {

0 commit comments

Comments
 (0)