JDK-8226638 : Return of jvmti/scenarios/contention/TC04/tc04t001/TestDescription.java fails due to wrong number of MonitorContendedEntered events
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 13,14
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2019-06-22
  • Updated: 2019-06-23
  • Resolved: 2019-06-23
Related Reports
Duplicate :  
Relates :  
Description
The following test failed in both JDK13 and JDK 14 CI:

vmTestbase/nsk/jvmti/scenarios/contention/TC04/tc04t001/TestDescription.java

Here's a snippet of the log file:

#section:main
----------messages:(4/291)----------
command: main -agentlib:tc04t001=-waittime=5 nsk.jvmti.scenarios.contention.TC04.tc04t001
reason: User specified action: run main/othervm/native -agentlib:tc04t001=-waittime=5 nsk.jvmti.scenarios.contention.TC04.tc04t001 
Mode: othervm [/othervm specified]
elapsed time (seconds): 3.609
----------configuration:(0/0)----------
----------System.out:(209/6808)----------
Thread-1: increment event: 1
Thread-0: increment event: 2
Thread-1: increment event: 3
Thread-0: increment event: 4
...
Thread-1: increment event: 194
Thread-0: increment event: 195
Thread-1: increment event: 196
Thread-0: increment event: 197
Thread-1: increment event: 198
Thread-0: increment event: 198
The following fake exception stacktrace is for failure analysis. 
nsk.share.Fake_Exception_for_RULE_Creation: (tc04t001.cpp:267) enterEventsCount == 199
	at nsk_lvcomplain(nsk_tools.cpp:172)
# ERROR: tc04t001.cpp, 267: enterEventsCount == 199
#   verified assertion is FALSE
# ERROR: tc04t001.cpp, 270: Number of MonitorContendedEnter events: 198
# ERROR: tc04t001.cpp, 275: enteredEventsCount == 199
#   verified assertion is FALSE
# ERROR: tc04t001.cpp, 278: Number of MonitorContendedEntered events: 198

The most interesting bit is that the last two "increment event" lines both have number "198".  That's not supposed to happen.
Comments
Closed as Duplicate rather than Fixed
23-06-2019

I missed that there was a followup fix for JDK-8223736. It was pushed to JDK 13, while the failure I was looking at is in the JDK 14 CI, and JDK-8226595 has not yet been forward ported to JDK 14.
22-06-2019