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

VM misses stack frames in compiled mode on x86 platforms

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      generic

      Description



      Name: pvR10198 Date: 09/04/2003


      ---------------------------------------------------
      Test : nsk/jvmti/FramePop/framepop001
                  : nsk/jvmti/GetStackTrace/getstacktr005
      VM : ClientVM, ServerVM
      Mode : -Xcomp
      Platform : x86
      OS : SunOS 5.8, RedHat Linux 8.0, Windows 2000
      JDK : 1.5.0-b15 promoted (JVMTI v71)
                    1.5.0-b15 w/ Hotspot build 20030820101708.rfield.hotspot3-product (JVMTI v0.2.90)
      ---------------------------------------------------

      The framepop001 test exercises JVMTI event callback function FramePop.
      The test starts a new thread, stops it at breakpoint, requests to
      generate FramePop events for current and the next stack frames, and
      verifies if parameters of received FramePop events contain expected values.
      Also the test checks that the location reported by GetFrameLocation
      indentifies the executable location in the returning method, immediately
      prior to the return.

      The getstacktr005 test exercises JVMTI function GetStackTrace via breakpoint
      and consequent step. The test starts a new thread, does some nested calls,
      stops the thread at breakpoint, does single step and checks if the number
      of frames in the thread's stack is as expected and the function returns all
      the expected frames.

      The framepop001 test fails to get FramePop event from the second stack
      frame of the child thread, but gets FramePop event from a stack frame
      of the main thread.

      The getstacktr005 test steps into the main thread right after breakpoint.

      The tests pass in interpreted and mixed modes on x86 and all modes/solsparc.
      The tests pass with jdk 1.5.0-b14.

      To reproduce the framepop001 test failure run doit1.sh script in
      GammaBase/Bugs/<this bug number> directory:

          sh doit1.sh <JAVA_HOME> -Xcomp

      To reproduce the getstacktr005 test failure run doit2.sh script in
      GammaBase/Bugs/<this bug number> directory:

          sh doit2.sh <JAVA_HOME> -Xcomp

      Running in verbose mode framepop001 outputs:

      $ sh doit1.sh /export/ld24/java/hotspot/jdk1.5/solx86 -v -Xcomp
      framepop001.c:
      JVMTITools.c:
      java version "1.5.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b15)
      Java HotSpot(TM) Client VM (build 1.5.0-beta-b15, compiled mode)

      >>> retrieving frame pop info ...
      >>> class: "Lnsk/jvmti/FramePop/framepop001;"
      >>> method: "chain()V"
      >>> location: 0x000000000
      >>> ... done
      Wrong number of frame pop events: 1, expected: 2
      >>> retrieving frame pop info ...
      >>> class: "Lnsk/jvmti/FramePop/framepop001;"
      >>> method: "run([Ljava/lang/String;Ljava/io/PrintStream;)I"
      >>> location: 0x000000003
      >>> ... done
      (pop#1) wrong class: "Lnsk/jvmti/FramePop/framepop001;", expected: "Lnsk/jvmti/FramePop/framepop001a;"
      (pop#1) wrong method name: "run", expected: "dummy"
      (pop#1) wrong method sig: "([Ljava/lang/String;Ljava/io/PrintStream;)I", expected: "()V"
      Exit Code: 97

      Running getstacktr005 outputs:

      $ sh doit2.sh /export/ld24/java/hotspot/jdk1.5/solx86 -Xcomp
      framepop001.c:
      JVMTITools.c:
      java version "1.5.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b15)
      Java HotSpot(TM) Server VM (build 1.5.0-beta-b15, compiled mode)

      Wrong frame count, expected: 5, actual: 1
      (frame#0) wrong class sig: "Ljava/lang/Thread;", expected: "Lnsk/jvmti/GetStackTrace/getstacktr005$TestThread;"
      (frame#0) wrong method name: "exit", expected: "chain4"
      Exit Code: 97

      This looks like the same problem as 4915625:
        TTY: second 'step' command runs incorrectly in "-server -Xcomp" mode on Intel

      This bug also affects the following tests:

          nsk/jvmti/GetStackTrace/getstacktr008
          nsk/jvmti/RedefineClasses/redefclass019
          nsk/jvmdi/events/framepop001
          nsk/jvmdi/GetCallerFrame/callframe005
          nsk/jvmdi/GetCallerFrame/callframe008
          nsk/jvmdi/RedefineClasses/redefclass019

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rgottliesunw Robert Gottlieb (Inactive)
              Reporter:
              vpnsunw Vpn Vpn (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: