I encountered StackOverflowError when I run dumpcodecache command in CLHSDB:
------------
hsdb> dumpcodecache
Exception in thread "main" java.lang.StackOverflowError
at sun.jvm.hotspot.code.CodeBlob.getName(jdk.hotspot.agent@9-ea/CodeBlob.java:118)
at sun.jvm.hotspot.code.CodeBlob.getName(jdk.hotspot.agent@9-ea/CodeBlob.java:118)
at sun.jvm.hotspot.code.CodeBlob.getName(jdk.hotspot.agent@9-ea/CodeBlob.java:118)
at sun.jvm.hotspot.code.CodeBlob.getName(jdk.hotspot.agent@9-ea/CodeBlob.java:118)
at sun.jvm.hotspot.code.CodeBlob.getName(jdk.hotspot.agent@9-ea/CodeBlob.java:118)
:
------------
CodeBlob#getName() calls itself recursively.
Thus it occurs StackOverflowError.
http://hg.openjdk.java.net/jdk9/hs/hotspot/file/e99e410e78e1/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeBlob.java#l117