Question regarding JVM crashes in GC

Stefan Johansson stefan.johansson at
Thu Apr 6 09:58:17 UTC 2017

On 2017-04-05 16:34, Michael Rasmussen wrote:
> On 5 April 2017 at 15:41, Stefan Johansson <stefan.johansson at> wrote:
>> All these assertions are in MarkSweep::adjust_pointer and they suggest that
>> you are visiting an object with bad references. What's causing this is
>> really hard to say without more information. It sounds like this is easy for
>> you to reproduce, could we run the same tests ourselves? Or could you
>> construct a reproducer that we can run?
> Yes, it reproduces every single time :)
> At the moment, I assume it has something to do with
> java.lang.ref.Reference, as I see
> InstanceRefKlass::oop_ms_adjust_pointers(oop)+0x281 in the stacktrace
> in the core file. And I know we use a lot of weak references.
Interesting, the GC (or rather reference processing) actually do have 
some assumptions when it comes to the fields in reference objects. We 
expect the referent, discovered and next fields to be at certain 
offsets. You mentioned earlier that such assumptions might be 
problematic, are you doing any kind of instrumentation that could change 
those offsets?

> Unfortunately, currently I cannot share the test, but I'll try to see
> if can make a small standalone test case that I can share.
That would be really helpful to understand what's going on.


> /Michael

More information about the hotspot-dev mailing list