mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8185273: Test8004741.java crashes with SIGSEGV in JDK10-hs nightly
Threads::parallel_java_threads_do() needs to call VMThread::claim_oops_do() to avoid causing a parallel GC to miss the VMThread. Reviewed-by: shade, rkennke, kvn, gthornbr
This commit is contained in:
parent
149e9c6e54
commit
7a713e117a
4 changed files with 20 additions and 2 deletions
|
@ -25,6 +25,8 @@
|
|||
#include "precompiled.hpp"
|
||||
#include "compiler/compileBroker.hpp"
|
||||
#include "gc/shared/collectedHeap.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "logging/logConfiguration.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
|
@ -484,6 +486,7 @@ void VMThread::loop() {
|
|||
// If we are at a safepoint we will evaluate all the operations that
|
||||
// follow that also require a safepoint
|
||||
if (_cur_vm_operation->evaluate_at_safepoint()) {
|
||||
log_debug(vmthread)("Evaluating safepoint VM operation: %s", _cur_vm_operation->name());
|
||||
|
||||
_vm_queue->set_drain_list(safepoint_ops); // ensure ops can be scanned
|
||||
|
||||
|
@ -495,6 +498,7 @@ void VMThread::loop() {
|
|||
_cur_vm_operation = safepoint_ops;
|
||||
if (_cur_vm_operation != NULL) {
|
||||
do {
|
||||
log_debug(vmthread)("Evaluating coalesced safepoint VM operation: %s", _cur_vm_operation->name());
|
||||
// evaluate_operation deletes the op object so we have
|
||||
// to grab the next op now
|
||||
VM_Operation* next = _cur_vm_operation->next();
|
||||
|
@ -532,6 +536,7 @@ void VMThread::loop() {
|
|||
SafepointSynchronize::end();
|
||||
|
||||
} else { // not a safepoint operation
|
||||
log_debug(vmthread)("Evaluating non-safepoint VM operation: %s", _cur_vm_operation->name());
|
||||
if (TraceLongCompiles) {
|
||||
elapsedTimer t;
|
||||
t.start();
|
||||
|
@ -607,8 +612,9 @@ void VMThread::execute(VM_Operation* op) {
|
|||
// to be queued up during a safepoint synchronization.
|
||||
{
|
||||
VMOperationQueue_lock->lock_without_safepoint_check();
|
||||
log_debug(vmthread)("Adding VM operation: %s", op->name());
|
||||
bool ok = _vm_queue->add(op);
|
||||
op->set_timestamp(os::javaTimeMillis());
|
||||
op->set_timestamp(os::javaTimeMillis());
|
||||
VMOperationQueue_lock->notify();
|
||||
VMOperationQueue_lock->unlock();
|
||||
// VM_Operation got skipped
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue