Sometimes ( ~ 3% of runs) nsk/coverage/arguments/arguments008 hangs.
It runs JVM with -Xprof flag.
Steps to reproduce:
1. Take Solaris (x86) box
2. Prepare testlist with 100 items:
for i in {1..100}; do echo "nsk/coverage/arguments/arguments008 execute_positive quick,jpda,hprof" >> testlist.run.100; done
3. execute test:
/net/vmsqe.ru.oracle.com/export/gtee/bin/ute -bits d64 -jdk $JAVA_HOME -vmopts '-server -Xmixed' -component vm -tlists empty -testlist testlist.run.100
note vmopts
4. observe timeouts.
with /net/vmsqe.ru.oracle.com/export/gtee/bin/ute ... -env TONGA_JAR=./tonga-utils-dtonga-hang-fix.jar and export TONGA_DUMP_CORE=true
taking from http://stt-13.ru.oracle.com/export/home0/projects/Tonga/dist/archive/4.0.1/tonga-utils-dtonga-hang-fix.jar
i've got following stack (full is attached), only interesting threads:
----------------- t@2 -----------------
0xfffffd7fff2835ea ___lwp_cond_wait + 0xa
0xfffffd7ffdfbed65 void os::PlatformEvent::park() + 0xcd
0xfffffd7ffde63602 void Monitor::ILock(Thread*) + 0x65e
0xfffffd7ffde67a9b void Monitor::lock_without_safepoint_check() + 0x97
0xfffffd7ffe43a2a8 void WatcherThread::stop() + 0x30
0xfffffd7ffd3a7bb7 void before_exit(JavaThread*) + 0x163
0xfffffd7ffd6faee3 JVM_Halt + 0x2db
0xfffffd7ffb7a4a7f Java_java_lang_Shutdown_halt0 + 0xb
0xfffffd7fec6258e3 * java.lang.Shutdown.halt0(int) bci:0 (Interpreted frame)
0xfffffd7fec607ca6 * java.lang.Shutdown.halt(int) bci:7 line:139 (Interpreted frame)
0xfffffd7fec607ca6 * java.lang.Shutdown.exit(int) bci:99 line:213 (Interpreted frame)
0xfffffd7fec607ca6 * java.lang.Runtime.exit(int) bci:14 line:109 (Interpreted frame)
0xfffffd7fec607ca6 * java.lang.System.exit(int) bci:4 line:968 (Interpreted frame)
0xfffffd7fec607ca6 * nsk.coverage.arguments.arguments008.arguments008.main(java.lang.String[]) bci:10 line:11 (Interpreted frame)
0xfffffd7fec600671 <StubRoutines>
0xfffffd7ffd3b4bb3 void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*) + 0x1667
0xfffffd7ffd3b350b void JavaCalls::call(JavaValue*,methodHandle,JavaCallArguments*,Thread*) + 0x3f
0xfffffd7ffd5232bc void jni_invoke_static(JNIEnv_*,JavaValue*,_jobject*,JNICallType,_jmethodID*,JNI_ArgumentPusher*,Thread*) + 0xb80
0xfffffd7ffd582dbd jni_CallStaticVoidMethod + 0x765
0xfffffd7fff337fc3 JavaMain + 0x287
0xfffffd7fff27d9db _thr_setup + 0x5b
0xfffffd7fff27dc10 _lwp_start
Locked ownable synchronizers:
- None
----------------- t@10 -----------------
0xfffffd7fff2835ea ___lwp_cond_wait + 0xa
0xfffffd7ffdfbed65 void os::PlatformEvent::park() + 0xcd
0xfffffd7ffde63602 void Monitor::ILock(Thread*) + 0x65e
0xfffffd7ffde67a9b void Monitor::lock_without_safepoint_check() + 0x97
0xfffffd7ffe210786 void SafepointSynchronize::block(JavaThread*) + 0x19e
0xfffffd7ffe4447cf void JavaThread::check_safepoint_and_suspend_for_native_trans(JavaThread*) + 0x277
0xfffffd7ffc95e57f void ciEnv::register_method(ciMethod*,int,CodeOffsets*,int,CodeBuffer*,int,OopMapSet*,ExceptionHandlerTable*,ImplicitExceptionTable*,AbstractCompiler*,int,bool,bool,RTMState) + 0x1c3
0xfffffd7ffc685e9a Compilation::Compilation #Nvariant 1(AbstractCompiler*,ciEnv*,ciMethod*,int,BufferBlob*) + 0x872
0xfffffd7ffc688637 void Compiler::compile_method(ciEnv*,ciMethod*,int) + 0x1cf
0xfffffd7ffcb50eda void CompileBroker::invoke_compiler_on_method(CompileTask*) + 0x4ea
0xfffffd7ffcb5046d void CompileBroker::compiler_thread_loop() + 0x3c5
0xfffffd7ffe43e8c5 void JavaThread::thread_main_inner() + 0x521
0xfffffd7ffe43dfd9 void JavaThread::run() + 0x8a1
0xfffffd7ffdfa6e4e java_start + 0x1ce
0xfffffd7fff27d9db _thr_setup + 0x5b
0xfffffd7fff27dc10 _lwp_start
Locked ownable synchronizers:
- None
----------------- t@12 -----------------
0xfffffd7fff2835ea ___lwp_cond_wait + 0xa
0xfffffd7ffdfbed65 void os::PlatformEvent::park() + 0xcd
0xfffffd7ffde65016 int Monitor::IWait(Thread*,long) + 0x37e
0xfffffd7ffde6ac8d bool Monitor::wait(bool,long,bool) + 0x669
0xfffffd7ffe612536 void VMThread::execute(VM_Operation*) + 0x3e6
0xfffffd7ffe4441a5 void JavaThread::java_suspend() + 0x1c1
0xfffffd7ffcdeec85 void FlatProfiler::record_thread_ticks() + 0x305
0xfffffd7ffe3d1496 void PeriodicTask::real_time_tick(int) + 0x106
0xfffffd7ffe4395aa void WatcherThread::run() + 0x42a
0xfffffd7ffdfa6e4e java_start + 0x1ce
0xfffffd7fff27d9db _thr_setup + 0x5b
0xfffffd7fff27dc10 _lwp_start
So, I hope there is no any deadlocks between FlatProfiler and Compiler and this is just another issue with PlatformEvent::park