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

serviceability/sa/ClhsdbFindPC.java cannot find MaxJNILocalCapacity with ASLR

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 17
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b23
    • OS:
      linux

      Description

      The test case was added recently with JDK-8261098. On some machines, it fails with:

      $ CONF=linux-x86_64-server-fastdebug make run-test TEST=serviceability/sa/ClhsdbFindPC.java

      Starting clhsdb against corefile core and exe /home/shade/jdk/build/linux-x86_64-server-fastdebug/images/jdk/bin/java
      [2021-03-09T11:37:01.497454082Z] Gathering output for process 79218
      [2021-03-09T11:37:02.344227826Z] Waiting for completion for process 79218
      [2021-03-09T11:37:02.344444425Z] Waiting for completion finished for process 79218
      Output:
      Opening core file, please wait...
      hsdb> hsdb> + verbose true
      hsdb> + findsym MaxJNILocalCapacity
      0x00007fb919044688
      hsdb> + quit

      Starting clhsdb against corefile core and exe /home/shade/jdk/build/linux-x86_64-server-fastdebug/images/jdk/bin/java
      [2021-03-09T11:37:02.347413091Z] Gathering output for process 79281
      [2021-03-09T11:37:03.335273729Z] Waiting for completion for process 79281
      [2021-03-09T11:37:03.335473657Z] Waiting for completion finished for process 79281
      Output:
      Opening core file, please wait...
      hsdb> hsdb> + verbose true
      hsdb> + findpc 0x00007fb919044688
      Address 0x00007fb919044688: In unknown location
      hsdb> + quit

      STDERR:
       stdout: [ + findpc 0x00007fb919044688
      Address 0x00007fb919044688: In unknown location
      ];
       stderr: [ + findpc 0x00007fb919044688
      Address 0x00007fb919044688: In unknown location
      ]
       exitValue = -1

      java.lang.RuntimeException: Test ERROR java.lang.RuntimeException: 'Address 0x00007fb919044688: .*MaxJNILocalCapacity' missing from stdout/stderr

      Note that the prior invocation of hsdb found the symbol at the same address 0x00007fb919044688, but the subsequent invocation missed it.

      This issue goes away after disabling ASLR on target machine:
       $ echo 0 | sudo tee /proc/sys/kernel/randomize_va_space

      ...and remanifests when ASLR is enabled back:
       $ echo 2 | sudo tee /proc/sys/kernel/randomize_va_space

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cjplummer Chris Plummer
              Reporter:
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: