Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8077276

allocating heap with UseLargePages and HugeTLBFS may trash existing memory mappings (linux)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Resolved In Build:
      b66
    • OS:
      linux

      Backports

        Description

        Code review showed that on Linux, if heap is allocated via reserve_memory_special_huge_tlbfs_mixed(), mmap(addr, MAP_FIXED) gets called to establish heap memory which will trash existing mappings which happen to be located in that area.

        I could also reproduce this experimentally.

        The error is that reserve_memory_special_huge_tlbfs_mixed() calls os::reserve_memory() with a requested_addr != null to establish an initial memory mapping where none existed before.

        It might be smart to get rid of the requested_addr parameter to os::reserve_memory altogether, see http://comments.gmane.org/gmane.comp.java.openjdk.hotspot.devel/18049. I don't think there is a way this parameter can be used correctly in this API.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  stuefe Thomas Stuefe
                  Reporter:
                  stuefe Thomas Stuefe
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: