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

com/sun/jdi/RedefineAddPrivateMethod.sh fails intermittently

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b110
    • CPU:
      x86_64
    • OS:
      solaris_11

      Backports

        Description

        In the 2016-03-01 JDK9-hs-rt nightly, the following test failed:

            com/sun/jdi/RedefineAddPrivateMethod.sh

        Here is a snippet of the .jtr file:

        #section:shell
        ----------messages:(3/144)----------
        command: shell RedefineAddPrivateMethod.sh
        reason: User specified action: run shell RedefineAddPrivateMethod.sh
        elapsed time (seconds): 11.174
        ----------System.out:(26/1641)----------
        --Compiling first version of /export/local/aurora/sandbox/results/workDir/classes/0/com/sun/jdi/aa7184/shtest.java with options: -g
        compiling shtest.java

        --Compiling second version of /export/local/aurora/sandbox/results/workDir/classes/0/com/sun/jdi/aa7184/shtest.java with -g

        --Starting jdb, address=
        Listening at address: sca00csv.us.oracle.com:37763
        --Starting debuggee with args from TESTVMOPTS and/or TESTJAVAOPTS: -Xmixed -server -XX:MaxRAMFraction=8 -XX:+CreateCoredumpOnCrash -XX:ReservedCodeCacheSize=256M -XX:NativeMemoryTracking=detail
        Cmd: /export/local/aurora/CommonData/TEST_JAVA_HOME/bin/java -classpath /export/local/aurora/sandbox/results/workDir/classes/0/com/sun/jdi/aa7184 -DHANGINGJAVA-7184_DEB -Xmixed -server -XX:MaxRAMFraction=8 -XX:+CreateCoredumpOnCrash -XX:ReservedCodeCacheSize=256M -XX:NativeMemoryTracking=detail -Djtreg.classDir=/export/local/aurora/sandbox/results/workDir/classes/0/com/sun/jdi/aa7184 -showversion -agentlib:jdwp=transport=dt_socket,address=37763,server=n,suspend=y shtest
        Set uncaught java.lang.Throwable
        Set deferred uncaught java.lang.Throwable
        Initializing jdb ...

        VM Started: > No frames on the current call stack

        main[1] Deferring breakpoint shtest:3.
        It will be set after the class is loaded.
        main[1] > Unable to set deferred breakpoint shtest:3 : No code at line 3 in shtest

        Stopping due to deferred breakpoint errors.
        "thread=main", java.lang.Class.getDeclaredMethods0(), line=-1 bci=-1

        main[1] main[1] Unable to set breakpoint shtest:3 : No code at line 3 in shtest
        main[1] >
        The application exited
        Input stream closed.
        ----------System.err:(17/842)----------
        ShellScaffold.sh: Version
        --Sending cmd: stop at shtest:3
        --Sending cmd: run
        java version "9-internal"
        Java(TM) SE Runtime Environment (fastdebug build 9-internal+0-2016-03-02-004742.mgronlun.upstream)
        Java HotSpot(TM) 64-Bit Server VM (fastdebug build 9-internal+0-2016-03-02-004742.mgronlun.upstream, mixed mode)

        --Sending cmd: redefine shtest /export/local/aurora/sandbox/results/workDir/classes/0/com/sun/jdi/aa7184/vers2/shtest.class
        --Sending cmd: stop at shtest:3
        --Sending cmd: cont
        --JDB finished: The application exited
        --Finish without sending "quit" command to JDB
        -rw-r--r-- 1 root root 52 Mar 2 04:56 /export/local/aurora/sandbox/results/workDir/classes/0/com/sun/jdi/aa7184/testFailed
        <cleanup:_begin_failFile_contents>
         
        --Fail: main: jdb input stream closed prematurely
        <cleanup:_end_failFile_contents>

        Based on the output above:

        main[1] > Unable to set deferred breakpoint shtest:3 : No code at line 3 in shtest

        it looks like the redefined class was not compiled with the '-g' option.

        Update: however the test output says that the classes were compiled with '-g':

        --Compiling first version of /export/local/aurora/sandbox/results/workDir/classes/0/com/sun/jdi/aa7184/shtest.java with options: -g
        compiling shtest.java

        --Compiling second version of /export/local/aurora/sandbox/results/workDir/classes/0/com/sun/jdi/aa7184/shtest.java with -g


        This test was recently added by JDK-8149743.

          Issue Links

            Activity

            Hide
            dcubed Daniel Daugherty added a comment -
            Since this appears to be an intermittent failure, I'm not tagging it
            with 'integration_blocker'. Let's see what Andreas says...
            Show
            dcubed Daniel Daugherty added a comment - Since this appears to be an intermittent failure, I'm not tagging it with 'integration_blocker'. Let's see what Andreas says...
            Hide
            dcubed Daniel Daugherty added a comment -
            Andreas, this one is strange. Can you take a look?
            Show
            dcubed Daniel Daugherty added a comment - Andreas, this one is strange. Can you take a look?
            Hide
            aeriksso Andreas Eriksson (Inactive) added a comment -
            Only intermittently?
            Are there any obvious patterns to the failures, a specific platform or something?
            Show
            aeriksso Andreas Eriksson (Inactive) added a comment - Only intermittently? Are there any obvious patterns to the failures, a specific platform or something?
            Hide
            aeriksso Andreas Eriksson (Inactive) added a comment -
            I'm guessing it could be fixed by doing the change below but I'm not sure how to verify that, since I don't know why it would fail intermittently like this.
            Never saw any problems when testing through jprt/rbt.

            diff --git a/test/com/sun/jdi/RedefineAddPrivateMethod.sh b/test/com/sun/jdi/RedefineAddPrivateMethod.sh
            --- a/test/com/sun/jdi/RedefineAddPrivateMethod.sh
            +++ b/test/com/sun/jdi/RedefineAddPrivateMethod.sh
            @@ -35,7 +35,7 @@
                 cat <<EOF > $1.java.1
             public class $1 {
                 static public void main(String[] args) {
            - // @1 breakpoint @2 breakpoint
            + return; // @1 breakpoint @2 breakpoint
                 }
             
                 // @1 uncomment private static void test() {}
            Show
            aeriksso Andreas Eriksson (Inactive) added a comment - I'm guessing it could be fixed by doing the change below but I'm not sure how to verify that, since I don't know why it would fail intermittently like this. Never saw any problems when testing through jprt/rbt. diff --git a/test/com/sun/jdi/RedefineAddPrivateMethod.sh b/test/com/sun/jdi/RedefineAddPrivateMethod.sh --- a/test/com/sun/jdi/RedefineAddPrivateMethod.sh +++ b/test/com/sun/jdi/RedefineAddPrivateMethod.sh @@ -35,7 +35,7 @@      cat <<EOF > $1.java.1  public class $1 {      static public void main(String[] args) { - // @1 breakpoint @2 breakpoint + return; // @1 breakpoint @2 breakpoint      }        // @1 uncomment private static void test() {}
            Hide
            aeriksso Andreas Eriksson (Inactive) added a comment -
            Managed to reproduce it and have a fix.
            Show
            aeriksso Andreas Eriksson (Inactive) added a comment - Managed to reproduce it and have a fix.
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/hs-rt/jdk/rev/7e330efd38d6
            User: aeriksso
            Date: 2016-03-03 18:13:47 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/hs-rt/jdk/rev/7e330efd38d6 User: aeriksso Date: 2016-03-03 18:13:47 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/7e330efd38d6
            User: lana
            Date: 2016-03-14 15:55:07 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/7e330efd38d6 User: lana Date: 2016-03-14 15:55:07 +0000

              People

              • Assignee:
                aeriksso Andreas Eriksson (Inactive)
                Reporter:
                dcubed Daniel Daugherty
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: