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

LIN64: wrong JDWP packets format on Itanium platform

XMLWordPrintable

    • rc
    • itanium
    • linux_redhat_7.2
    • Verified



      Name: ipR10196 Date: 05/17/2002


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

      The following JDWP test of testbase_nsk

          nsk/jdwp/Event/VM_START/vmstart001
          
      failed on Linux-ia64 Itanium platform with the promouted
      Hopper-b11 build as well as with the latest b12 weekly build.

      This test checks format of VM_START event received from
      JDWP transport channel. This test revealed, that received event
      packet has wrong format:

          Packet header (11 bytes):
              0000 (length) : 0x0000001d (29)
              0004 (id) : 0x00000000 (0)
              0008 (flags) : 0x00 (0)
              0009 (cmd set): 0x40 (64)
              000a (command): 0x64 (100)
              000b (policy): 0x02 (2)
              000c (events): 0x01000000 (16777216)
              0010 (kind): 0x5a (90)
          Entire packet (29 bytes):
              0000: 00 00 00 1d 00 00 00 00 00 40 64 02 01 00 00 00 .........@d.....
              0010: 5a 00 00 00 00 01 00 00 00 00 00 00 00 Z............
          Packet end
          Checking header of event packet
      ... packet header is OK
          Parsing event packet:
              suspendPolicy: 2
              events: 16777216
          # ERROR: Invalid number of events in tested event packet: 16777216 (expected: 1)
      event #0:
                eventKind: 90
      requestID: 0
                threadID: 72057594037927936
      event #1:
          # ERROR: Unable to get eventKind of event #1 from tested event packet:
          # ERROR: Unable to get one byte at 0x001d: no bytes available

      Since this event is the first event received from JDWP channel,
      all JDWP tests failed receiving this event in the test begin.
      So, this is blocking bag for all JDWP tests.

      Other JDWP events may also have wrong format of the event packet.
      Many JDI tests failed due to exceptions in parsing JDWP packets,
      e.g., the following JDI test:

          .../jdi/VirtualMachine/version/version001

      failed in parsing reply packet for JVM version request:

      Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1442840576
      at java.lang.String.checkBounds(String.java:288)
      at java.lang.String.<init>(String.java:326)
      at com.sun.tools.jdi.PacketStream.readString(PacketStream.java:366)
      at com.sun.tools.jdi.JDWP$VirtualMachine$Version.<init>(JDWP.java:74)
      at com.sun.tools.jdi.JDWP$VirtualMachine$Version.waitForReply(JDWP.java:41)
      at com.sun.tools.jdi.JDWP$VirtualMachine$Version.process(JDWP.java:26)
      at com.sun.tools.jdi.VirtualMachineImpl.versionInfo(VirtualMachineImpl.java:522)
      at com.sun.tools.jdi.VirtualMachineImpl.version(VirtualMachineImpl.java:541)
      at nsk.jdi.VirtualMachine.version.version001.runThis(version001.java:147)
      at nsk.jdi.VirtualMachine.version.version001.run(version001.java:48)
      at nsk.jdi.VirtualMachine.version.version001.main(version001.java:43)

      So, this bug also blocks execution of all JDI and JDB tests of testbase_nsk.

      On Windows-ia64 other JPDA bugs block execution of JDI/JDWP/JDB tests,
      so it is not possible to see, if JDWP packet have wrong format
      on this Itanium platform too (see bugs 4686901, 4686831, 4686916).

      To reproduce the failure use 'doit.sh' script in the directory:

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

      use:
        sh doit.sh $JAVA_HOME

      where $JAVA_HOME should point to JDK for Linux-ia64 platform

      Following is the test log:
      --------------------------------------------------------
      Compiling support classes...

      Compiling test classes...

      Requesting JVM version...
      java version "1.4.1-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b11)
      Java HotSpot(TM) 64-Bit Core VM (build 1.4.1-beta-b11, interpreted mode)

      Running the test...

      >>> Starting debugee

      Launching debugee
      Debugee> Starting java process:
      /.automount/koori.sfbay/root/p/v06/jdk/1.4.1/beta/b11/binaries/linux-ia64/jre/bin/java "-Xdebug"
      "-Xrunjdwp:server=y,transport=dt_socket,address=8000" "nsk.jdwp.Event.VM_START.vmstart001a" "-debugee.vmkind=java"
      "-debugee.vmkeys=" "-verbose"
      Debugee> Establishing JDWP socket connection
      Debugee> Attaching to debugee: localhost:8000
      transport> Attempt #0 to establish JDWP socket connection failed:
      java.net.ConnectException: Connection refused
      transport> JDWP socket connection established
        ... debugee launched

      Setting timeout for debuggee responces: 2 minute(s)
        ... timeout set

      >>> Testing JDWP event

      Waiting for event packet
        ... event packet received:
      Packet header (11 bytes):
          0000 (length) : 0x0000001d (29)
          0004 (id) : 0x00000000 (0)
          0008 (flags) : 0x00 (0)
          0009 (cmd set): 0x40 (64)
          000a (command): 0x64 (100)
          000b (policy): 0x02 (2)
          000c (events): 0x01000000 (16777216)
          0010 (kind): 0x5a (90)
      Entire packet (29 bytes):
          0000: 00 00 00 1d 00 00 00 00 00 40 64 02 01 00 00 00 .........@d.....
          0010: 5a 00 00 00 00 01 00 00 00 00 00 00 00 Z............
      Packet end
      Checking header of event packet
        ... packet header is OK
      Parsing event packet:
          suspendPolicy: 2
          events: 16777216
      # ERROR: Invalid number of events in tested event packet: 16777216 (expected: 1)
          event #0:
            eventKind: 90
            requestID: 0
            threadID: 72057594037927936
          event #1:
      # ERROR: Unable to get eventKind of event #1 from tested event packet:
      # ERROR: Unable to get one byte at 0x001d: no bytes available

      >>> Finishing debuggee

      Resuming debuggee
        ... debuggee resumed
      Waiting for VM_DEATH event
      debugee.stderr> Debugee PASSED
      # ERROR: Debugee> Wrong header of event packet for expected VirtualMachine.VM_DEATH event:
      # ERROR: Not a single event in the event packet: 16777216 events
      Debugee> Event packet:
      Packet header (11 bytes):
          0000 (length) : 0x00000015 (21)
          0004 (id) : 0x00000001 (1)
          0008 (flags) : 0x00 (0)
          0009 (cmd set): 0x40 (64)
          000a (command): 0x64 (100)
          000b (policy): 0x00 (0)
          000c (events): 0x01000000 (16777216)
          0010 (kind): 0x63 (99)
      Entire packet (21 bytes):
          0000: 00 00 00 15 00 00 00 01 00 40 64 00 01 00 00 00 .........@d.....
          0010: 63 00 00 00 00 c....
      Packet end
      # ERROR: TEST FAILED: Wrong event packet received for expected event: VirtualMachine.VM_DEATH

      >>> Finishing test

      Disconnecting debuggee
      java.io.IOException: JDWP socket connection closed by remote host
      at nsk.share.jdwp.SocketTransport.read(SocketTransport.java:157)
      at nsk.share.jdwp.Packet.readFrom(Packet.java:411)
      at nsk.share.jdwp.Transport.read(Transport.java:64)
      at nsk.share.jdwp.Debugee.receiveReply(Debugee.java:587)
      at nsk.share.jdwp.Debugee.receiveReplyFor(Debugee.java:652)
      at nsk.share.jdwp.Debugee.dispose(Debugee.java:545)
      at nsk.jdwp.Event.VM_START.vmstart001.quitDebugee(vmstart001.java:311)
      at nsk.jdwp.Event.VM_START.vmstart001.runIt(vmstart001.java:130)
      at nsk.jdwp.Event.VM_START.vmstart001.run(vmstart001.java:69)
      at nsk.jdwp.Event.VM_START.vmstart001.main(vmstart001.java:62)
      Failed to finally disconnect debuggee:
      Cought IOException while receiving reply packet:
      java.io.IOException: JDWP socket connection closed by remote host
      Waiting for debuggee exit
        ... debuggee exited with exit code: 95
      # ERROR: TEST FAILED


      #>
      #> SUMMARY: Following errors occured
      #> during test execution:
      #>
      # ERROR: Invalid number of events in tested event packet: 16777216 (expected: 1)
      # ERROR: Unable to get eventKind of event #1 from tested event packet:
      # ERROR: Unable to get one byte at 0x001d: no bytes available
      # ERROR: Debugee> Wrong header of event packet for expected VirtualMachine.VM_DEATH event:
      # ERROR: Not a single event in the event packet: 16777216 events
      # ERROR: TEST FAILED: Wrong event packet received for expected event: VirtualMachine.VM_DEATH
      # ERROR: TEST FAILED
      Java exit code = 97
      --------------------------------------------------------

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

            bobv Bob Vandette (Inactive)
            popovsunw Popov Popov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: