A bug in C2 that causes a large amount of physical memory to be allocated

Baesken, Matthias matthias.baesken at sap.com
Fri Mar 15 12:17:26 UTC 2019


Hello, looks  like   


nmethod::print_calls


3284    case relocInfo::opt_virtual_call_type: {
3285      VerifyMutexLocker mc(CompiledIC_lock);
3286      CompiledIC_at(&iter)->print();
3287      break;
3288    }


Misses the Resourcemark too  (although   the coding might be unused (?) )  ...

Best regards, Matthias



> Date: Fri, 15 Mar 2019 12:08:14 +0100
> From: Aleksey Shipilev <shade at redhat.com>
> To: Tobias Hartmann <tobias.hartmann at oracle.com>, ???
> 	<jiapeng.li at perfma.com>, jdk8u-dev <jdk8u-
> dev at openjdk.java.net>,
> 	hotspot-runtime-dev <hotspot-runtime-dev at openjdk.java.net>,
> 	hotspot-compiler-dev <hotspot-compiler-dev at openjdk.java.net>,
> Coleen
> 	Phillimore <coleen.phillimore at oracle.com>
> Subject: Re: A bug in C2 that causes a large amount of physical memory
> 	to be allocated
> Message-ID: <4bfc14c4-f80c-9d5f-a036-4555dda9d016 at redhat.com>
> Content-Type: text/plain; charset=utf-8
> 
> On 3/15/19 11:45 AM, Aleksey Shipilev wrote:
> > On 3/15/19 11:42 AM, Tobias Hartmann wrote:
> >> On 15.03.19 11:08, ??? wrote:
> >>> ? ? Thank you, will this patch consider backport to jdk8?
> >>
> >> Probably a point fix is more suitable for a backport but I leave this to
> Coleen / the runtime team
> >> to decide.
> >
> > What a coincidence! I think my build server OOMs on tests with similar
> symptoms.
> >
> > If there are no objections and/or subtle problems with it, I am willing to
> pick this up for 11u and
> > 8u backports:
> >
> > $ hg qdiff
> > diff -r 3086207c8650 src/hotspot/share/code/nmethod.cpp
> > --- a/src/hotspot/share/code/nmethod.cpp        Tue Mar 05 08:24:58 2019 -
> 0500
> > +++ b/src/hotspot/share/code/nmethod.cpp        Fri Mar 15 11:39:27 2019
> +0100
> > @@ -1538,10 +1538,11 @@
> >            Metadata* md = r->metadata_value();
> >            if (md != _method) f(md);
> >          }
> >        } else if (iter.type() == relocInfo::virtual_call_type) {
> >          // Check compiledIC holders associated with this nmethod
> > +        ResourceMark rm;
> >          CompiledIC *ic = CompiledIC_at(&iter);
> >          if (ic->is_icholder_call()) {
> >            CompiledICHolder* cichk = ic->cached_icholder();
> >            f(cichk->holder_metadata());
> >            f(cichk->holder_klass());
> 
> Tracked here:
>   https://bugs.openjdk.java.net/browse/JDK-8220718
> 
> -Aleksey



More information about the jdk8u-dev mailing list