JDK-8209826 : Undefined reference to os::write after JDK-8209657 (filemap.hpp cleanup)
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-08-22
  • Updated: 2019-12-10
  • Resolved: 2018-08-22
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.7Fixed 12 b09Fixed
Related Reports
Relates :  
Description
After JDK-8209657 Refactor filemap.hpp to simplify integration with Serviceability Agent, if you build without precompiled headers, the build will fail with:

hotspot/variant-server/libjvm/objs/filemap.o: In function `FileMapInfo::write_bytes(void const*, unsigned long)':
/scratch/cccheung/jdk-hs-hotspot/share/memory/filemap.cpp:695: undefined reference to `os::write(int, void const*, unsigned int)' 
Comments
Hi Andrew, JDK 12 is not a LTS release. I can open up the discussion on e11u list about backporting the additonal CDS changes to 11u if there is a general interest. We are willing to contribute backporting changes in CDS area (and beyond) to JDK 11 updates, if there is a general community interest and needs for additional fixes and minor improvements in this area. Here is a list of changes I identified for backporting: https://bugs.openjdk.java.net/browse/JDK-8231895?jql=labels%20%3D%20google-interest%20AND%20labels%20!%3D%20jdk11u-fix-yes We also strongly support keeping stability as high priority and are okay if the community decide to not backport additional CDS fixes and minor improvements to JDK 11 updates. Thanks!
03-11-2019

I don't recall the discussion on th e11u list about backporting large CDS changes. It seems like a great deal of work and perhaps it would be better to move to JDK 12 than backport large parts of JDK 12 to JDK 11.
18-10-2019

Fix Request Backporting this patch as a dependency for additional planned backporting of CDS bug fixes and improvements. Patch applies cleanly to 11u on top of JDK-8209657. I'll make sure to push this backport together with the one for JDK-8209657 in order to prevent any build breaking.
03-10-2019

The fix is diff -r e77d7687c831 src/hotspot/share/memory/filemap.cpp --- a/src/hotspot/share/memory/filemap.cpp Fri Aug 17 13:53:53 2018 -0700 +++ b/src/hotspot/share/memory/filemap.cpp Tue Aug 21 19:56:14 2018 -0700 @@ -44,7 +44,7 @@ #include "prims/jvmtiExport.hpp" #include "runtime/arguments.hpp" #include "runtime/java.hpp" -#include "runtime/os.hpp" +#include "runtime/os.inline.hpp" #include "runtime/vm_version.hpp" #include "services/memTracker.hpp" #include "utilities/align.hpp"
22-08-2018