8235829: graal crashes with Zombie.java test

Start ServiceThread before compiler threads, and run nmethod barriers for zgc before adding to the service thread queues, or posting events from the java thread.

Reviewed-by: pliden, dholmes, rehn
This commit is contained in:
Coleen Phillimore 2019-12-18 11:51:22 -05:00
parent f58a8cbed2
commit eb6beeac94
12 changed files with 91 additions and 32 deletions

View file

@ -88,6 +88,7 @@
#include "runtime/safepoint.hpp"
#include "runtime/safepointMechanism.inline.hpp"
#include "runtime/safepointVerifiers.hpp"
#include "runtime/serviceThread.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/statSampler.hpp"
#include "runtime/stubRoutines.hpp"
@ -3995,6 +3996,10 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
Chunk::start_chunk_pool_cleaner_task();
}
// Start the service thread
// The service thread enqueues JVMTI deferred events and does various hashtable
// and other cleanups. Needs to start before the compilers start posting events.
ServiceThread::initialize();
// initialize compiler(s)
#if defined(COMPILER1) || COMPILER2_OR_JVMCI