JDK-8288430 : serviceability/jvmti/VMObjectAlloc/VMObjectAllocTest.java failed with "Exception: Number of allocation != 1"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 20
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux,os_x,windows
  • CPU: x86_64,aarch64
  • Submitted: 2022-06-14
  • Updated: 2023-04-10
  • Resolved: 2023-04-10
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.
Other
tbdResolved
Related Reports
Duplicate :  
Relates :  
Sub Tasks
JDK-8288530 :  
Description
The following test failed in the JDK20 CI:

serviceability/jvmti/VMObjectAlloc/VMObjectAllocTest.java

Here's a snippet from the log file:

VMObjectAlloc called for [B
VMObjectAlloc called for Ljava/lang/String;
VMObjectAlloc called for [B
----------System.err:(11/618)----------
java.lang.Exception: Number of allocation != 1
	at VMObjectAllocTest.main(VMObjectAllocTest.java:50)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:1596)

JavaTest Message: Test threw exception: java.lang.Exception: Number of allocation != 1
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.Exception: Number of allocation != 1
----------rerun:(43/6311)*----------
Comments
It is the same bug as JDK-8277573. C2 doesn't generate notifications for vm objects allocations.
10-04-2023

Moved to 21.
12-10-2022

Isn't it a dup of https://bugs.openjdk.org/browse/JDK-8277573?
15-06-2022

Mach5 doesn't run serviceability/jvmti/VMObjectAlloc/VMObjectAllocTest.java with -Xcomp until Tier8 so I went ahead and tried reproducing the failure mode on my MBP13 with these JVM args: -Xcomp -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation The test failed in release, fastdebug and slowdebug configs. I'm attaching the logs: $ unzip -l 8288430.macosx-x64.2022-06-15.zip Archive: 8288430.macosx-x64.2022-06-15.zip Length Date Time Name --------- ---------- ----- ---- 0 06-15-2022 16:06 test_failures.2022-06-15-155452/ 24474 06-15-2022 15:55 test_failures.2022-06-15-155452/VMObjectAllocTest.jtr.release 24319 06-15-2022 16:05 test_failures.2022-06-15-155452/VMObjectAllocTest.jtr.slowdebug 24313 06-15-2022 15:58 test_failures.2022-06-15-155452/VMObjectAllocTest.jtr.fastdebug --------- ------- 73106 4 files
15-06-2022

I bisected the Mach5 build-IDs between jdk-20+2-29 and jdk-20+2-42 and found that the test failures are new in jdk-20-2-32. There are two changes in jdk-20-2-32: 2022-06-13 15:13 mark.powers: 176959 - OpenJDK 8285263 Minor cleanup could be done in java.security 2022-06-13 15:14 sgehwolf: e0baf0 - OpenJDK 8287007 [cgroups] Consistently use stringStream throughout parsing code and it is not at all clear why either of these fixes would cause serviceability/jvmti/VMObjectAlloc/VMObjectAllocTest.java to fail.
15-06-2022

Spotted in the jdk-20+2-46-tier4 CI job set: serviceability/jvmti/VMObjectAlloc/VMObjectAllocTest.java https://mach5.us.oracle.com/mdash/jobs/mach5-one-jdk-20+2-46-tier4-20220614-1740-33454157/results?search=status%3Afailed%20AND%20-state%3Ainvalid%20AND%20name%3Aserviceability%2Fjvmti%2FVMObjectAlloc%2FVMObjectAllocTest.java Two more sightings so far...
14-06-2022