[RFR] jdk8u272-b10/jdk8u272-ga
Volker Simonis
volker.simonis at gmail.com
Wed Oct 21 06:43:37 UTC 2020
Aleksey Shipilev <shade at redhat.com> schrieb am Mi., 21. Okt. 2020, 08:35:
> On 10/21/20 8:32 AM, Aleksey Shipilev wrote:
> > *) In src/share/classes/java/io/ObjectInputStream.java, blocks like
> these:
> >
> > @@ -1894,6 +1923,11 @@
> > }
> > } catch (ClassNotFoundException ex) {
> > resolveEx = ex;
> > + } catch (OutOfMemoryError memerr) {
> > + IOException ex = new InvalidObjectException("Proxy
> interface limit exceeded: " +
> > + Arrays.toString(ifaces));
> > + ex.initCause(memerr);
> > + throw ex;
> > }
> >
> > ...look way too optimistic to me. If that's a real OOME, then
> allocations in this block would
> > highly likely to fail themselves. If that's a fake OOMEs, then they are
> thrown where?
> >
> > I assume it is a fake OOME: I see the changeset (8249927: Specify limits
> of
> > jdk.serialProxyInterfaceLimit), which seems to imply this. But, there is
> no
> > "jdk.serialProxyInterfaceLimit" in sight in the patch or in existing
> source.
>
> Ah, I am blind, there is a block with "serialProxyInterfaceLimit" in the
> same file:
>
> 1897 // Recheck against implementation limit and throw with
> interface names
> 1898 if (numIfaces > Caches.PROXY_INTERFACE_LIMIT) {
> 1899 throw new InvalidObjectException("interface limit
> exceeded: " +
> 1900 numIfaces +
> 1901 ", limit: " + Caches.PROXY_INTERFACE_LIMIT +
> 1902 "; " + Arrays.toString(ifaces));
> 1903 }
>
> So what the OOME catch block is doing?
>
The property is read at the beginning of that file. See
https://cr.openjdk.java.net/~andrew/openjdk8/8u272/jdk/src/share/classes/java/io/ObjectInputStream.java.udiff.html
I think the OOME should catch OOMs in metaspace when to many proxy classes
have been created.
> --
> Thanks,
> -Aleksey
>
>
More information about the jdk8u-dev
mailing list