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

"InternalError: Location with invalid code index" is intermittently thrown

    Details

    • Subcomponent:
    • CPU:
      generic, x86, sparc
    • OS:
      generic, other, solaris_7, solaris_10, windows_xp

      Description



      Name: vpR10197 Date: 09/23/2002


      ------------------------------------------------------------------------------
      Test : nsk/jdi/BScenarios/multithrd/tc04x001
      Test Base : testbase_nsk
      VM : ServerVM, ClientVM
      Mode : comp, int, mixed
      Platform (s) : solx86, linux, solsparc, win
      OS : 5.8, RH7.2, NT/2000
      JDK : 1.4.2-b02
      ------------------------------------------------------------------------------
      The test performs next steps:
      - debugger creates MethodEntryRequest on specified class
      - debugee starts three threads that call a method of the specified class
      - after getting MethodEntryEvent, debugger checks location of this event.
      InternalError exception may be thrown, while debugger is trying to get
      a location of the arrived MethodEntryEvent.

      The test is reproduced on Windows more frequently. But the failures may
      be observed on other platforms too.

      The test will be available in testbase_nsk.v142r17

      doit.sh script executes the test $ITR_NUM times or until it fails.

      Steps to reproduce
      ==================
      1. cd /net/sqesvr.sfbay/export/vsn/GammaBase/Bugs/<BugID>
      2. sh doit.sh $JAVA_HOME [$ITR_NUM]
              where $ITR_NUM - number of iterations to execute the test,
                               default value is 10

      An example of the test's output:

      TEST BEGINS
      ===========
       event ===>>> VMStartEvent in thread main
      MethodEntryRequest created, expecting events from method "foo"
      --------------------------------------------------------
       event ===>>> MethodEntryEvent arrived
      event info:
              thread - main
              source - tc04x001a.java
              method - main
              line - 24
      the event skipped, method - main

       event ===>>> MethodEntryEvent arrived
      event info:
              thread - main
              source - tc04x001a.java
              method - <init>
              line - 46
      the event skipped, method - <init>

       event ===>>> MethodEntryEvent arrived
      event info:
              thread - Thread-1
              source - tc04x001a.java
              method - foo
              line - 54
      !!!MethodBreakpoint stops on the expected line 54 in method "foo"!!!

       event ===>>> MethodEntryEvent arrived
      event info:
              thread - Thread-3
              source - tc04x001a.java
              method - foo
              line - 54
      !!!MethodBreakpoint stops on the expected line 54 in method "foo"!!!

       event ===>>> MethodEntryEvent arrived
      event info:
              thread - Thread-2
      java.lang.InternalError: Location with invalid code index
              at
      com.sun.tools.jdi.ConcreteMethodImpl.codeIndexToLineInfo(ConcreteMethodImpl.java
      :163)
              at com.sun.tools.jdi.LocationImpl.getBaseLineInfo(LocationImpl.java:108)
              at com.sun.tools.jdi.LocationImpl.getLineInfo(LocationImpl.java:122)
              at com.sun.tools.jdi.LocationImpl.sourceName(LocationImpl.java:173)
              at com.sun.tools.jdi.LocationImpl.sourceName(LocationImpl.java:168)
              at com.sun.tools.jdi.LocationImpl.sourceName(LocationImpl.java:163)
              at
      nsk.jdi.BScenarios.multithrd.tc04x001.hitMethodBreakpoint(tc04x001.java:186)
              at nsk.jdi.BScenarios.multithrd.tc04x001.execTest(tc04x001.java:149)
              at nsk.jdi.BScenarios.multithrd.tc04x001.run(tc04x001.java:86)
              at nsk.jdi.BScenarios.multithrd.tc04x001.main(tc04x001.java:66)
      Test finished. exitStatus = 2
      debugee> Debuggee VM finally forced to exit
      exit code = 97

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

      Name: vpR10197 Date: 09/24/2002


      Also the above test sometimes fails due to debugger do not
      get some expected MethodEntryEvent's.

      In this case test's output looks like:

      TEST BEGINS
      ===========
       event ===>>> VMStartEvent in thread main
      MethodEntryRequest created, expecting events from method "foo"
      --------------------------------------------------------
       event ===>>> MethodEntryEvent arrived
      event info:
              thread - main
              source - tc04x001a.java
              method - main
              line - 24
      the event skipped, method - main

       event ===>>> MethodEntryEvent arrived
      event info:
              thread - main
              source - tc04x001a.java
              method - <init>
              line - 46
      the event skipped, method - <init>

       event ===>>> VMDisconnectEvent
      # ERROR: debugger FAILURE> expecting 3 MethodBreakpoint events, but 0 events arrived.
      =============
      TEST FINISHES

      Test finished. exitStatus = 2


      #>
      #> SUMMARY: Following errors occured
      #> during test execution:
      #>
      # ERROR: debugger FAILURE> expecting 3 MethodBreakpoint events, but 0 events arrived.
      exit code = 97


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

      Name: vpR10197 Date: 09/25/2002


      This bug also affects the following tests from testbase_nsk:

      nsk/jdi/BScenarios/multithrd/tc02x001
      nsk/jdi/BScenarios/multithrd/tc02x004

      The tests will be available in the next release v142r17.

      Vitali Provodine <###@###.###>


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

      Name: ipR10196 Date: 11/11/2002


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

      This bug affects also the following test:

          nsk/jdi/BScenarios/multithrd/tc02x003

      This test is available in r17 release of testbase_nsk.

      ======================================================================
      This bug also affects
          nsk/jdi/BScenarios/multithread/tc02x002
      (See duplicate bug 4775042)
      ###@###.### 2002-11-23

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                vitpsunw Vitp Vitp (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: