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

JDI spec: requirement of reading all events for a target VM must be specified

XMLWordPrintable

    • beta2
    • generic
    • generic
    • Verified



      Name: egR10015 Date: 03/26/2001



      The JDI specs 1.3 and 1.4 must specify the requirement of mandatory reading
      by a debugger all generated events for a target(debuggee) VM if these events
      are enabled. Because if event generation is enabled and there is any generated
      event which has not been read by the debugger, it causes the debugged VM to hang.
      This unexpected behavior, led up to the debugged VM and the debugger VM
      hangups, must be documented.

      The following example illustates all mentioned above.
      The test consists of debugger part (the file clsprepreq001.java) and debuggee
      part (the file clsprepreq001t.java). The debugger does not process incoming
      events for the debugged VM. When notification of ClassPrepare events is enabled
      by calling the inherited method com.sun.jdi.request.ClassPrepareRequest.enable(),
      the debugged VM hangs because System.exit(), invoked by it, does not really
      terminate VM.
      Note that this hangup is observed only if the debugged VM has been launched by
      the default com.sun.jdi.connector.LaunchingConnector both with HS 1.4.0-beta-b56
      and with HS 1.3.1-rc1-b19 on all platforms in all VM's modes.

      To reproduce the bug run
      doit.ksh <jdk root directory>
      in
      /net/sqesvr.eng/export/vsn/GammaBase/Bugs/<this bug number>

      --------------- output on Solaris/Sparc with HS 1.4.0-beta-b56 ----------------
      $ ./doit.ksh /home/eug/hotspot/jdk1.4/solsparc
      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b56)
      Java HotSpot(TM) Client VM (build 1.4-beta-B56, mixed mode)
      Binder> Listening for a pipe connection to port: 7000
      Binder> Binding to pipe socket
      Binder> Listening to pipe server socket
      Binder> VirtualMachineManager: version 1.4
      Binder> LaunchingConnector:
      Binder> name: com.sun.jdi.CommandLineLaunch
      Binder> description: Launches target using Sun Java VM command line and atta
                    ches to it
      Binder> transport: dt_socket
      Binder> Connector arguments:
      Binder> home=/export/ld54/java/dest/jdk1.4.0beta-b56/solsparc
      Binder> vmexec=java
      Binder> options= -classpath ".:share/classes:/home/eug/hotspot/jdk1.4/solspa
                    rc/lib/tools.jar"
      Binder> main=clsprepreq001t "-verbose" "-waittime=2"
      Binder> quote="
      Binder> suspend=true
      test.pipe> Waiting for pipe connection
      debugee.err> debugee.pipe> Making pipe connection to socket: localhost:7000
      Creating ClassPrepareRequest #0 with the property (first,a quick)...
      Creating ClassPrepareRequest #1 with the property (second,brown)...
      Creating ClassPrepareRequest #2 with the property (third,fox)...
      Creating ClassPrepareRequest #3 with the property (fourth,jumps)...
      Creating ClassPrepareRequest #4 with the property (fifth,over)...
      Creating ClassPrepareRequest #5 with the property (sixth,the lazy)...
      Creating ClassPrepareRequest #6 with the property (seventh,dog)...

      Starting potential timed out section: waiting 2 minute(s) for debuggee's exit...
      # ERROR: TEST FAILED: Timeout occured while waiting for debuggee's exit
      Binder> Closing pipe server socket
      test.pipe> Closing pipe socket
      # ERROR: Debugee VM was not terminated yet. Trying to kill it.
      exit code = 97
      ----------------------------------------------------------------------------

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

            rfield Robert Field (Inactive)
            eugsunw Eug Eug (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: