JDK-8154258 : [TESTBUG] Various serviceability tests fail compilation
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-04-12
  • Updated: 2017-08-17
  • Resolved: 2016-05-01
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 9
9 b120Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
The following tests fail compilation:

serviceability/sa/TestClassLoaderStats.java
serviceability/sa/TestStackTrace.java
serviceability/tmtools/jstack/DaemonThreadTest.java
serviceability/tmtools/jstack/SpreadLockTest.java
serviceability/tmtools/jstack/ThreadNamesTest.java
serviceability/tmtools/jstat/GcCauseTest02.java
serviceability/tmtools/jstat/GcNewTest.java
serviceability/tmtools/jstat/GcTest01.java
serviceability/tmtools/jstat/GcTest02.java


error: module  reads package sun.misc from both jdk.unsupported and java.base
1 error
result: Failed. Compilation failed: Compilation failed

Comments
Just for the record, current state. * Tests below will fail after the fix. these tests launch a secondary VM that uses Unsafe and requires per-test efforts. I'll file a separate CR to have it fixed "gc/arguments/TestMaxMinHeapFreeRatioFlags.java", "gc/arguments/TestShrinkHeapInSteps.java", "gc/arguments/TestTargetSurvivorRatioFlag.java", "gc/g1/TestShrinkAuxiliaryData00.java", "gc/g1/TestShrinkAuxiliaryData05.java", "gc/g1/TestShrinkAuxiliaryData10.java", "gc/g1/TestShrinkAuxiliaryData15.java", "gc/g1/TestShrinkAuxiliaryData20.java", "gc/g1/TestShrinkAuxiliaryData25.java", "gc/g1/TestShrinkAuxiliaryData30.java" * Tests below fixed manually "compiler/unsafe/UnsafeRaw.java" (fix Unsafe usage) "runtime/contended/OopMaps.java" (remove import because Unsafe is no used) "runtime/contended/OopMapsSameGroup.java" (remove import because Unsafe is no used) "runtime/ErrorHandling/CreateCoredumpOnCrash.java" (added explicit export to secondary VM arguments) "runtime/Unsafe/RangeCheck.java" (added explicit export to secondary VM arguments) "compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java", "compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java", "compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java", "compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java", "compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java", "compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java", "compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java", "compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java", "compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java", "compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java * Test below is not fixed. It works, but uses sun.misc.Unsafe because of missed unsafe.putOrderedIn() in jdk.internal.misc.Unsafe. I'll file a separate CR to have it fixed. "compiler/c2/8004867/TestIntUnsafeOrdered.java"
20-04-2016

Removing 'integration_blocker' based on this e-mail thread: Subject: PIT results: jdk9/hs for jdk9/dev: Go for Integration This part caught my attention: > None of the currently unresolved integration blockers from the list: > https://bugs.openjdk.java.net/issues/?jql=labels%20%3D%20integration_blocker > is critical. Some of bugs already exist in the dev repo (JDK-8154258), > and it's not clear why they are marked as blocker. I marked https://bugs.openjdk.java.net/browse/JDK-8154258 as an integration_blocker because it wasn't clear that the compilation failures were being seen at the JDK9-dev level. In general, if an issue reproduces in JDK9-dev, then the integration_blocker label can be removed. Dmitry, now that I've taken a closer look at JDK-8154258 I see that you initially reported this failure against these bits: Java(TM) SE Runtime Environment 9 b0 (9-internal+0-2016-04-12-034610.amurillo.jdk9-hs-2016-04-11-snapshot) Since the bits contained in the 2016-04-11 snapshot were pushed to JDK9-dev on 2016-04-13, JDK-8154258 has indeed escaped. My apologies for missing your initial sighting in the snapshot. I will remove the integration blocker label from JDK-8154258. If there are other 'integration_blocker' labeled bugs that reproduce in JDK9-dev, please add a note to those bugs. Dan
18-04-2016

Adding 'integration_blocker' label. The 2016-04-15 Runtime nightly is showing 51 known failures matching this bug. I don't think we can push up to JDK9-dev with these failures.
16-04-2016

We have two different versions of jdk.test.lib.Utils. One is in <root>/test/lib other one is in hotspot/test/testlibrary. Top level version was updated to use jdk.internal.misc, but hotspot version still use sun.misc.Unsafe; So test compilation results depends to what library is in use.
16-04-2016

After changes for JDK-8153737 all tests that uses lib.Utils but doesn't have @modules java.base/jdk.internal.misc in it's header fails to compile.
15-04-2016

The compiler complains on test/lib/share/classes/jdk/test/lib/Utils.java which has been changed in the main repo, but hasn't changed in the hs repos yet http://hg.openjdk.java.net/jdk9/jdk9/rev/1d992540870f it's not an aurora or UTE issue
14-04-2016

http://aurora.ru.oracle.com/faces/Job.xhtml?job_id=1422939.JAVASE.NIGHTLY.VM.Main_Baseline.2016-04-13.main-jdk_hotspot_test_hotspot_all-linux-x64-11.runTests this is UTE job
14-04-2016

Aurora has nothing to do with CompileJDK, must be gtee/UTE issue then
14-04-2016