JDK-8145317 : ReservedStackTest fails with ReentrantLock looks corrupted
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-12-14
  • Updated: 2020-09-01
  • Resolved: 2015-12-18
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 b103Fixed
Related Reports
Relates :  
Description
Framework got StackOverflowError at frame = 31514
Test started execution at frame = 31258
FAILED: ReentrantLock 120 looks corrupted
Comments
It doesn't matter if it's a test issue or if it's just failing on some platforms. This needs to be fixed or quarantined.
17-12-2015

Note that this is a test issue, I don't believe it should be considered as an integration blocker as long as the test doesn't fail on one of the supported platforms (current failure is on aarch64 which is not supported).
17-12-2015

Because of the Windows platform, @requires is not a good option. On Windows, the code to detect the potentially harmful stack overflow is implemented, but the reserved stack area is not because of the guard pages control issue. So the run should be run on Windows to ensure the detection code doesn't crash the VM, but corruption are still possible on this platform.
16-12-2015

Using @requires to skip unsupported platforms would seem a better approach Shouldn't the @library just be for /testlibrary ? (which still needs an @build of course)
16-12-2015

This line: + * @library /test/lib/share/classes isn't sufficient. You need an @build line also.
15-12-2015

The Reserved Stack Area is not supported on the Aarch64 platform, but the unit test doesn't exclude this platform. The exclusion logic has to be updated and use a white list of all supported platforms: diff --git a/test/runtime/ReservedStack/ReservedStackTest.java b/test/runtime/ReservedStack/ReservedStackTest.java --- a/test/runtime/ReservedStack/ReservedStackTest.java +++ b/test/runtime/ReservedStack/ReservedStackTest.java @@ -23,6 +23,7 @@ /* * @test ReservedStackTest + * @library /test/lib/share/classes * @run main/othervm -XX:-Inline -XX:CompileCommand=exclude,java/util/concurrent/locks/AbstractOwnableSynchronizer.setExclusiveOwnerThread ReservedStackTest */ @@ -107,13 +108,10 @@ */ import java.util.concurrent.locks.ReentrantLock; +import jdk.test.lib.Platform; public class ReservedStackTest { - private static boolean isWindows() { - return System.getProperty("os.name").toLowerCase().startsWith("win"); - } - static class ReentrantLockTest { private ReentrantLock lockArray[]; @@ -195,9 +193,11 @@ System.out.println("Test started execution at frame = " + (counter - deframe)); String result = test.getResult(); System.out.println(result); - // The feature is not fully implemented on Windows platforms, + // The feature is not fully implemented on all platforms, // corruptions are still possible - if (!isWindows() && !result.contains("PASSED")) { + boolean supportedPlatform = Platform.isSolaris() || Platform.isOSX() + || (Platform.isLinux() && (Platform.isX86() || Platform.isX64())); + if (supportedPlatform && !result.contains("PASSED")) { System.exit(-1); } }
15-12-2015

Assigning to Fred to investigate.
15-12-2015