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

DebugNonSafepoints generates incorrect information

XMLWordPrintable

    • b13

        FULL PRODUCT VERSION :
        Reproduced on 1.8.0_121, 1.8.0_144, 1.8.0_162 e.g.:

        java version "1.8.0_144"
        Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
        Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)


        FULL OS VERSION :
        Linux 3.10.0-514.36.5.el7.x86_64 #1 SMP Thu Dec 28 21:42:18 EST 2017 x86_64 x86_64 x86_64 GNU/Linux

        Also reproduced on macOS High Sierra 10.13.3

        A DESCRIPTION OF THE PROBLEM :
        When application is started with -XX:+DebugNonSafepoints parameter the debug information is incorrect: mapping between code memory address and BCI/Java code is wrong. This causes profilers that depend on DebugNonSafepoints, including Flight Recorder, to attribute CPU time to wrong Java code. Please note that this problem is not caused by using profiler prone to safepoint bias or skid. The debug information is incorrect.
        Some operations can make this problem to "go away" e.g. connecting with JVisualVM or Flight recorder completing recording and writing it down to disk.

        The Java bug submission for is too short to include all information so I created a writeup here: https://github.com/jodzga/debugnonsafepoints-problem
        It includes a sample test program, outputs and results of experiments that hopefully will help identify and fix the bug.

        THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try

        THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try

        REPRODUCIBILITY :
        This bug can be reproduced always.

          1. MoveSetDefaultNodeNotes.patch
            2 kB
            Tobias Hartmann
          2. Test.java
            2 kB
            Tobias Hartmann
          3. test.jfr
            789 kB
            Fairoz Matte
          4. Test2.java
            1 kB
            Tobias Hartmann

              thartmann Tobias Hartmann
              webbuggrp Webbug Group
              Votes:
              3 Vote for this issue
              Watchers:
              20 Start watching this issue

                Created:
                Updated:
                Resolved: