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

JDI method VirtualMachine.resume() intermittently hangs after MethodEntryEvent

XMLWordPrintable

    • tiger
    • generic
    • generic
    • Verified



      Name: ipR10196 Date: 07/24/2003


      --------------------------------------
      Test : nsk/jdi/BScenarios/multithrd/tc02x002
      TestBase : testbase_nsk
      VM : Client, Server
      Mode : -Xint, -Xcomp, -Xmixed
      Platform : Intel x86, sparc, sparcv9
      OS : SunOs 5.8, RedHat Linux 8.0, Windows 2000
      JDK : 1.5.0-b10
      ----------------------------------------

      To reproduce the failure:
        cd /net/sqesvr.sfbay/export/vsn/GammaBase/Bugs/<this bug number>
        sh doit.sh [-g] [-v] $JAVA_HOME [JAVA_OPTS]
      where
          -g - run test with java_g
          -v - run test in verbose mode
      After test hangs, press Ctrl-\ or Ctrl-Break to see threads dump.

      This test checks that the MethodEntryEvents are received for
      "<clinit>" and "<init>" methods of the tested class in debuggee VM.

      The test runs special event handling thread "Thread-1" to get and check
      all received events. This thread hangs on VirtualMachine.resume()
      while resuming debuggee VM after MethodEntryEvent for "<init> method received.
      The main thread also hangs on exit in EventRequest.disable() for
      ClassPrepareRequest. Here is fragment of typical thread dump:

          "Thread-1" prio=5 tid=0x009d6fa0 nid=0x1c8 in Object.wait() [18aef000..18aefd94]
      at java.lang.Object.wait(Native Method)
      - waiting on <0x100326c0> (a com.sun.tools.jdi.Packet)
      at java.lang.Object.wait(Object.java:429)
      at com.sun.tools.jdi.TargetVM.waitForReply(TargetVM.java:269)
      - locked <0x100326c0> (a com.sun.tools.jdi.Packet)
      at com.sun.tools.jdi.VirtualMachineImpl.waitForTargetReply(VirtualMachineImpl.java:886)
      at com.sun.tools.jdi.PacketStream.waitForReply(PacketStream.java:51)
      at com.sun.tools.jdi.JDWP$VirtualMachine$Resume.waitForReply(JDWP.java:609)
      at com.sun.tools.jdi.VirtualMachineImpl.resume(VirtualMachineImpl.java:394)
      at nsk.share.jdi.Debugee.resume(Debugee.java:318)
      at nsk.jdi.BScenarios.multithrd.tc02x002$1.run(tc02x002.java:136)
          <...>
          "main" prio=5 tid=0x00235600 nid=0x4b0 in Object.wait() [6f000..6fc3c]
      at java.lang.Object.wait(Native Method)
      - waiting on <0x10034740> (a com.sun.tools.jdi.Packet)
      at java.lang.Object.wait(Object.java:429)
      at com.sun.tools.jdi.TargetVM.waitForReply(TargetVM.java:269)
      - locked <0x10034740> (a com.sun.tools.jdi.Packet)
      at com.sun.tools.jdi.VirtualMachineImpl.waitForTargetReply(VirtualMachineImpl.java:886)
      at com.sun.tools.jdi.PacketStream.waitForReply(PacketStream.java:51)
      at com.sun.tools.jdi.JDWP$EventRequest$Clear.waitForReply(JDWP.java:5630)
      at com.sun.tools.jdi.JDWP$EventRequest$Clear.process(JDWP.java:5606)
      at com.sun.tools.jdi.EventRequestManagerImpl$EventRequestImpl.clear(EventRequestManagerImpl.java:188)
      - locked <0x10090348> (a com.sun.tools.jdi.EventRequestManagerImpl$ClassPrepareRequestImpl)
      at com.sun.tools.jdi.EventRequestManagerImpl$EventRequestImpl.setEnabled(EventRequestManagerImpl.java:140)
      - locked <0x10090348> (a com.sun.tools.jdi.EventRequestManagerImpl$ClassPrepareRequestImpl)
      at com.sun.tools.jdi.EventRequestManagerImpl$EventRequestImpl.disable(EventRequestManagerImpl.java:131)
      at nsk.jdi.BScenarios.multithrd.tc02x002.execTest(tc02x002.java:171)
      at nsk.jdi.BScenarios.multithrd.tc02x002.run(tc02x002.java:87)
      at nsk.jdi.BScenarios.multithrd.tc02x002.main(tc02x002.java:70)

      This failure is reproduced intermittently, most often on Windows.
      Several other tests are also affected by this bug.

      After test hanged it is not killed by Process.destroy() or pressing Ctrl-C.
      This breaks the whole tests execution under Tonga. Therefore, I'm marking this
      bug with high priority P2.

      Here is full log for running test under Windows:
      ================================================================================
      Running the test...
      binder> VirtualMachineManager: version 1.4
      binder> Finding connector: 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: com.sun.tools.jdi.SharedMemoryTransport@506411
      binder> Connector arguments:
      binder> home=P:\ld24\java\hotspot\jdk1.5\win\jre
      binder> vmexec=java
      binder> options=
      binder> main=nsk.jdi.BScenarios.multithrd.tc02x002a -debugee.vmkind=java "-debugee.vmkeys=" "-waittime=1" "-verbose"
      binder> quote="
      binder> suspend=true
      binder> Launching debugee
      binder> Redirecting VM output
      binder> Waiting for VM initialized
      binder> Initial VMStartEvent received: VMStartEvent in thread main
      Starting handling event
      binder> Received expected signal from debugee: ready

      TEST BEGINS
      ===========
      Waiting for all events received
       event ===>>> ClassPrepareEvent in thread main
      ... resumed
       event ===>>> 1 MethodEntryEvent arrived
      event info:
      thread - main
      source - tc02x002a.java
      method - <clinit>
      line - 76
      MethodEntryEvent occurs on the expected line 76 in method <clinit>

      ... resumed
      debugee.stderr> Thread-1:: creating tc02x002aClass1
       event ===>>> 2 MethodEntryEvent arrived
      event info:
      thread - Thread-1
      source - tc02x002a.java
      method - <init>
      line - 78
      MethodEntryEvent occurs on the expected line 78 in method <init>

      <Ctrl-BREAK>

      Full thread dump Java HotSpot(TM) Client VM (1.5.0-beta-b10 mixed mode):

      "Thread-1" prio=5 tid=0x009d6fa0 nid=0x1c8 in Object.wait() [18aef000..18aefd94]
      at java.lang.Object.wait(Native Method)
      - waiting on <0x100326c0> (a com.sun.tools.jdi.Packet)
      at java.lang.Object.wait(Object.java:429)
      at com.sun.tools.jdi.TargetVM.waitForReply(TargetVM.java:269)
      - locked <0x100326c0> (a com.sun.tools.jdi.Packet)
      at com.sun.tools.jdi.VirtualMachineImpl.waitForTargetReply(VirtualMachineImpl.java:886)
      at com.sun.tools.jdi.PacketStream.waitForReply(PacketStream.java:51)
      at com.sun.tools.jdi.JDWP$VirtualMachine$Resume.waitForReply(JDWP.java:609)
      at com.sun.tools.jdi.VirtualMachineImpl.resume(VirtualMachineImpl.java:394)
      at nsk.share.jdi.Debugee.resume(Debugee.java:318)
      at nsk.jdi.BScenarios.multithrd.tc02x002$1.run(tc02x002.java:136)

      "IORedirector" daemon prio=5 tid=0x009d6e38 nid=0x280 runnable [18aaf000..18aafd94]
      at java.io.FileInputStream.readBytes(Native Method)
      at java.io.FileInputStream.read(FileInputStream.java:194)
      at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:408)
      at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:450)
      at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
      - locked <0x10515ab8> (a java.io.InputStreamReader)
      at java.io.InputStreamReader.read(InputStreamReader.java:167)
      at java.io.BufferedReader.fill(BufferedReader.java:136)
      at java.io.BufferedReader.readLine(BufferedReader.java:299)
      - locked <0x10515ab8> (a java.io.InputStreamReader)
      at java.io.BufferedReader.readLine(BufferedReader.java:362)
      at nsk.share.IORedirector.run(IORedirector.java:96)

      "IORedirector for stderr" daemon prio=5 tid=0x009c2360 nid=0x24c runnable [18a6f000..18a6fd94]
      at java.io.FileInputStream.readBytes(Native Method)
      at java.io.FileInputStream.read(FileInputStream.java:194)
      at java.io.BufferedInputStream.read1(BufferedInputStream.java:220)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
      - locked <0x1050af58> (a java.io.BufferedInputStream)
      at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:408)
      at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:450)
      at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
      - locked <0x1051bbf0> (a java.io.InputStreamReader)
      at java.io.InputStreamReader.read(InputStreamReader.java:167)
      at java.io.BufferedReader.fill(BufferedReader.java:136)
      at java.io.BufferedReader.readLine(BufferedReader.java:299)
      - locked <0x1051bbf0> (a java.io.InputStreamReader)
      at java.io.BufferedReader.readLine(BufferedReader.java:362)
      at nsk.share.IORedirector.run(IORedirector.java:96)

      "JDI Target VM Interface" daemon prio=5 tid=0x009ecaf8 nid=0x45c runnable [18a2f000..18a2fd94]
      at com.sun.tools.jdi.SharedMemoryConnection.receivePacket0(Native Method)
      at com.sun.tools.jdi.SharedMemoryConnection.receivePacket(SharedMemoryConnection.java:60)
      - locked <0x1050af98> (a java.lang.Object)
      at com.sun.tools.jdi.TargetVM.run(TargetVM.java:96)
      at java.lang.Thread.run(Thread.java:534)

      "JDI Internal Event Handler" daemon prio=5 tid=0x009affd8 nid=0x56c in Object.wait() [189ef000..189efd94]
      at java.lang.Object.wait(Native Method)
      - waiting on <0x1051bd08> (a com.sun.tools.jdi.EventQueueImpl)
      at java.lang.Object.wait(Object.java:429)
      at com.sun.tools.jdi.EventQueueImpl.removeUnfiltered(EventQueueImpl.java:162)
      - locked <0x1051bd08> (a com.sun.tools.jdi.EventQueueImpl)
      at com.sun.tools.jdi.EventQueueImpl.removeInternal(EventQueueImpl.java:97)
      at com.sun.tools.jdi.InternalEventHandler.run(InternalEventHandler.java:36)
      at java.lang.Thread.run(Thread.java:534)

      "Low Memory Detector" daemon prio=5 tid=0x0023e9c0 nid=0x564 waiting on condition [0..0]

      "CompilerThread0" daemon prio=5 tid=0x0023d670 nid=0x49c waiting on condition [0..181efa90]

      "Signal Dispatcher" daemon prio=10 tid=0x0095bd08 nid=0x324 waiting on condition [0..0]

      "Finalizer" daemon prio=9 tid=0x009592e0 nid=0x4bc in Object.wait() [1816f000..1816fd94]
      at java.lang.Object.wait(Native Method)
      - waiting on <0x104fb550> (a java.lang.ref.ReferenceQueue$Lock)
      at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
      - locked <0x104fb550> (a java.lang.ref.ReferenceQueue$Lock)
      at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
      at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

      "Reference Handler" daemon prio=10 tid=0x00957e58 nid=0x468 in Object.wait() [1812f000..1812fd94]
      at java.lang.Object.wait(Native Method)
      - waiting on <0x104fb5b8> (a java.lang.ref.Reference$Lock)
      at java.lang.Object.wait(Object.java:429)
      at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:115)
      - locked <0x104fb5b8> (a java.lang.ref.Reference$Lock)

      "main" prio=5 tid=0x00235600 nid=0x4b0 in Object.wait() [6f000..6fc3c]
      at java.lang.Object.wait(Native Method)
      - waiting on <0x10034740> (a com.sun.tools.jdi.Packet)
      at java.lang.Object.wait(Object.java:429)
      at com.sun.tools.jdi.TargetVM.waitForReply(TargetVM.java:269)
      - locked <0x10034740> (a com.sun.tools.jdi.Packet)
      at com.sun.tools.jdi.VirtualMachineImpl.waitForTargetReply(VirtualMachineImpl.java:886)
      at com.sun.tools.jdi.PacketStream.waitForReply(PacketStream.java:51)
      at com.sun.tools.jdi.JDWP$EventRequest$Clear.waitForReply(JDWP.java:5630)
      at com.sun.tools.jdi.JDWP$EventRequest$Clear.process(JDWP.java:5606)
      at com.sun.tools.jdi.EventRequestManagerImpl$EventRequestImpl.clear(EventRequestManagerImpl.java:188)
      - locked <0x10090348> (a com.sun.tools.jdi.EventRequestManagerImpl$ClassPrepareRequestImpl)
      at com.sun.tools.jdi.EventRequestManagerImpl$EventRequestImpl.setEnabled(EventRequestManagerImpl.java:140)
      - locked <0x10090348> (a com.sun.tools.jdi.EventRequestManagerImpl$ClassPrepareRequestImpl)
      at com.sun.tools.jdi.EventRequestManagerImpl$EventRequestImpl.disable(EventRequestManagerImpl.java:131)
      at nsk.jdi.BScenarios.multithrd.tc02x002.execTest(tc02x002.java:171)
      at nsk.jdi.BScenarios.multithrd.tc02x002.run(tc02x002.java:87)
      at nsk.jdi.BScenarios.multithrd.tc02x002.main(tc02x002.java:70)

      "VM Thread" prio=5 tid=0x00997a90 nid=0x458 runnable

      "VM Periodic Task Thread" prio=10 tid=0x0023fb68 nid=0x550 waiting on condition
      ================================================================================

      Ivan Popov <###@###.###>

      ======================================================================
      ###@###.### 2003-07-24
      The following tests are affected by this bug:
        nsk/jdi/BScenarios/multithrd/tc02x003
        nsk/jdi/BScenarios/multithrd/tc04x001

            jjh James Holmlund (Inactive)
            popovsunw Popov Popov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: