JDK-8210964 : add more ld preloading info to hs_error file on Linux
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: generic
  • Submitted: 2018-09-20
  • Updated: 2018-11-26
  • Resolved: 2018-09-28
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 JDK 12
11.0.2Fixed 12 b14Fixed
Description
Currently the hs_err file contains the LD_PRELOAD environment variable.
However for system wide configuration, the /etc/ld.so.preload file is important as well on Linux. So display it as well  (in case it is present).
Example  output  in hs_err  file  :

/etc/ld.so.preload:
/lib/x86_64-linux-gnu/mysupersmartagent.so

Comments
Please add an appropriate noreg label.
18-10-2018

Hello Robert, the original review can be found here : http://mail.openjdk.java.net/pipermail/hotspot-dev/2018-September/034272.html
12-10-2018

Hi Matthias, do you have a pointer to the original code review?
12-10-2018

Fix Request The patch is helpful for supportability issues so it would be great to have it in the LTS release jdk11. It adds more information about pre-loading configs of libs on Linux (often used for monitoring tools). Currently the hs_err file contains already the LD_PRELOAD environment variable. However for system wide configuration, the /etc/ld.so.preload file is important as well on Linux. So display it as well (in case it is present). See the Environment / LD_PRELOAD and FILES sections of : http://man7.org/linux/man-pages/man8/ld.so.8.html Currently we only display the LD_PRELOAD environment variable in jdk11 in the hs_err file ; but an alternative mechanism is the system wide configuration using the /etc/ld.so.preload file. So adding the patch would make the info in hs_err more complete and consistent. The patch applies cleanly.
12-10-2018