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

(fc spec) FileChannel.write() throws IOException after filling partition (solaris)

    XMLWordPrintable

    Details

    • Subcomponent:
    • Understanding:
      Fix Understood
    • CPU:
      sparc
    • OS:
      solaris_9

      Description



      Name: icR10030 Date: 12/19/2002


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.4.2-b10
      Testbase : RegTest-test
      Platform[s] : Solaris 9 (sparc) (CDE)
      switch/Mode : -d64
      Falling test[s]:
                  java/nio/channels/FileChannel/Write.java

      RegTest-test java/nio/channels/FileChannel/Write.java test fails on JDK1.4.2-b10.
      Following is some lines of code from java/nio/channels/FileChannel/Write.java:
             File testFile = File.createTempFile( "test4.", null);
             testFile.deleteOnExit();
             ...
             ...
             FileOutputStream fos = new FileOutputStream( testFile );
             FileChannel fc = fos.getChannel();
             long bytesWritten = fc.write( dsts );

      dsts is big ByteBuffer[3] with overall size 3 * ( Integer.MAX_VALUE / 2 ) = 3221225469
      Our Solaris 9 box has 691252 Kb free space in /var/tmp, therefore
      fc.write() must throw exception "java.io.IOException: No space left on device"
      But it does not.
      Note, that if I change first line to:
             File testFile = File.createTempFile( "test4.", null, new File("/export/home/iche"));
      the "java.io.IOException: No space left on device" is throwing successfully.

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

      jtr file location:
      ==================
      /net/jtgb4u4c.sfbay/export/sail15/results/mantis/b08/regtest/sparc/sol9_sparc_novo48/workDir/test/java/nio/channels/FileChannel/Write.jtr

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

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

      RESULT_DIR=`pwd`
      WORK_DIR=$RESULT_DIR/workDir/test
      REPORT_DIR=$RESULT_DIR/reportDir
      JT_HOME="/net/linux-15/export/home/java/jct"
      JAVA_HOME="/net/linux-15/export/home/java/jdk1.4.2/sparc"
      TEST_BASE_PATH="/net/linux-15/export/home/java/regtest/test"

      TESTWITH=$JAVA_HOME
      TESTJAVA=$JAVA_HOME

      JTOPTS="-d64"
      TESTVMOPTS="-d64"

      CLASSPATH="$JT_HOME/classes:$JT_HOME/lib/javatest.jar:$JT_HOME/lib/jtreg.jar"

      export JAVA_HOME
      export JT_HOME
      export TESTWITH
      export CLASSPATH

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

      #rm $WORK_DIR/jtData/ResultCache.jtw 2>&1

      cd $WORK_DIR/scratch

      $JAVA_HOME/bin/java -cp $CLASSPATH $JTOPTS -DenvVars=TESTJAVAHOME=$JAVA_HOME,TESTVMOPTS=$TESTVMOPTS,DISPLAY=:0,HOME=$HOME/.regtest,PATH=/bin:/usr/bin,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -DDISPLAY=:0 -DlocalHost="novo48" -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/FileChannel/Write.java"

      --- script end ---

      Script output:
      ==============

      Test output (jtr part):
      =======================
      ----------System.out:(0/0)----------
      ----------System.err:(0/0)----------
      result: Passed. Compilation successful

      #section:main
      ----------messages:(3/110)----------
      command: main Write
      reason: Assumed action based on file name: run main Write
      elapsed time (seconds): 33.729
      ----------System.out:(0/0)----------
      ----------System.err:(14/713)----------
      java.lang.RuntimeException: Test 4 failed
      at Write.test4(Write.java:124)
      at Write.main(Write.java:17)
      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:536)

      JavaTest Message: Test threw exception: java.lang.RuntimeException: Test 4 failed
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Test 4 failed
      result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test 4 failed


      test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test 4 failed


      Specific machine info:
      ======================
      Hostname: novo48
      OS: Solaris 9 (sparc) (CDE)

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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ichesunw Iche Iche (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Imported:
                Indexed: