Random java.util.NoSuchElementException exceptions when using perfasm

Bartosz Skrzypczak barteks2x at gmail.com
Wed Jan 18 19:34:55 UTC 2017


While trying to find some way to reproduce a JVM crash with
JMH+perfasm+gc profiler I got the following exception several times:

# Processing profiler results: LinuxPerfAsmProfiler Exception in
thread "main" java.util.NoSuchElementException
    at java.util.TreeMap.key(TreeMap.java:1327)
    at java.util.TreeMap$NavigableSubMap.firstKey(TreeMap.java:1561)
    at java.util.TreeSet.first(TreeSet.java:394)
    at org.openjdk.jmh.profile.AbstractPerfAsmProfiler.figureHotIntervals(AbstractPerfAsmProfiler.java:707)
    at org.openjdk.jmh.profile.AbstractPerfAsmProfiler.makeRegions(AbstractPerfAsmProfiler.java:670)
    at org.openjdk.jmh.profile.AbstractPerfAsmProfiler.processAssembly(AbstractPerfAsmProfiler.java:375)
    at org.openjdk.jmh.profile.AbstractPerfAsmProfiler.afterTrial(AbstractPerfAsmProfiler.java:273)
    at org.openjdk.jmh.runner.Runner.runSeparate(Runner.java:673)
    at org.openjdk.jmh.runner.Runner.runBenchmarks(Runner.java:542)
    at org.openjdk.jmh.runner.Runner.internalRun(Runner.java:313)
    at org.openjdk.jmh.runner.Runner.run(Runner.java:206)
    at benchmark.TestBenchmark.main(TestBenchmark.java:80)

It's even more rare than the JVM crash I was getting, but unlike the
JVM crash this is likely to be an issue with JMH. Unfortunately the
only way I found to maybe get this exception was to run many forks
(>100) with perfasm and gc profilers. I'm also not sure if the
benchmark itself also affects it.

Could I also get some information at least where should I report the
JVM crash and how to get some crash log? It doesn't generage hs_err
and running with -v EXTRA seems to make the JVM crash go away and
produces huge logs.


More information about the jmh-dev mailing list