Incorrect obj_is_alive logic? (Was: What does BufferBlob::Interpreter in a JVM crash log mean)

Srinivas Ramakrishna ysr1729 at gmail.com
Wed Nov 16 17:57:40 UTC 2011


It depends on where this is being used. I haven't looked at the code, but
if it was being used for verification,
the old answer would be considered more conservative. If on the other had
for the identification of object
liveness then the new answer would be more correct. I'll try and take a
look at it later today and get
back with comments.

thanks!
-- ramki

On Wed, Nov 16, 2011 at 4:55 AM, Krystal Mok <rednaxelafx at gmail.com> wrote:

> Hi all,
>
> Comments on bug 7066603, inline below:
>
> On Wed, Nov 16, 2011 at 4:05 AM, Tom Rodriguez <tom.rodriguez at oracle.com>
>  wrote:
>
>>
>> On Nov 14, 2011, at 2:00 PM, Martin Hare Robertson wrote:
>> > The biggest unresolved problem was reported under bug 7066603. Sadly
>> this seems to have been marked as low priority.
>>
>> It seems to have gotten stuck over in the wrong category.  I've moved
>> into the proper category and updated it.  It appears CMS isn't visiting
>> some regular Java objects held in perm so they are missing from the dump.
>>  The recent changes to move Strings and Classes out of perm make this
>> problem disappear in JDK7.  So it only affects JDK6 at this point.  I
>> believe the bug is in the obj_is_alive logic that CMS uses to visit only
>> live objects in perm.
>>
>
> Looking at the repro example in bug 7066603, I agree that the problem seem
> to lie in obj_is_alive logic.
>
> A quick patch to HotSpot 20.0 [1]:
>
> diff -r f0f676c5a2c6
> src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
> ---
> a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
>   Tue Mar 15 19:30:16 2011 -0700
> +++
> b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
>   Wed Nov 16 20:38:29 2011 +0800
> @@ -1143,7 +1143,7 @@
>          return (dead_map->sizeInBits() == 0) // bit_map has been allocated
>                 || !dead_map->par_isMarked((HeapWord*) p);
>        } else {
> -        return false; // We can't say for sure if it's live, so we say
> that it's dead.
> +        return true; // We can't say for sure if it's live, so we say
> that it's alive.
>        }
>      }
>    }
>
> With this patch, re-run the repro, and jhat doesn't complain any more.
>
> I'm not sure yet if this is the right change. It's interesting to find
> that in the repro example, all objects missing from the heap dump seem to
> be Strings referenced by objects in PermGen; the roots are most probably
> static fields.
>
> Regards,
> Kris Mok
>
> [1]:
> http://hg.openjdk.java.net/hsx/hsx20/master/file/f0f676c5a2c6/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
>
>
>> tom
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20111116/ccec6162/attachment.htm>


More information about the hotspot-gc-dev mailing list