JDK-8086278 : java/lang/ProcessHandle/TreeTest.java failed - ProcessReaper StackOverflowException
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: x86
  • Submitted: 2015-06-09
  • Updated: 2016-06-28
  • Resolved: 2016-04-13
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 b115Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
java/lang/ProcessHandle/TreeTest.java test failed during 2 sequential Nightly testing:

java.lang.NoClassDefFoundError: Could not initialize class java.util.concurrent.locks.LockSupport
	at java.util.concurrent.SynchronousQueue$TransferStack$SNode.tryMatch(SynchronousQueue.java:265)

and:

Exception in thread "process reaper" java.lang.StackOverflowError

I ran with -XX:+PreserveFramePointer 
Comments
The StackOverflows interfere with the termination of the reaper threads so they accumulate. In a full test run, lots of processes get started, I'm not sure of the 16279 number. This log was before the fix, so if the root cause was a small stack, it should be resolved.
15-04-2016

In http://aurora.ru.oracle.com/functional/faces/RunDetails.xhtml?names=1412980.JAVASE.NIGHTLY.VM.Comp_Baseline-Tiered.2016-04-04-98 there are 16279 process reapers. Is that expected? With 128k stack that is the entire address space on ia32.
15-04-2016

The intermittent failures are not reproducible but persistent. Raising the default stack size to 128k is a start.
14-04-2016

Failed in hs-comp nighhtly: http://aurora.ru.oracle.com/functional/faces/RunDetails.xhtml?names=1412980.JAVASE.NIGHTLY.VM.Comp_Baseline-Tiered.2016-04-04-98 RULE "java/lang/ProcessHandle/TreeTest.java" Crash Out of Memory Error ...allocation.cpp... RULE "java/lang/ProcessHandle/TreeTest.java" Exception Exception in thread "process reaper" RULE "java/lang/ProcessHandle/TreeTest.java" Exception Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" Exception in thread "process reaper" java.lang.StackOverflowError RULE "java/lang/ProcessHandle/TreeTest.java" Exception Exception in thread "process reaper" Exception in thread "process reaper" java.lang.StackOverflowError RULE "java/lang/ProcessHandle/TreeTest.java" Exception Exception in thread "process reaper" java.lang.StackOverflowError RULE "java/lang/ProcessHandle/TreeTest.java" Exception java.lang.NoClassDefFoundError: Could not initialize class java.util.concurrent.locks.LockSupport RULE "java/lang/ProcessHandle/TreeTest.java" Exception java.lang.StackOverflowError RULE "java/lang/ProcessHandle/TreeTest.java" ExitCode 1
05-04-2016

several api/java_lang/ProcessBuilder/ and api/java_lang/Runtime/exec tests from jck test suite are also affected
21-03-2016

If this can't be reproduced, please close as appropriate.
14-07-2015

With -XX:ThreadStackSize=VALUE it is possible to set the stack size of all Java threads to VALUE.
15-06-2015

Thank you, Roger and Zoltan, for quick evaluation.
10-06-2015

Hi Roger, this problem could be related to your recent changes for JDK-8077350. Could you please take a look? If you see that the failures were caused by a compiler problem, please let me know. I can investigate further then. Thank you and best regards, Zoltan
10-06-2015

I attempted to reproduce the failure on two machines: - a Windows 2008 Server x64 (64-bit) machine; - a Linux x64 machine. I used the same build as reported in the failure, 1.9.0-internal-fastdebug-20150606012711.drlong.jdk9-comp-b00. I ran java/lang/ProcessHandle/TreeTest.java with the following flag combinations: -"-server -Xcomp -XX:MaxRAMFraction=8 -XX:+CreateCoredumpOnCrash -ea -esa -XX:+TieredCompilation -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -XX:+PreserveFramePointer -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops" -"-server -Xcomp -XX:MaxRAMFraction=8 -XX:+CreateCoredumpOnCrash -ea -esa -XX:+TieredCompilation -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -XX:+PreserveFramePointer -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -Xcomp" "-server -Xcomp -XX:MaxRAMFraction=8 -XX:+CreateCoredumpOnCrash -ea -esa -XX:+TieredCompilation -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -XX:+PreserveFramePointer -XX:+IgnoreUnrecognizedVMOptions -XX:-DoEscapeAnalysis -XX:+AggressiveOpts" "-server -Xcomp -XX:MaxRAMFraction=8 -XX:+CreateCoredumpOnCrash -ea -esa -XX:+TieredCompilation -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -XX:+PreserveFramePointer -XX:+IgnoreUnrecognizedVMOptions -XX:-DoEscapeAnalysis -XX:+AggressiveOpts -Xcomp" Unfortunately, the failure did not reproduce in any of the previously mentioned configurations, but I'll continue repeating the experiments for a while to see if the problem reproduces. Based on the information available, I cannot determine in what ways the compilers are involved with this failure (if at all). From the originally reported failures, it is also unclear if this is a compiler problem or not. As this problem seems to be related to a recent change in the core libraries, I'll change the affected component to 'core-libs', the subcomponent to 'java.lang', and will assign the issue to R. Riggs for further investigation. If there is evidence to suggest that this is a compiler problem, please assign the issue back to me.
10-06-2015