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

MethodExitEvent is not received upon method invokation

XMLWordPrintable

    • generic
    • generic



      Name: elR10090 Date: 07/20/2001



      Tests

          nsk/jdi/MethodExitEvent/method/method001
          nsk/jdi/MethodExitEvent/method/method002

      failed against Merlin-beta2 builds b69-b70 on all platforms except SolSparc.
      No any MethodExitEvents are received after method has been invoked.

      On SolSparc platforms tests do pass against builds b69-b70.
      Tests also pass on all platforms against build b68.

      These tests verify receiving of MetodExitEvent from debuggee after method
      is invoked. First test verifies that the event is received
      upon method invokation and has correct references to the request,
      thread, class and method. Second test verifies that the event is received
      for that method, which is an implementation of an abstract one.

      All these tests has the same structure.

      Each test consists of two parts - debugger and debuggee.
      Debugger launches debuggee and sets two breakpoints before and after
      invokation of the checked method. It also creates event request and
      starts separate thread for handling received events. Created event
      request is initially disabled.

      When debuggee reaches first breakpoint, debugger enables event request
      and disables it after second breakpoint is reached in debuggee.
      Thus, no strange events are expected while testing.

      Debugger verifies each received event and counts them all.
      Test fails if number of received events differs from expected one.

      These tests belongs testbase_nsk and were modified due to fixing test bugs:

          4455653 VMDisconnectedException on resume
          4433805 EventSet.resume() for VMStartEvent resumes thread suspended
                  by breakpoint request

      Updated versions of the tests will appear in the next r06 release
      of testbase_nsk located here:

          /net/sqesvr.eng/export/vsn/VM/testbase/testbase_nsk.v14

      To reproduce the bug run 'doit.sh' script located here:

          /net/sqesvr.eng/export/vsn/VM/GammaBase/Bugs/<this bug number>

      Use:
          sh doit.sh $JAVA_HOME $JAVA_OPTS
      Where:
          $JAVA_HOME: points to Merlin-b70
          $JAVA_OPTS: optional VM keys, such as -d64, -server, -Xcomp, etc.


      Test output against Merlin-b70 on Linux:
      -------------------------------------------------------------------
      sh doit.sh /export/ld24/java/hotspot/jdk1.4/linux
      Compiling support classes...
      Compiling test classes...
      Running test...
      Connecting to debuggee
      binder> Listening for a pipe connection to port: 7000
      binder> VirtualMachineManager: version 1.4
      binder> FindingConnector: default
      binder> LaunchingConnector:
      binder> name: com.sun.jdi.CommandLineLaunch
      binder> description: Launches target using Sun Java VM command line and attaches to it
      binder> transport: dt_socket
      binder> Connector arguments:
      binder> home=/.automount/novo172/root/export/home/java/dest/jdk1.4.0beta-b70/linux-i386/jre
      binder> vmexec=java
      binder> options= -classpath ".:/export/ld24/java/hotspot/jdk1.4/linux/lib/tools.jar"
      binder> main=nsk.jdi.MethodExitEvent.method.method001a "-debugee.vmkeys=" "-verbose" "-waittime=1"
      binder> quote="
      binder> suspend=true
      binder> Launch debugee
      Resuming debuggee
      Waiting for command: ready
      binder> Waiting for pipe connection
      debugee.stderr> debugee.pipe> Making pipe connection to socket: localhost:7000
      Getting loaded class in debuggee
      Getting reference to method <foo>
      Getting reference to field <flag>
      Getting reference to field <depth>
      Getting value of field <depth>
      depth == 10
      Creating MethodExitRequest
        suspend policy is SUSPEND_ALL
      MethodExitRequest is created
      Getting reference to method <run>
      Creating two auxilary breakpoints into method <run>
      Setting breakpoint at location: nsk.jdi.MethodExitEvent.method.method001a:67
      Setting breakpoint at location: nsk.jdi.MethodExitEvent.method.method001a:73
      Cleaning event queue
      Starting eventHandler
      Sending command: go

      Waiting for command: done
      BreakpointEvent received for location 67
      Enabling MethodExitRequest at breakpoint before invoking method
      BreakpointEvent received for location 73
      Disabling MethodExitRequest at breakpoint after invoking method

      Waiting for all expected events received
      eventHandler completed
      # ERROR: FAILURE 1: No any MethodExitEvent received

      Sending command: quit
      Finally cleaning event queue
      Waiting for debuggee terminating
      Debuggee PASSED with exit code: 95
      # ERROR: TEST FAILED


      #>
      #> SUMMARY: Following errors occured
      #> during test execution:
      #>
      # ERROR: FAILURE 1: No any MethodExitEvent received
      # ERROR: TEST FAILED
      Java exit code = 97
      -------------------------------------------------------------------


      Test output against Merlin-b70 on SolSparc:
      -------------------------------------------------------------------
      sh doit.sh /export/ld24/java/hotspot/jdk1.4/solsparc
      Compiling support classes...
      Compiling test classes...
      java version "1.4.0-beta_refresh"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta_refresh-b70)
      Java HotSpot(TM) Client VM (build 1.4.0-beta_refresh-b70, mixed mode)
      Running test...
      Connecting to debuggee
      binder> Listening for a pipe connection to port: 7000
      binder> VirtualMachineManager: version 1.4
      binder> FindingConnector: default
      binder> LaunchingConnector:
      binder> name: com.sun.jdi.CommandLineLaunch
      binder> description: Launches target using Sun Java VM command line and attaches to it
      binder> transport: dt_socket
      binder> Connector arguments:
      binder> home=/export/ld54/java/dest/jdk1.4.0beta-b70/solsparc/jre
      binder> vmexec=java
      binder> options= -classpath ".:/export/ld24/java/hotspot/jdk1.4/solsparc/lib/tools.jar"
      binder> main=nsk.jdi.MethodExitEvent.method.method001a "-debugee.vmkeys=" "-verbose" "-waittime=1"
      binder> quote="
      binder> suspend=true
      binder> Launch debugee
      Resuming debuggee
      Waiting for command: ready
      binder> Waiting for pipe connection
      debugee.stderr> debugee.pipe> Making pipe connection to socket: localhost:7000
      Getting loaded class in debuggee
      Getting reference to method <foo>
      Getting reference to field <flag>
      Getting reference to field <depth>
      Getting value of field <depth>
      depth == 10
      Creating MethodExitRequest
        suspend policy is SUSPEND_ALL
      MethodExitRequest is created
      Getting reference to method <run>
      Creating two auxilary breakpoints into method <run>
      Setting breakpoint at location: nsk.jdi.MethodExitEvent.method.method001a:67
      Setting breakpoint at location: nsk.jdi.MethodExitEvent.method.method001a:73
      Cleaning event queue
      Starting eventHandler
      Sending command: go

      Waiting for command: done
      BreakpointEvent received for location 67
      Enabling MethodExitRequest at breakpoint before invoking method
      MethodExitEvent is received for method foo, counter = 1
      flag == 3
      MethodExitEvent is received for method foo, counter = 2
      flag == 3
      MethodExitEvent is received for method foo, counter = 3
      flag == 3
      MethodExitEvent is received for method foo, counter = 4
      flag == 3
      MethodExitEvent is received for method foo, counter = 5
      flag == 3
      MethodExitEvent is received for method foo, counter = 6
      flag == 3
      MethodExitEvent is received for method foo, counter = 7
      flag == 3
      MethodExitEvent is received for method foo, counter = 8
      flag == 3
      MethodExitEvent is received for method foo, counter = 9
      flag == 3
      MethodExitEvent is received for method foo, counter = 10
      flag == 3
      BreakpointEvent received for location 73
      Disabling MethodExitRequest at breakpoint after invoking method

      Waiting for all expected events received
      eventHandler completed

      Sending command: quit
      Finally cleaning event queue
      Waiting for debuggee terminating
      Debuggee PASSED with exit code: 95
      TEST PASSED
      Java exit code = 95
      -------------------------------------------------------------------

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

      Name: elR10090 Date: 08/08/2001



      Eugene I. Latkin <###@###.###>, 2001 Aug 08

      This bug also affects the following testbase_nsk test:

          nsk/regression/b4259923

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

            Unassigned Unassigned
            latkinsunw Latkin Latkin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: