RFR: 8278239: vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine failed with EXCEPTION_ACCESS_VIOLATION at 0x000000000000000d
Serguei Spitsyn
sspitsyn at openjdk.java.net
Tue Dec 21 22:24:20 UTC 2021
On Mon, 20 Dec 2021 22:59:39 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> Thanks to @stefank and @fisk for the diagnosis. ZGC is looking at metadata in unloaded nmethods, but redefinition doesn't keep this metadata from being deallocated. Change the iterators that mark metadata in use to walk unloaded nmethods as well as other alive nmethods.
>
> The test case reproduces the crash on windows if run in an 100 iteration loop. This fix does not crash in the same test. Also ran tier1-6.
Coleen,
Thank you for fixing this issue!
I've posted one question. Other than that it looks good to me.
Thanks,
Serguei
src/hotspot/share/code/codeCache.cpp line 681:
> 679: void CodeCache::metadata_do(MetadataClosure* f) {
> 680: assert_locked_or_safepoint(CodeCache_lock);
> 681: NMethodIterator iter(NMethodIterator::only_alive);
The `CodeCache::metadata_do` is used in `MetadataOnStackMark::MetadataOnStackMark`.
Besides `RedefineClasses` the `MetadataOnStackMark` is also used in `ClassLoaderDataGraph::walk_metadata_and_clean_metaspaces`.
Is the change at L681 correct for `ClassLoaderDataGraph::walk_metadata_and_clean_metaspaces`as well?
-------------
PR: https://git.openjdk.java.net/jdk/pull/6900
More information about the hotspot-dev
mailing list