JDK-8193803 : Application/microbenchmarks test gets errors in JMH or StackOverflow
  • Type: Bug
  • Component: core-libs
  • Priority: P3
  • Status: Resolved
  • Resolution: Cannot Reproduce
  • Submitted: 2017-12-19
  • Updated: 2019-02-23
  • Resolved: 2018-07-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.
Other
tbd_minorResolved
Related Reports
Relates :  
Relates :  
Description
applications/microbenchmarks/api/Test.java#id329,[tier5],[linux-x64-debug] failed in tier5 run. 

The logfile has: 
----------System.err:(59/4081)---------- 
 stdout: [# WARNING: Unable to acquire the JMH lock (/tmp/jmh.lock): already taken by another JMH instance, ignored by user's request. 

and some 

# Benchmark mode: Throughput, ops/time 
# Benchmark: oracle.micro.benchmarks.api.java.util.ArraysEquals.testByteArrayEqualsTrue 

]; 
 stderr: [Exception in thread "process reaper" java.lang.StackOverflowError 
at java.base/java.util.concurrent.ConcurrentHashMap.fullAddCount(ConcurrentHashMap.java:2591) 

and then 

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class java.util.Random 
at java.base/java.io.File$TempDirectory.<clinit>(File.java:1916) 
at java.base/java.io.File.createTempFile(File.java:2072) 
at java.base/java.io.File.createTempFile(File.java:2136) 
at org.openjdk.jmh.util.FileUtils.tempFile(FileUtils.java:43) 
at org.openjdk.jmh.util.FileUtils.createTempFileWithLines(FileUtils.java:83) 

Which looks like an intermittent test execution error, but I've seen this multiple times. 
Comments
No reproducible and not seen in 6 months.
13-07-2018

Don't know that it matters but the current JMH version is 1.19.
02-01-2018

Is there anything in these test runs that would result in a very small stack being used? With ASLR then the randomisation might lead to intermittent stack overflows.
02-01-2018

Still puzzling; the stack does not look deep enough at the stack overflow to cause an error. Prior updates removed lambda's from the setup to avoid hidden overhead. ConcurrentHashMap uses bootstrap methods to initialize some state. The NoClassDefFound exception for Random may indicate an initialization race.
19-12-2017

For these failures: Exception in thread "process reaper" java.lang.StackOverflowError we thought that this fix would do the trick: JDK-8173817 StackOverflowError in "process reaper" thread Update: adding Roger to this bug for his opinion.
19-12-2017