Impossible stack traces

hysoqvs0sb8 at tutanota.com hysoqvs0sb8 at tutanota.com
Wed Sep 23 20:07:23 UTC 2020


Hello,

Lately I have noticed that sometimes my method profiling events show stack traces that should not happen under any circumstances.

As an example, there is a class that looks roughly like this:

class SomeClass { 
      private Map<Integer, SomeOtherClass> map = new HashMap<>();
     ...
     map.put(0, new SomeOtherClass());
     map.put(1, new SomeOtherClass());     
     ...
     public SomeOtherClass get(int key) {          return map.get(key);     }}

I have confirmed that the map only ever holds those two keys.
The top of some stack traces captured by method profiling events then look like this:

HashMap$TreeNode java.util.HashMap$TreeNode.getTreeNode(int, Object) 
     HashMap$Node java.util.HashMap.getNode(Object)          Object java.util.HashMap.get(Object)               	SomeOtherClass SomeClass.get(int)

I have ran into this issue with jdk15 and some later ea builds, on windows, and 1ms sampling periods, can any of these be the cause of this issue?

with best regards,
Zsolt N.


More information about the hotspot-jfr-dev mailing list