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

Pathname canonicalization fails with ERROR_NETWORK_UNREACHABLE (w2k)

XMLWordPrintable

    • b32
    • x86
    • windows_2000
    • Verified



      Name: iaR10016 Date: 06/06/2003


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.4.2-b25, JDK1.4.2-b24, JDK1.5.0-b07, JDK1.4.1-b21
      Testbase : RegTest-test
      Platform[s] : Windows 2000 Pro
                        (the test is valid for Windows only)
      switch/Mode : all
      Falling test[s]: java/io/pathNames/GeneralWin32.java

      RegTest-test java/io/pathNames/GeneralWin32.java test fails three times from four approximatelly
      with JDK1.4.2-b25 on Windows 2000.

      It seems like the test fails due to the timing issue.

      Here is the code fragment from the test's source:

      --------- java/io/pathNames/General.java ---------
      ...
      251> /** Check a single slash case, plus its children */
      252> public static void checkSlash(int depth, boolean create,
      253> String ans, String ask, String slash)
      254> throws Exception
      255> {
      256> check(ans, ask + slash);
      257> checkNames(depth, create,
      258> ans.endsWith(File.separator) ? ans : ans + File.separator,
      259> ask + slash);
      260> }
      ...
      -----------------------------------------------------


      The test stable passes if I changes this code to the following:

      ...
            public static void checkSlash(int depth, boolean create,
                          String ans, String ask, String slash)
               throws Exception
           {

      // !!!!!!!!!
      Thread.sleep(10);

                 check(ans, ask + slash);
                    checkNames(depth, create,
                    ans.endsWith(File.separator) ? ans : ans + File.separator,
                    ask + slash);
           }
      ...


      Test source location:
      =====================
      /java/re/jdk/1.4.2/promoted/latest/ws/j2se/test/java/io/pathNames/GeneralWin32.java

      jtr file location:
      ==================
      /net/jtgb4u4c.sfbay/export/sail15/results/mantis/b24/regtest/win32/win2000_-server_smp_linux-2/workDir/test/java/io/pathNames/GeneralWin32.jtr

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

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

      RESULT_DIR=`pwd`
      WORK_DIR=$RESULT_DIR/workDir/test
      REPORT_DIR=$RESULT_DIR/reportDir
      JT_HOME="h:/java/jct"
      JAVA_HOME="h:/java/jdk1.4.2/win32"
      TEST_BASE_PATH="h:/java/regtest/test"
      TESTWITH=$JAVA_HOME
      TESTJAVA=$JAVA_HOME
      JTOPTS="-server"
      TESTVMOPTS="-server"
      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
      #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,windir=$windir,PATH=${SHELL%/*},CPAPPEND=$JT_HOME/jemmy/jemmy.jar,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -DDISPLAY=:0 -DlocalHost="linux-2" -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/io/pathNames/GeneralWin32.java"
      --- script end ---

      Test output (jtr part):
      =======================
      ----------System.out:(0/0)----------
      ----------System.err:(1126/97784)*----------
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\test\scratch\XyZzY0123\FOO_bar_BAZ\GLORPified <== XyZzY0123\FOO_bar_BAZ\GLORPified
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\test\scratch\XyZzY0123\FOO_bar_BAZ\GLORPified <== xyzzy0123\foo_bar_baz\glorpified
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\test\scratch\XyZzY0123\FOO_bar_BAZ\GLORPified <== XYZZY0123\FOO_BAR_BAZ\GLORPIFIED
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\test\scratch\XyZzY0123\mumble <== XyZzY0123\mumble
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\test\scratch\XyZzY0123\mumble <== XyZzY0123\mumble/
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\test\scratch\XyZzY0123\mumble\foo <== XyZzY0123\mumble/foo
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\test\scratch\XyZzY0123\mumble\foo <== XyZzY0123\mumble/foo/
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\test\scratch\XyZzY0123\mumble\foo\foo1 <== XyZzY0123\mumble/foo/foo1
      ...
      Output overflow:
      JavaTest has limited the test output to the text to that
      at the beginning and the end, so that you can see how the
      test began, and how it completed.

      If you need to see more of the output from the test,
      set the system property javatest.maxOutputSize to a higher
      value. The current value is 100000
      ..

      \/.///foo
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\test <== ..\/.///.
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir <== ..\/.///..
      ...
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir <== ..\\\..\.
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2 <== ..\\\..\..
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir <== ..\\\..\H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\cte\javatest.err <== ..\\\..\\cte\javatest.err
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\cte <== ..\\\..\\cte
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\foo <== ..\\\..\\foo
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir <== ..\\\..\\.
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2 <== ..\\\..\\..
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir <== ..\\\..\/
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\cte\javatest.err <== ..\\\..\/cte\javatest.err
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\cte <== ..\\\..\/cte
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\foo <== ..\\\..\/foo
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir <== ..\\\..\/.
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2 <== ..\\\..\/..
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir <== ..\\\../H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\cte\javatest.err <== ..\\\../\cte\javatest.err
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\cte <== ..\\\../\cte
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\foo <== ..\\\../\foo
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir <== ..\\\../\.
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2 <== ..\\\../\..
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir <== ..\\\..\\H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\cte\javatest.err <== ..\\\..\\\cte\javatest.err
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\cte <== ..\\\..\\\cte
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir\foo <== ..\\\..\\\foo
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2\workDir <== ..\\\..\\\.
      H:\results_full\mantis\b24\regtest\win32\win2000_linux-2 <== ..\\\..\\\..
      C:\1.dcl <== C:1.dcl
      C:\1.dcl <== C:1.dcl/
      C:\1.dcl\foo <== C:1.dcl/foo
      C:\1.dcl <== C:1.dcl/.
      C:\ <== C:1.dcl/..
      C:\1.dcl <== C:1.dcl//
      C:\1.dcl\foo <== C:1.dcl//foo
      C:\1.dcl <== C:1.dcl//.
      C:\ <== C:1.dcl//..
      C:\1.dcl <== C:1.dcl///
      C:\1.dcl\foo <== C:1.dcl///foo
      C:\1.dcl <== C:1.dcl///.
      C:\ <== C:1.dcl///..
      C:\1.dcl <== C:1.dcl...
      Z:\foo1 <== Z:..///foo1
      Z:\ <== Z:..///.
      Z:\ <== Z:..///..
      Z:\ <== Z:..Z:\foo1 <== Z:..\foo1
      Z:\ <== Z:..\.
      Z:\ <== Z:..\..
      Z:\ <== Z:..\Z:\foo1 <== Z:..\\foo1
      Z:\ <== Z:..\\.
      Z:\ <== Z:..\\..
      Z:\ <== Z:..\/
      Z:\foo1 <== Z:..\/foo1
      Z:\ <== Z:..\/.
      Z:\ <== Z:..\/..
      Z:\ <== Z:../Z:\foo1 <== Z:../\foo1
      Z:\ <== Z:../\.
      Z:\ <== Z:../\..
      Z:\ <== Z:..\\Z:\foo1 <== Z:..\\\foo1
      Z:\ <== Z:..\\\.
      Z:\ <== Z:..\\\..
      \\non-existent-unc-host\bogus-share <== \\non-existent-unc-host\bogus-share
      \\non-existent-unc-host\bogus-share <== \\non-existent-unc-host\bogus-share/
      \\non-existent-unc-host\bogus-share\foo2 <-- \\non-existent-unc-host\bogus-share/foo2 ==> java.io.IOException: The network location cannot be reached. For information about network troubleshooting,
      see Windows Help
      java.io.IOException: The network location cannot be reached. For information about network troubleshooting, see Windows Help
           at java.io.WinNTFileSystem.canonicalize0(Native Method)
           at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:352)
           at java.io.File.getCanonicalPath(File.java:513)
           at General.check(General.java:212)
           at General.checkSlashes(General.java:267)
           at General.checkNames(General.java:304)
           at General.checkSlash(General.java:256)
           at General.checkSlashes(General.java:270)
           at GeneralWin32.checkUncPaths(GeneralWin32.java:129)
           at GeneralWin32.main(GeneralWin32.java:150)
           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.io.IOException: The network location cannot be reached. For information about network troubleshooting, see Windows Help
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.io.IOException: The network location cannot be reached. For information about network troubleshooting, see Windows Help
      result: Failed. Execution failed: `main' threw exception: java.io.IOException: The network location cannot be reached. For information about network troubleshooting, see Windows Help

      test result: Failed. Execution failed: `main' threw exception: java.io.IOException: The network location cannot be reached. For information about network troubleshooting, see Windows Help

      Specific machine info:
      ======================
      Hostname: linux-2
      OS: Windows 2000 Pro

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

            mr Mark Reinhold
            irasunw Ira Ira (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: