RFR (M) 8155951: VM crash in nsk/jvmti/RedefineClasses/StressRedefine: assert failed: Corrupted constant pool
David Holmes
david.holmes at oracle.com
Mon May 16 01:51:51 UTC 2016
Hi Coleen,
On 13/05/2016 4:14 AM, Coleen Phillimore wrote:
> 8151066: assert(0 <= i && i < length()) failed: index out of bounds
> Summary: lock classes for redefinition because constant pool merging
> isn't thread safe, use method constant pool because constant pool
> merging doesn't make equivalent cpCaches because of invokedynamic
>
> I had to make these changes together. See bugs for more details.
>
> open webrev at http://cr.openjdk.java.net/~coleenp/8155951/webrev
> bug link https://bugs.openjdk.java.net/browse/JDK-8155951
> bug link https://bugs.openjdk.java.net/browse/JDK-8151066
In general the locking approach seems okay - as long as all mutating
actions on the constantpool are being guarded with this locking.
But I'm concerned that you are using a bit in _misc_flags for this
mutable state. It isn't clear to me when the other bits in _misc_flags
might be set but I'm assuming only during initial class parsing, or some
other single-threaded use? Putting a mutable bit into such a flag set is
fragile and can only be done once.
Thanks,
David
> Tested with rbt nightly test and 24 hours with StressRedefine test.
>
> Thanks,
> Coleen
>
>
>
More information about the hotspot-runtime-dev
mailing list