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

nsk/jdi/Scenarios/invokeMethod/redefineclasses001 fails: static field value was not changed

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux

      Description

      Problem Description : nsk/jdi/Scenarios/invokeMethod/redefineclasses001 fails because static field value was not changed
                               as it was supposed to be done after class redefenition.

      Java Release : 6u10-b09 (didn't ry with other builds), jdk7-b24 (didn't ry with other builds)
      VM flavors : client | server
      VM Modes : -Xmixed | -Xcomp | -Xbatch
      Java flags :
      Platform(s) : linux-i586 (didn't try on other platforms)
      Hostnames with OS info : vm-v20z-21.sfbay (Red Hat Enterprise Linux Server release 5)

      Suite Name : nsk.jdi
      Test cases : nsk/jdi/Scenarios/invokeMethod/redefineclasses001


      This test is based on a scenario which consists of the following steps:
         1. Invoking debuggee's static method by ClassType.invokeMethod().
         2. Redefinition of this method (using new version of the class)
         3. Invoking the one again.
         4. Redefinition of this method (using old/original version of the class)
      The test checks a value of static field to be equal to new value.
      When the field has unexpected value, the test fails.

      This scenarios is actually repeated 2 times (=> 2 test cases in the test):
      1. "0-case"
         during first time (debuggee is stopped at line 32)
         there is no active stack frame of the method runIt of class redefineclasses001b
         (the class which is redefined)

      2. "1-case"
         during second time (debuggee is stopped at line 40)
         there is active stack frame of the method runIt of class redefineclasses001b.

      The test fails sometimes (for me it was reproduced every ~10 times) during the second case.
      I was able to reproduce the failure with recent
      6u10-b09 (HS_11) and jdk7-b24, with -client/-server and
      -Xmixed, -Xcomp, -Xbatch modes.

      Here is the error log:
      TEST BEGINS
      ===========

      event ===>>> ClassPrepareEvent in thread main

      preparing the next testcase...
      debugeeClass :nsk.jdi.Scenarios.invokeMethod.redefineclasses001a
      line number: 32
      setting breakpoint...
      binder> Breakpoint set:
      breakpoint request nsk.jdi.Scenarios.invokeMethod.redefineclasses001a:32 (disabled)

      event ===>>> ###@###.###fineclasses001a:32 in thread main


      ==================
      0-case

      invoking method :"runIt"
      -------------------------------
      debugee.stdout> runIt::notified...
      checking flag's value
      The field has expected value: BEFORE_REDEFINITION(1)

      redefining...
      class-file :newclass/nsk/jdi/Scenarios/invokeMethod/redefineclasses001b.class

      invoking method :"runIt"
      -------------------------------
      debugee.stdout> runIt::notified...
      checking flag's value
      The field has expected value: AFTER_REDEFINITION(2)

      returning the previous state...
      class-file :classes/nsk/jdi/Scenarios/invokeMethod/redefineclasses001b.class

      preparing the next testcase...
      debugeeClass :nsk.jdi.Scenarios.invokeMethod.redefineclasses001a
      line number: 40
      setting breakpoint...
      binder> Breakpoint set:
      breakpoint request nsk.jdi.Scenarios.invokeMethod.redefineclasses001a:40 (disabled)

      event ===>>> ###@###.###fineclasses001a:40 in thread main


      ==================
      1-case

      invoking method :"runIt"
      -------------------------------
      debugee.stdout> runIt::notified...
      checking flag's value
      The field has expected value: BEFORE_REDEFINITION(1)

      redefining...
      class-file :newclass/nsk/jdi/Scenarios/invokeMethod/redefineclasses001b.class

      invoking method :"runIt"
      -------------------------------
      debugee.stdout> runIt::notified...
      checking flag's value
      # ERROR: The field has value: BEFORE_REDEFINITION(1)
      # ERROR: but it is expected: AFTER_REDEFINITION(2)

      returning the previous state...
      class-file :classes/nsk/jdi/Scenarios/invokeMethod/redefineclasses001b.class
      debugee.stdout> runIt::notified...
      =============
      TEST FINISHES

      Test finished. exitStatus = 2


      #>
      #> SUMMARY: Following errors occured
      #> during test execution:
      #>
      # ERROR: The field has value: BEFORE_REDEFINITION(1)
      # ERROR: but it is expected: AFTER_REDEFINITION(2)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dsamersoff Dmitriy Samersoff
              Reporter:
              epavlova Ekaterina Pavlova
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: