JDK-8228764 : New library dependencies due to JDK-8222720
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11,13,14
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2019-07-30
  • Updated: 2019-09-12
  • Resolved: 2019-08-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
Related Reports
Relates :  
Relates :  
On 30/07/2019 7:34 am, Rainer Jung wrote:

While doing Tomcat tests I noticed, that at least on SLES 12 JDK 13 and 14 EA have a lot of new runtime library dependencies.

Change fb5b3981eac with log

8222720: Provide extended VMWare/vSphere virtualization related info in the hs_error file on linux/windows x86_64

loads /usr/lib64/libguestlib.so.0 already during JVM startup. That  library depends on /usr/lib64/libvmtools.so.0, which in turn depends on  a lot of other libraries:

   NEEDED               libdnet.so.1
   NEEDED               libglib-2.0.so.0
   NEEDED               libicui18n.so.52.1
   NEEDED               libicuuc.so.52.1
   NEEDED               libpthread.so.0
   NEEDED               libdl.so.2
   NEEDED               libssl.so.1.0.0
   NEEDED               libcrypto.so.1.0.0
   NEEDED               libc.so.6
   NEEDED               ld-linux-x86-64.so.2
   NEEDED               libgcc_s.so.1

Some are not so problematic, but for instance Tomcat is able to use  custom build OpenSSL libraries to replace the JSSE crypto engine with  OpenSSL based one using JNI. Unfortunately the JDK is now loading libssl and libcrypto early. In case our TC OpenSSL also uses SO version 1.0.0 it will not get loaded, in case it is another version we can run into a mix of symbols resolved in the platform OpenSSL libs now loaded early  and the ones provided with TC loaded later.
This is an example, why it would be good to not introduce too many native library dependencies for the JVM or make it optional in the sense of configurable during runtime. Of the above list, the icu libs, libglib and libdnet are other libs one would probably try to avoid.
The issue was solved by using the switch -XX:+-ExtensiveErrorReports to switch off the feature by default. Linking to the CSR of the flag to track all uses of the flag.

Fix Request (regarding jdk11u) I would like to have the patch as well in jdk11, because the introduced dependencies on VMWare based linuxx86_64 systems can cause issues for some users (see the description above for the jdk13 request). The patch applies cleanly.

URL: https://hg.openjdk.java.net/jdk/jdk13/rev/929f37a9c35d User: mbaesken Date: 2019-08-01 07:39:36 +0000

Fix request approved.

Fix Request The introduced lib dependencies of /usr/lib64/libguestlib.so.0 and /usr/lib64/libvmtools.so.0 to various other libraries caused problems for the user as described in the bug in the Tomcat scenario. So there should be a way to avoid the additional lib dependencies. Goetz Lindenmaier suggested to use the already existing flag "-XX:ExtensiveErrorReports" ( default 'false' ) to guard the lib loading. This solves the reported issue and still gives other users the ability to have the extended virtualization metrics in the hs_err file. Webrev : http://cr.openjdk.java.net/~mbaesken/webrevs/8228764.0/ The patch has been reviewed by goetz and dholmes.

On 30/07/2019 9:06 pm, Lindenmaier, Goetz wrote: > Hi, > > there is already -XX:ExtensiveErrorReports with default 'false'. > It's supposed to guard additional infos in the hs_err file. > As it's already available, no CSR should be needed. > > Can't we just use this? Below tiny fix should do the job. > > diff -r 144585063bc8 src/hotspot/share/utilities/virtualizationSupport.cpp > --- a/src/hotspot/share/utilities/virtualizationSupport.cpp Tue Jul 30 11:14:16 2019 +0800 > +++ b/src/hotspot/share/utilities/virtualizationSupport.cpp Tue Jul 30 13:04:58 2019 +0200 > @@ -40,6 +40,9 @@ > static char extended_resource_info_at_startup[600]; > void VirtualizationSupport::initialize() { > + > + if (!ExtensiveErrorReports) return; > + > // open vmguestlib and bind SDK functions > char ebuf[1024]; > dlHandle = os::dll_load("vmGuestLib", ebuf, sizeof ebuf);