RFR(S): 8205699: assert(_owner_offset != 0) failed in javaClasses.cpp

Jiangli Zhou jiangli.zhou at oracle.com
Wed Jun 27 02:04:03 UTC 2018

Thanks for the review, David! I’ll push after mach5 tests finish.

> On Jun 26, 2018, at 6:48 PM, David Holmes <david.holmes at oracle.com> wrote:
> Looks good Jiangli! Thank you for fixing my omission.
> It's pity there isn't some way to detect that a newly added "well-known class" also needs to be have the CDS "serialize" method defined (I don't think it applies to all well-known classes defined in systemDinctionary.hpp - if it did then we may be able to hook something into the macros there).

Agreed. I was the one who introduced the fragile issue. Maybe we can use shared macros for MetaspaceShared::serialize_well_known_classes() and JavaClasses::compute_offsets(). So we only need to specify the list of classes with field offsets in one place. That hopefully can help prevent future issue like this. I will create a RFE if the approach sounds ok.


> Thanks,
> David
> On 27/06/2018 10:17 AM, Jiangli Zhou wrote:
>> Please review the following fix for 8205699. Added java_util_concurrent_locks_AbstractOwnableSynchronizer::serialize() for archiving computed AbstractOwnableSynchronizer field offsets.
>> webrev: http://cr.openjdk.java.net/~jiangli/8205699/webrev.00/ <http://cr.openjdk.java.net/~jiangli/8205699/webrev.00/>
>> bug: https://bugs.openjdk.java.net/browse/JDK-8205699?filter=14921 <https://bugs.openjdk.java.net/browse/JDK-8205699?filter=14921>
>> Ran following test locally on linux-x64 in CDS mode. All tests passed without assertion.
>> java/lang/management/ThreadMXBean/FindDeadlocks.java Tier3
>> java/lang/management/ThreadMXBean/LockedSynchronizers.java Tier3
>> java/lang/management/ThreadMXBean/MyOwnSynchronizer.java Tier3
>> Running tier1, tier2 and tier3 tests via mach5.
>> Thanks,
>> Jiangli

More information about the hotspot-runtime-dev mailing list