JDK-8036026 : nsk/jvmti/scenarios/capability/CM02/cm02t001 fails intermittently
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 9,12
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-02-28
  • Updated: 2018-10-15
  • Resolved: 2018-10-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 12
12 b15Fixed
Related Reports
Relates :  
Description
Failed in Hudson in test stabization project, on Windows with concurrency 16

[2014-02-28T01:05:01.70] export CLASSPATH
[2014-02-28T01:05:01.70] PATH="${PATH}${PS}${LD_LIBRARY_PATH}"
[2014-02-28T01:05:01.70] # Actual: PATH=C:/cygwin/bin;C:/cygwin/usr/bin;C:\WINDOWS/system32;C:/cont-test/jvmti-windows-x86/ws/product/build/bvt/images/j2sdk-image/bin;C:/cont-test/jvmti-windows-x86/ws/product/build/bvt/images/j2sdk-image/jre/bin/server;C:/cont-test/jvmti-windows-x86/ws/product/build/bvt/images/j2sdk-image/jre/bin;C:/cont-test/jvmti-windows-x86/ws/tests/vm/bin/lib/windows-amd64/nsk/jvmti/scenarios/capability/CM02;
[2014-02-28T01:05:01.70] export PATH
[2014-02-28T01:05:01.70] ${JAVA} ${JAVA_OPTS} ${EXECUTE_CLASS} ${TEST_ARGS}
[2014-02-28T01:05:01.70] # Actual: C:/cont-test/jvmti-windows-x86/ws/product/build/bvt/images/j2sdk-image/bin/java -server -agentlib:cm02t001=-waittime=5 nsk.jvmti.scenarios.capability.CM02.cm02t001
[2014-02-28T01:05:06.56] # ERROR: cm02t001.c, 549: MonitorContendedEnterEventsCount != 0
[2014-02-28T01:05:06.56] #   verified assertion is FALSE
[2014-02-28T01:05:06.56] # ERROR: cm02t001.c, 554: MonitorContendedEnteredEventsCount != 0
[2014-02-28T01:05:06.56] #   verified assertion is FALSE
[2014-02-28T01:05:06.56] # Test level exit status: 97
# Host info: CYGWIN_NT-5.2-WOW64 STH-VMTESTBASE- 1.7.27(0.271/5/3) 2013-12-09 11:57 i686 Cygwin

Comments
The logs from the failed cm02t001 test show that the monitor contended enter events are not being invoked as expected. From the main thread in the runIt() method the endingMonitor is synchronized. At the end of it's testing it issues the waitingMonitor notify to wake up the debuggee thread from the letFinish() method. There is a small yield with the sleep 100ms call to allow the debuggee thread to wake up and reach the endingMonitor contended event. If the debuggee thread does not run immediately, the min thread will proceed and there will be no contended endingMonitor event. 58 public int runIt(String argv[], PrintStream out) { ... 66 synchronized (thread.endingMonitor) { ... 82 thread.letFinish(); 83 84 // pause to provoke contention 85 Thread.sleep(100); ... 89 log.display("Testing sync: thread finish"); 90 } ... 110 class cm02t001Thread extends Thread { ... 119 public void run() { ... 133 // wait on monitor 134 try { 135 waitingMonitor.wait(cm02t001.timeout); 136 } catch (InterruptedException ignore) { 137 // just finish 138 } 139 } 140 141 // wait until main thread release monitor 142 synchronized (endingMonitor) { 143 }
02-10-2018

Test is failing with some regularity in scenarios testing.
02-10-2018

No matching issues in Aurora, closing as CNR.
19-07-2016