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

Too many ExceptionEvents are generated for one exception

XMLWordPrintable

    • rc1
    • generic
    • generic
    • Verified



      Name: elR10090 Date: 10/16/2001


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

      Following tests

          nsk/jdi/ExceptionEvent/catchLocation/location001
          nsk/jdi/ExceptionEvent/catchLocation/location002
          nsk/jdi/ExceptionEvent/exception/exception001

      failed to pass against Merlin since build b81 on all platforms.
      For build b80 and earlier all these tests pass successfully.

      These tests check that ExceptionEvent is received by debugger for
      each kind of exceptions thrown into debuggee including user defined
      and system exceptions.

      Before the build b81 all this tests passed because each expected event
      was received only once. Since build b81 too many exception events
      are generated by debuggee for a StackOverflowError exception.
      It takes too long time for the test to handle all these events
      and the tests get timed out.

      I slightly modified one of the tests to count how many times event is
      received for each kind of the tested exceptions. Here are the results
      (on Solaris/Sparc):

        user defined exceptions:
          nsk.jdi.ExceptionEvent.catchLocation.location001aException received 1 times
          nsk.jdi.ExceptionEvent.catchLocation.location001aError received 1 times
          nsk.jdi.ExceptionEvent.catchLocation.location001aThrowable received 1 times
        system exceptions:
          java.lang.NumberFormatException received 3 times
          java.lang.StackOverflowError received 4046 times

      This shows that events for system exceptions are received multiply times,
      especially for StackOverflowError which was thrown by a deep recursion.
      Number of events for StackOverflowError exception varies on different
      tlatforms:

          Solaris/Sparc: ~4000
          Solaris/x86: ~6000
          Linux-i386: ~50000
          Windows: ~6000

      It seems that event for an exception is received each time when
      debuggee returns from a (recursive) call of a method by the exception.
      For a deep recursion we get such a big number of ExceptionEvents.

      Below is log of the test location001 on Solaris/Sparc:

      ------------------------------------------------------------

      <...>
      Getting loaded classes in debuggee
      Getting reference to main thread
      Creating ExceptionRequest
      Cleaning event queue
      Starting eventHandler
      Enabling ExceptionRequest
      Sending command: go
      Waiting for command: done

      ExceptionEvent for nsk.jdi.ExceptionEvent.catchLocation.location001aException is
      received: 1
      debugee.stderr> location001aException is thrown
      ExceptionEvent for nsk.jdi.ExceptionEvent.catchLocation.location001aError is
      received: 1
      debugee.stderr> location001aError is thrown
      ExceptionEvent for nsk.jdi.ExceptionEvent.catchLocation.location001aThrowable is
      received: 1
      debugee.stderr> location001aThrowable is thrown
      ExceptionEvent for java.lang.NumberFormatException is received: 1
      ExceptionEvent for java.lang.NumberFormatException is received: 2
      ExceptionEvent for java.lang.NumberFormatException is received: 3
      debugee.stderr> NumberFormatException is thrown
      ExceptionEvent for java.lang.StackOverflowError is received: 1
      ExceptionEvent for java.lang.StackOverflowError is received: 2
      ExceptionEvent for java.lang.StackOverflowError is received: 3
      ExceptionEvent for java.lang.StackOverflowError is received: 4
      ExceptionEvent for java.lang.StackOverflowError is received: 5
      <...>
      ExceptionEvent for java.lang.StackOverflowError is received: 4040
      ExceptionEvent for java.lang.StackOverflowError is received: 4041
      ExceptionEvent for java.lang.StackOverflowError is received: 4042
      ExceptionEvent for java.lang.StackOverflowError is received: 4043
      ExceptionEvent for java.lang.StackOverflowError is received: 4044
      ExceptionEvent for java.lang.StackOverflowError is received: 4045
      ExceptionEvent for java.lang.StackOverflowError is received: 4046
      debugee.stderr> StackOverflowError is thrown

      Waiting for all expected events received
      eventHandler completed

      Expected nsk.jdi.ExceptionEvent.catchLocation.location001aException received
      once
      Expected nsk.jdi.ExceptionEvent.catchLocation.location001aError received once
      Expected nsk.jdi.ExceptionEvent.catchLocation.location001aThrowable received
      once

      FAILURE 16: Too many times java.lang.NumberFormatException received: 3
      FAILURE 18: Too many times java.lang.StackOverflowError received: 4046

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

      ------------------------------------------------------------

      These tests belongs to testbase_nsk located here:

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

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

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

      Use:
          sh doit.sh $JAVA_HOME
      Where:
          $JAVA_HOME: points to JDK-1.4 (b83)

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

      Name: dkR10014 Date: 10/25/2001


      ======================================================================
        ###@###.### 10.26.2001
        
        This bug affects the following testbase_nsk tests:
        
        nsk/jdb/caught_exception/caught_exception001
        nsk/jdb/uncaught_exception/uncaught_exception001



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

      Name: elR10090 Date: 11/05/2001


      This bug also affects the following testbase_nsk tests:

          nsk/jvmdi/events/exception001
          nsk/jvmdi/events/excatch001

      The tests will be available in the next release v14r09 this week.

      Pavel N. Vysotski, ###@###.###


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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: