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

Regression test java/nio/Buffer/LimitDirectMemory.sh fails on 64-bit machines

XMLWordPrintable

    • b02
    • x86
    • linux_suse_sles_8



      Name: kaR10181 Date: 05/05/2004


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.5.0-b49
      Testbase : Regression1.5_new-cte
      Platform[s] : SuSE SLES 8
      switch/Mode : -server
      Falling test[s]:
              CTE_REGTEST/Generic/4879883/LimitDirectMemory.sh

      Regression1.5_new-cte CTE_REGTEST/Generic/4879883/LimitDirectMemory.sh
      test fails with JDK1.5.0-b49
      The bug is reprodusible on AMD64 only.

      Test source location:
      =====================
      /net/jdk/export/jpse04/Regression/1.5.0/test/cte/CTE_REGTEST/Generic/4879883/LimitDirectMemory.sh

      jtr file location:
      ==================
      /net/jtgb4u4c/export/sail15/results.2/tiger/b49/regtest/linux/Sles8_test_server_jck-amd1/workDir/cte/CTE_REGTEST/Generic/4879883/LimitDirectMemory.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

      #Paths in Java Software:
      JT_HOME="/java/re/jct-tools/3.1.2/archive/fcs/binaries"
      JEMMY_JAR="/net/jdk.sfbay/export/jpse04/Jemmy/jemmy.jar"
      JAVA_HOME="/java/re/jdk/1.5.0/promoted/all/b49/binaries/linux-amd64"
      TEST_BASE_PATH="/net/jdk/export/jpse04/Regression/1.5.0/test"

      #Alternative paths outside Java Software
      #JT_HOME="/net/koori.sfbay/onestop/jct-tools/3.1.2/archive/fcs/binaries"
      #JEMMY_JAR="/net/jdk.sfbay/export/jpse04/Jemmy/jemmy.jar"
      #JAVA_HOME="/net/koori.sfbay/onestop/jdk/1.5.0/promoted/all/b49/binaries/linux-amd64"
      #TEST_BASE_PATH="/net/jdk/export/jpse04/Regression/1.5.0/test"

      #Alternative paths for the NSK site:
      #JT_HOME="/net/linux-15/export/home/java/jct"
      #JEMMY_JAR="$JT_HOME/jemmy/jemmy.jar"
      #JAVA_HOME="/net/linux-15/export/home/java/jdk1.5.0/linux"
      #TEST_BASE_PATH="/net/jtgb4u4c/export/sail1/testarea/regression1.5/cte"


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

      TEST="CTE_REGTEST/Generic/4879883/LimitDirectMemory.sh"

      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 -showversion -server -cp $CLASSPATH -DenvVars=TESTJAVAHOME=$JAVA_HOME,TESTVMOPTS=$TESTVMOPTS,DISPLAY=$DISPLAY,HOME=$HOME/.regtest,PATH=/bin:/usr/bin,CPAPPEND=$JEMMY_JAR,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST=
      -DDISPLAY=$DISPLAY -DlocalHost=`uname -n` -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/$TEST"

      --- script end ---

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

      Test output (jtr part):
      =======================
      ----------System.out:(57/4073)----------
      Testing: -XX:MaxDirectMemorySize=10 -cp
      /net/jtgb4u4c/export/sail16/results_full/tiger/b49/regtest/Sles8_test_server_jck-amd1/workDir/cte/classes/CTE_REGTEST/Generic/4879883
      LimitDirectMemory true 10 1
      java.lang.OutOfMemoryError: Direct buffer memory
          at java.nio.Bits.reserveMemory(Bits.java:624)
          at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)
          at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
          at LimitDirectMemory.main(LimitDirectMemory.java:31)
      OK - Error thrown as expected
      --- passed as expected
      Testing: -XX:MaxDirectMemorySize=1k -cp
      /net/jtgb4u4c/export/sail16/results_full/tiger/b49/regtest/Sles8_test_server_jck-amd1/workDir/cte/classes/CTE_REGTEST/Generic/4879883
      LimitDirectMemory true 1k 100
      java.lang.OutOfMemoryError: Direct buffer memory
          at java.nio.Bits.reserveMemory(Bits.java:624)
          at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)
          at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
          at LimitDirectMemory.main(LimitDirectMemory.java:31)
      OK - Error thrown as expected
      --- passed as expected
      Testing: -XX:MaxDirectMemorySize=10m -cp
      /net/jtgb4u4c/export/sail16/results_full/tiger/b49/regtest/Sles8_test_server_jck-amd1/workDir/cte/classes/CTE_REGTEST/Generic/4879883
      LimitDirectMemory true 10m 10m
      java.lang.OutOfMemoryError: Direct buffer memory
          at java.nio.Bits.reserveMemory(Bits.java:624)
          at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)
          at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
          at LimitDirectMemory.main(LimitDirectMemory.java:31)
      OK - Error thrown as expected
      --- passed as expected
      Testing: -XX:MaxDirectMemorySize=65M -cp
      /net/jtgb4u4c/export/sail16/results_full/tiger/b49/regtest/Sles8_test_server_jck-amd1/workDir/cte/classes/CTE_REGTEST/Generic/4879883
      LimitDirectMemory false 64M 65M
      OK - Error not thrown
      --- passed as expected
      Testing: -cp
      /net/jtgb4u4c/export/sail16/results_full/tiger/b49/regtest/Sles8_test_server_jck-amd1/workDir/cte/classes/CTE_REGTEST/Generic/4879883
      LimitDirectMemory false 10 1
      OK - Error not thrown
      --- passed as expected
      Testing: -cp
      /net/jtgb4u4c/export/sail16/results_full/tiger/b49/regtest/Sles8_test_server_jck-amd1/workDir/cte/classes/CTE_REGTEST/Generic/4879883
      LimitDirectMemory false 0 DEFAULT
      OK - Error not thrown
      --- passed as expected
      Testing: -cp
      /net/jtgb4u4c/export/sail16/results_full/tiger/b49/regtest/Sles8_test_server_jck-amd1/workDir/cte/classes/CTE_REGTEST/Generic/4879883
      LimitDirectMemory true 0 DEFAULT+1
      java.lang.OutOfMemoryError: Direct buffer memory
          at java.nio.Bits.reserveMemory(Bits.java:624)
          at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)
          at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
          at LimitDirectMemory.main(LimitDirectMemory.java:31)
      OK - Error thrown as expected
      --- passed as expected
      Testing: -XX:MaxDirectMemorySize=0 -cp
      /net/jtgb4u4c/export/sail16/results_full/tiger/b49/regtest/Sles8_test_server_jck-amd1/workDir/cte/classes/CTE_REGTEST/Generic/4879883
      LimitDirectMemory true 0 1
      java.lang.OutOfMemoryError: Direct buffer memory
          at java.nio.Bits.reserveMemory(Bits.java:624)
          at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)
          at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
          at LimitDirectMemory.main(LimitDirectMemory.java:31)
      OK - Error thrown as expected
      --- passed as expected
      Testing: -Dsun.nio.MaxDirectMemorySize=1K -cp
      /net/jtgb4u4c/export/sail16/results_full/tiger/b49/regtest/Sles8_test_server_jck-amd1/workDir/cte/classes/CTE_REGTEST/Generic/4879883
      LimitDirectMemory false DEFAULT-1 DEFAULT/2
      OK - Error not thrown
      --- passed as expected
      Testing: -XX:MaxDirectMemorySize=42g -cp
      /net/jtgb4u4c/export/sail16/results_full/tiger/b49/regtest/Sles8_test_server_jck-amd1/workDir/cte/classes/CTE_REGTEST/Generic/4879883
      LimitDirectMemory false 0 DEFAULT
      OK - Error not thrown
      --- passed as expected
      Testing: -XX:MaxDirectMemorySize=42g -cp
      /net/jtgb4u4c/export/sail16/results_full/tiger/b49/regtest/Sles8_test_server_jck-amd1/workDir/cte/classes/CTE_REGTEST/Generic/4879883
      LimitDirectMemory true 0 DEFAULT+1M
      --- failed
      ----------System.err:(2/147)----------
      Exception in thread "main" java.lang.RuntimeException: OutOfMemoryError
      not thrown: 86245376
          at LimitDirectMemory.main(LimitDirectMemory.java:32)
      result: Failed. Execution failed: exit code 1


      test result: Failed. Execution failed: exit code 1


      Specific machine info:
      ======================
      Hostname: jck-amd1
      OS: SuSE SLES 8



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

            asaha Abhijit Saha
            akmsunw Akm Akm (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: