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

NMT does not record reserved memory base address correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • 25
    • 25
    • hotspot
    • aarch64
    • linux

      During the investigation on JDK-8356020, it was found that CDS got a reserved memory base address different from reported by NMT. The problem was only seen on the linux-aarch64 platform.

      $ ./jdk-25/fastdebug/bin/java -Xshare:dump -Xlog:cds -Xlog:nmt*=debug
      [...]
      [1.013s][debug ][nmt ] Add reserved region 'Shared class space' (0x0000fffef3bed000, 1073807360)
      [1.013s][info ][cds ] Reserved output buffer space at 0x0000fffef3bf0000 [1073741824 bytes]

      CDS got the base address of 0x0000fffef3bf0000, but for some reasons NMT thinks the address starts at 0x0000fffef3bed000

      Note: this doesn't always happen. The mismatch happens only when the lowest bits of "Reserved output buffer space" are not (16KB or 48KB) aligned. Normally, you see well-aligned regions like the following and the bug is not triggered:

      [1.395s][debug][nmt] Add reserved region 'Shared class space' (0x0000fffe48000000, 1073741824)
      [1.395s][info ][cds] Reserved output buffer space at 0x0000fffe48000000 [1073741824 bytes]

            azafari Afshin Zafari
            ccheung Calvin Cheung
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: