JDK-8206936 : Tests serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitor* doesn't work with additional VM options
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 11
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2018-07-09
  • Updated: 2018-07-24
  • Resolved: 2018-07-24
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 11
11Resolved
Related Reports
Duplicate :  
Relates :  
Description
Tests 
serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorGCParallelTest.java
serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorGCSerialTest.java
and
serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorVMEventsTest.java

fail when are executed with different GC, TieredLevel in ATR.

It is needed to investigate if tests are supposed to be run with these options and file corresponding bugs. Otherwise just add exclude them from execution with additional VM options using requires tag.
Comments
[~jcbeyler] Yes, I've already pushed it. I do not see this failure mode in the recent mach5 jobs. Also, I've tested this locally on Linux-x64 with the options you pointed out - no failures so far. I'm closing this one as a dup of the 8207252.
24-07-2018

Could someone please confirm if all tests are now fixed now that JDK-8207252 is pushed? When I tested it, it seemed so and I don't think I need to disable testing with Xcomp actually, Thanks! Jc
23-07-2018

The VMEventsTest is failing for two reasons: a) The same reason as the comment above: C1 is not following the logic TLAB and Eden, that provokes the failure you saw b) Xcomp seems to ignore the DisableIntrinsic flag, which then would make the VM allocation counts fail. So there will be two fixes for this: - If my fix of JDK-8207252 is accepted -> Just add a require !Xcomp for the test - If the fix is not accepted, then probably add the requires to not do tiered stop at 1 (!(vm.opt.TieredStopAtLevel == 1))
13-07-2018

The C1 failures are due to TLAB & Eden not doing what we expect (or I expect) them to do. Via https://bugs.openjdk.java.net/browse/JDK-8190862, we had worked on having the allocation logic say: If TLAB is enabled and it is full, go to the slow path Else if contiguous allocations are enabled, try that Else go to the slowpath I created: https://bugs.openjdk.java.net/browse/JDK-8207252 and have this fix: http://cr.openjdk.java.net/~jcbeyler/8207252/webrev.00/ I have not yet looked at the Xcomp case
13-07-2018

[~jcbeyler] Please let me know if more information is needed.
13-07-2018

Yes I will look into both and add more debugging information. Thanks for the reproducers, should I reassign to me now? Or do you want to wait for me to confirm the reproducers?
13-07-2018

Another failed combination is: make -- run-test TEST=open/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorVMEventsTest.java JTREG="VM_OPTIONS=-Xcomp -XX:+UseParallelGC" Test complains "java.lang.RuntimeException: Could not set the sampler". Might be it make a sense to improve diagnostics? I attached full log with debug output.
13-07-2018

Test fails when C1 is used. you could reproduce issue with: make -- run-test TEST=open/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorGCSerialTest.java JTREG="VM_OPTIONS=-XX:TieredStopAtLevel=1" The log says really that sampled object was created by this line "frames.add(new Frame("actuallyAllocate", "()I", "HeapMonitor.java", 93));" Log: Storage is at 0x2b24909ac820, secondary is at 0x2b24909ac7e0 Added Allocator98 - 0x2b24ec001a98 - 98 - lock: 1 Adding trace for thread 0x2b24ec001a98, frame_count 10, storage 0x2b24909ac820 actuallyAllocate()I (HeapMonitor.java: 93) allocate(Ljava/util/List;)V (HeapMonitor.java: 66) allocate()Ljava/util/List; (HeapMonitor.java: 58) main([Ljava/lang/String;)V (HeapMonitorGCTest.java: 48) Native frame invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (NativeMethodAccessorImpl.java: 62) invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (DelegatingMethodAccessorImpl.java: 43) invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (Method.java: 566) run()V (MainWrapper.java: 115) run()V (Thread.java: 834) Adding trace for thread 0x2b24ec001a98, frame_count 9, storage 0x2b24909ac820 allocate(Ljava/util/List;)V (HeapMonitor.java: 68) allocate()Ljava/util/List; (HeapMonitor.java: 58) main([Ljava/lang/String;)V (HeapMonitorGCTest.java: 48) Native frame invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (NativeMethodAccessorImpl.java: 62) invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (DelegatingMethodAccessorImpl.java: 43) invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (Method.java: 566) run()V (MainWrapper.java: 115) run()V (Thread.java: 834) Checking storage count 1 Comparing: Names: allocate and actuallyAllocate Signatures: (Ljava/util/List;)V and ()I File name: HeapMonitor.java and HeapMonitor.java Lines: 68 and 93 Result is 1 java.lang.RuntimeException: No expected events were found. at MyPackage.HeapMonitorGCTest.main(HeapMonitorGCTest.java:53) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115) at java.base/java.lang.Thread.run(Thread.java:834) JavaTest Message: Test threw exception: java.lang.RuntimeException: No expected events were found. JavaTest Message: shutting down test
12-07-2018

Sounds good, let me know what you find. Also I put a note for JDK-8206960 saying that this might not be a duplicate of that one and explained why there.
10-07-2018

Unfortunately I am not able just provide results. So let me figure out about reproducing issue. Assigning bug to me.
10-07-2018

Could I have a bit more information please? - GCParallel and GCSerial force the GC to either be defined as parallel/serial or not and then pass the right UseXGC. I tested VMEvents with Tiered and it passes for me as well. Perhaps it is the "in ATR" that I don't take into account? Do you have an explicit reproducer for these?
10-07-2018

Also fails with Graal (see JDK-8206960).
10-07-2018