JDK-8210358 : [Graal] runtime/ReservedStack/ReservedStackTest.java fails: Uncaught exception while adjusting compilation level: java.lang.StackOverflowError
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11,13
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • Submitted: 2018-09-04
  • Updated: 2019-05-02
  • Resolved: 2019-02-12
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
Relates :  
Relates :  
Relates :  
Description
This test doesn't work with Graal.  The stack trace looks like this:

Uncaught exception while adjusting compilation level: java.lang.StackOverflowError
java.lang.StackOverflowError
	at java.util.concurrent.locks.AbstractOwnableSynchronizer.setExclusiveOwnerThread(java.base@11-internal/AbstractOwnableSynchronizer.java:74)
	at java.util.concurrent.locks.ReentrantLock$Sync.nonfairTryAcquire(java.base@11-internal/ReentrantLock.java:131)
	at java.util.concurrent.locks.ReentrantLock$NonfairSync.tryAcquire(java.base@11-internal/ReentrantLock.java:199)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(java.base@11-internal/AbstractQueuedSynchronizer.java:1239)
	at java.util.concurrent.locks.ReentrantLock.lock(java.base@11-internal/ReentrantLock.java:267)
	at ReservedStackTest$ReentrantLockTest.lockAndCall(ReservedStackTest.java:173)
	at ReservedStackTest$ReentrantLockTest.lockAndCall(ReservedStackTest.java:174)
	at ReservedStackTest$ReentrantLockTest.lockAndCall(ReservedStackTest.java:174)

I am not exactly sure what the problem is but given the comment and @run command in the test:

 * @run main/othervm -XX:MaxInlineLevel=2 -XX:CompileCommand=exclude,java/util/concurrent/locks/AbstractOwnableSynchronizer.setExclusiveOwnerThread ReservedStackTest

/* The exclusion of java.util.concurrent.locks.AbstractOwnableSynchronizer.setExclusiveOwnerThread()
 * from the compilable methods is required to ensure that the test will be able
 * to trigger a StackOverflowError on the right method.
 */

it might have to do with that method.
Comments
No, we don't test on Windows. This happens on Linux.
14-02-2019

This test is still running on Windows, even after JDK-8213204.
12-02-2019

Does it by any chance only happen on Windows? Could be the same as JDK-8213567, but this runtime test is supposed to check if the platform supports ReservedStack.
27-11-2018

I can not reproduce this failure locally on my MacBook. It only fails in our CI.
04-09-2018