[11u] RFR: 8187450: JNI local refs exceeds capacity warning in NetworkInterface::getAll
Jonathan Dowland
jdowland at redhat.com
Mon Mar 22 20:02:32 UTC 2021
Hi,
Please consider and review this backport for 11u. It does not apply
clean from main, but the only hunk that doesn't is the Test metadata
tagging. The patch substantially reduces the JNI local reference count
when using NetworkInterface::getAll, which otherwise breaches the limit
set by -Xcheck:jni very quickly.
head patch: https://github.com/openjdk/jdk/commit/ba504fcee8ba9ca3e6c223effc46754444a9c49f
Bug: https://bugs.openjdk.java.net/browse/JDK-8187450
Webrev: https://cr.openjdk.java.net/~jdowland/webrevs/JDK-8187450/webrev.00/
Testing: Linux x86_64 tier1 and test/jdk/java/net/NetworkInterface/Test.java,
and by hand (see next paragraph)
If you want to do a thorough check of the difference made, there are
some shellscripts in the GitHub PR that make use of Linux network
namespaces to control how many Network interfaces the Java process sees,
that might be useful: https://github.com/openjdk/jdk/pull/2963
Best wishes,
--
Jonathan Dowland <jdowland at redhat.com>
Senior Software Engineer, OpenJDK, Red Hat
More information about the jdk-updates-dev
mailing list