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

RegTest-test java/nio/channels/Selector/SelectorTest.java fails

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86, sparc
    • OS:
      solaris_8, solaris_9

      Description



      Name: iaR10016 Date: 02/25/2003


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.4.2-b16, b14, etc.
      Testbase : RegTest-test
      Platform[s] : Solaris 8 (sparc), Solaris 9 (sparc), Solaris 8 (x86)
      switch/Mode : -client, -server
      Falling tests: java/nio/channels/Selector/SelectorTest.java

      RegTest-test java/nio/channels/Selector/SelectorTest.java test fails with JDK1.4.2-b16
      on Solaris 8 sparc, Solaris 9 sparc, Solaris 8 x86 one time from three approximatelly.
      The test throws the following exceptions:
      ...
      java.lang.Exception: Server: Timed out
              at TestThread.finish(TestThread.java:44)
              at SelectorTest.main(SelectorTest.java:46)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:324)
              at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
              at java.lang.Thread.run(Thread.java:534)
      java.lang.Exception: Client: Timed out
              at TestThread.finish(TestThread.java:44)
              at SelectorTest.main(SelectorTest.java:46)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:324)
              at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
              at java.lang.Thread.run(Thread.java:534)
      java.lang.Exception: Failure
              at SelectorTest.main(SelectorTest.java:47)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:324)
              at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
              at java.lang.Thread.run(Thread.java:534)
      ...

      I am not able to reproduce the failure on my RedHat Linux and Windows systems.

      Probably this is a threads synchronization problem. The test always passes
      on all platforms if I add "Thread.sleep(1000)" command before line 322 in SelectorTest.java:
      ...
      319> try {
      320> while(connectionsHandled < SelectorTest.NUM_CLIENTS) {

                          Thread.sleep(1000);

      321> int numKeys = selector.select(100);
      322>
      323> // Process channels with data
      324> synchronized (nKeys) {
      ...

      Test source location:
      =====================
      /java/re/jdk/1.4.2/promoted/latest/ws/j2se/test/java/nio/channels/Selector/SelectorTest.java

      jtr file location:
      ==================
      /net/jtgb4u4c.sfbay/export/sail15/results/mantis/b16/regtest/sparc/sol8_sparc-server_smp_linux-1/workDir/test/java/nio/channels/Selector/SelectorTest.jtr

      How to reproduce:
      =================
      Run the following script (you may need to change its variables)

      --- script start ---
      #!/bin/sh

      JT_HOME="/net/linux-15/export/home/java/jct"
      JAVA_HOME="/net/linux-15/export/home/java/jdk1.4.2/linux"
      TEST_BASE_PATH="/net/linux-15/export/home/java/regtest/test"
      WORK_DIR=`pwd`/workDir/test
      REPORT_DIR=`pwd`/reportDir
      export CLASSPATH="$JT_HOME/classes:$JT_HOME/lib/javatest.jar:$JT_HOME/lib/jtreg.jar:$JT_HOME/jemmy/jemmy.jar"

      mkdir -p $WORK_DIR/scratch 2>&1
      mkdir -p $WORK_DIR/jtData 2>&1
      mkdir -p $REPORT_DIR 2>&1

      cd $WORK_DIR/scratch

      $JAVA_HOME/bin/java -DenvVars=TESTJAVAHOME=$JAVA_HOME -Dprogram=jtreg com.sun.javatest.regtest.Main -a -v default -batch -params -w "$WORK_DIR" -r "$REPORT_DIR" -t "$TEST_BASE_PATH" "$TEST_BASE_PATH/java/nio/channels/Selector/SelectorTest.java"
      --- script end ---

      Test output (jtr part):
      =======================
      ----------System.out:(0/0)----------
      ----------System.err:(163/3821)----------
      starting server...
      starting client...
      starting request handler...
      created 40 clients
      writing from 35
      writing from 33
      writing from 22
      writing from 39
      writing from 9
      writing from 18
      writing from 11
      writing from 36
      writing from 12
      writing from 21
      writing from 6
      writing from 19
      writing from 32
      writing from 15
      writing from 27
      writing from 22
      writing from 12
      writing from 33
      writing from 9
      writing from 35
      writing from 15
      writing from 11
      writing from 36
      writing from 6
      writing from 39
      writing from 32
      writing from 21
      writing from 27
      writing from 18
      writing from 19
      writing from 11
      writing from 36
      writing from 33
      writing from 6
      writing from 19
      writing from 39
      writing from 21
      writing from 9
      writing from 18
      writing from 9
      writing from 33
      writing from 19
      writing from 6
      writing from 9
      writing from 19
      writing from 10
      writing from 29
      writing from 30
      writing from 3
      writing from 10
      writing from 28
      writing from 38
      writing from 5
      writing from 2
      writing from 37
      writing from 14
      writing from 8
      writing from 1
      writing from 34
      writing from 7
      writing from 24
      writing from 31
      writing from 25
      writing from 16
      writing from 13
      writing from 23
      writing from 20
      writing from 4
      writing from 26
      writing from 0
      writing from 17
      writing from 14
      writing from 34
      writing from 38
      writing from 20
      writing from 23
      writing from 30
      writing from 4
      writing from 7
      writing from 26
      writing from 17
      writing from 2
      writing from 13
      writing from 1
      writing from 24
      writing from 28
      writing from 25
      writing from 29
      writing from 8
      writing from 37
      writing from 5
      writing from 10
      writing from 3
      writing from 0
      writing from 31
      writing from 16
      writing from 20
      writing from 24
      writing from 25
      writing from 14
      writing from 10
      writing from 17
      writing from 38
      writing from 30
      writing from 16
      writing from 7
      writing from 2
      writing from 31
      writing from 26
      writing from 23
      writing from 1
      writing from 37
      writing from 4
      writing from 5
      writing from 29
      writing from 1
      writing from 20
      writing from 24
      writing from 16
      writing from 10
      writing from 5
      writing from 26
      writing from 17
      writing from 31
      writing from 14
      writing from 4
      writing from 14
      writing from 4
      java.lang.Exception: Server: Timed out
              at TestThread.finish(TestThread.java:44)
              at SelectorTest.main(SelectorTest.java:46)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:324)
              at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
              at java.lang.Thread.run(Thread.java:534)
      java.lang.Exception: Client: Timed out
              at TestThread.finish(TestThread.java:44)
              at SelectorTest.main(SelectorTest.java:46)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:324)
              at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
              at java.lang.Thread.run(Thread.java:534)
      java.lang.Exception: Failure
              at SelectorTest.main(SelectorTest.java:47)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:324)
              at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
              at java.lang.Thread.run(Thread.java:534)

      JavaTest Message: Test threw exception: java.lang.Exception: Failure
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.Exception: Failure
      result: Failed. Execution failed: `main' threw exception: java.lang.Exception: Failure


      test result: Failed. Execution failed: `main' threw exception: java.lang.Exception: Failure


      Specific machine info:
      ======================
      Hostname: linux-1
      OS: Solaris 8 (sparc)

      Hostname: novo48
      OS: Solaris 9 (sparc)

      Hostname: linux-10
      OS: Solaris 8 (x86)

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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mmcclosksunw Michael Mccloskey (Inactive)
              Reporter:
              irasunw Ira Ira (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: