Skip to content

Commit c968a67

Browse files
committed
8362282: runtime/logging/StressAsyncUL.java failed with exitValue = 134
Reviewed-by: jsjolen, dholmes
1 parent 385c132 commit c968a67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/hotspot/share/logging/logAsyncWriter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,13 +318,13 @@ void AsyncLogWriter::initialize() {
318318

319319
AsyncLogWriter* self = new AsyncLogWriter();
320320
if (self->_initialized) {
321-
Atomic::release_store_fence(&AsyncLogWriter::_instance, self);
322-
// All readers of _instance after the fence see non-null.
323321
// We use LogOutputList's RCU counters to ensure all synchronous logsites have completed.
324-
// After that, we start AsyncLog Thread and it exclusively takes over all logging I/O.
322+
// After that, we publish the initalized _instance to readers.
323+
// Then we start the AsyncLog Thread and it exclusively takes over all logging I/O.
325324
for (LogTagSet* ts = LogTagSet::first(); ts != nullptr; ts = ts->next()) {
326325
ts->wait_until_no_readers();
327326
}
327+
Atomic::release_store_fence(&AsyncLogWriter::_instance, self);
328328
os::start_thread(self);
329329
log_debug(logging, thread)("Async logging thread started.");
330330
} else {

0 commit comments

Comments
 (0)