help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave 2.9.9 under cygwin does not find scriptfiles on network path


From: Benjamin Lindner
Subject: Re: octave 2.9.9 under cygwin does not find scriptfiles on network path
Date: Tue, 17 Oct 2006 08:26:54 +0200

> On 16-Oct-2006, Benjamin Lindner wrote:
> 
> | Hello,
> | 
> | I am using octave 2.9.9 compiled under cygwin.
> | I experience the following problem: adding a network directory to
> octave's
> | searchpath works, but m-files located there are not found by octave
> | This problem also occurs with octave 2.9.6, but does not occur with 
> | octave 2.1.73.
> | 
> | I have the following simple function located under /cygdrive/u:
> | $ cat /cygdrive/u/mytestfunction.m 
> | function mytestfunction()
> | 
> | disp("in function mytestfunction");
> | 
> | endfunction
> | 
> | Following test procedure:
> | $ octave-2.9.9 --norc
> | octave-2.9.9:1> addpath("/cygdrive/u")
> | octave-2.9.9:2> path
> | 
> | Octave's search path contains the following directories:
> | 
> | .                                                                       
> | /cygdrive/u                                                             
> | <snipped octave default load path here>
> | 
> | octave-2.9.9:3> stat("/cygdrive/u/mytestfunction.m")
> | ans =
> | {
> |   dev =  1.8792e+09
> |   ino =  1.2159e+19
> |   mode =  33188
> |   modestr = -rw-r--r--
> |   nlink =  1
> |   uid =  253788
> |   gid =  10545
> |   rdev =  1.8792e+09
> |   size =  77
> |   atime =  1.1610e+09
> |   mtime =  1.1610e+09
> |   ctime =  1.1610e+09
> |   blksize =  1024
> |   blocks =  4
> | }
> | 
> | octave-2.9.9:4> which mytestfunction    
> | which: `mytestfunction' is undefined
> | octave-2.9.9:5> mytestfunction
> | error: `mytestfunction' undefined near line 5 column 1
> | 
> | I have a list of directories located at local hard drive added to 
> | octave's searchpath, and here everything works fine. Only if I include
> | a network drive, something's wrong.
> | 
> | I searched the mailing lists, and came across the following bug
> | issued for octave-2.1.73
> |
> http://velveeta.che.wisc.edu/octave/lists/archive//bug-octave.2006/msg00123.html
> | but this was related to recursive loadpath searching - not really the
> | problem I encountered.
> | 
> | What can I do to debug this problem?
> | I tried the strace tool, but - frankly said -  I do not know where to 
> | look for indications in the tons of lines I got.
> 
> Presumably, somewhere in the output from strace there should be a
> record of attempting to open /cygdrive/u/mytestfunction.m.  If not,
> then why not?  If it is there, but the open fails, then why does it
> fail?

OK, following testcases

$ ls -a /cygdrive/u/testing
./  ../  mytestfunction.m
$ ls -a /cygdrive/c/testing
./  ../  mytestfunction.m

then executing
$ echo "addpath('/cygdrive/u/testing');  mytestfunction" | strace -o 
octave299_straceU.txt /opt/octave/2.9.9-gcc-3.2/bin/octave-2.9.9 --norc
$ echo "addpath('/cygdrive/c/testing');  mytestfunction" | strace -o 
octave299_straceC.txt /opt/octave/2.9.9-gcc-3.2/bin/octave-2.9.9 --norc

this fails for the network drive but works for the fixed drive.
In the fail case there is only one occurence of the filename

$ grep -C 10 "mytestfunction" octave299_straceU.txt 
   93 53781650 [main] octave-2.9.9 1616 fhandler_disk_file::readdir: 0 = 
readdir (0x110F9660, 0x22BCD4) (..)
   96 53781746 [main] octave-2.9.9 1616 normalize_posix_path: src 
/cygdrive/u/testing/..
   81 53781827 [main] octave-2.9.9 1616 normalize_posix_path: /cygdrive/u/ = 
normalize_posix_path (/cygdrive/u/testing/..)
   80 53781907 [main] octave-2.9.9 1616 mount_info::conv_to_win32_path: 
conv_to_win32_path (/cygdrive/u)
   82 53781989 [main] octave-2.9.9 1616 mount_info::cygdrive_win32_path: src 
'/cygdrive/u', dst 'u:\'
   76 53782065 [main] octave-2.9.9 1616 set_flags: flags: binary (0x2)
   77 53782142 [main] octave-2.9.9 1616 mount_info::conv_to_win32_path: 
src_path /cygdrive/u, dst u:\, flags 0x2A, rc 0
  265 53782407 [main] octave-2.9.9 1616 symlink_info::check: not a symlink
   90 53782497 [main] octave-2.9.9 1616 symlink_info::check: 0 = symlink.check 
(u:\, 0x22B840) (0x2A)
   91 53782588 [main] octave-2.9.9 1616 path_conv::check: this->path(u:\), 
has_acls(0)
   83 53782671 [main] octave-2.9.9 1616 fhandler_disk_file::readdir: 0 = 
readdir (0x110F9660, 0x22BCD4) (mytestfunction.m)
  106 53782777 [main] octave-2.9.9 1616 geterrno_from_win_error: windows error 
18 == errno 89
   79 53782856 [main] octave-2.9.9 1616 fhandler_disk_file::readdir: 89 = 
readdir (0x110F9660, 0x22BCD4) (***)
  374 53783230 [main] octave-2.9.9 1616 geterrno_from_win_error: windows error 
18 == errno 89
   93 53783323 [main] octave-2.9.9 1616 fhandler_disk_file::readdir: 0 = 
readdir (0x110F9660, 0x22BCD4) (.)
  103 53783426 [main] octave-2.9.9 1616 geterrno_from_win_error: windows error 
18 == errno 89
   76 53783502 [main] octave-2.9.9 1616 normalize_posix_path: src 
/cygdrive/u/testing/..
   83 53783585 [main] octave-2.9.9 1616 normalize_posix_path: /cygdrive/u/ = 
normalize_posix_path (/cygdrive/u/testing/..)
   81 53783666 [main] octave-2.9.9 1616 mount_info::conv_to_win32_path: 
conv_to_win32_path (/cygdrive/u)
   77 53783743 [main] octave-2.9.9 1616 mount_info::cygdrive_win32_path: src 
'/cygdrive/u', dst 'u:\'
   74 53783817 [main] octave-2.9.9 1616 set_flags: flags: binary (0x2)

The corresponding strace excerpt for the working case looks similar

$ grep -C 10 "mytestfunction" octave299_straceC.txt 
   84 70674576 [main] octave-2.9.9 1528 normalize_posix_path: src 
/cygdrive/c/testing/..
   77 70674653 [main] octave-2.9.9 1528 normalize_posix_path: /cygdrive/c/ = 
normalize_posix_path (/cygdrive/c/testing/..)
   88 70674741 [main] octave-2.9.9 1528 mount_info::conv_to_win32_path: 
conv_to_win32_path (/cygdrive/c)
   75 70674816 [main] octave-2.9.9 1528 mount_info::cygdrive_win32_path: src 
'/cygdrive/c', dst 'c:\'
   83 70674899 [main] octave-2.9.9 1528 set_flags: flags: binary (0x2)
  271 70675170 [main] octave-2.9.9 1528 mount_info::conv_to_win32_path: 
src_path /cygdrive/c, dst c:\, flags 0x2A, rc 0
  241 70675411 [main] octave-2.9.9 1528 symlink_info::check: not a symlink
  115 70675526 [main] octave-2.9.9 1528 symlink_info::check: 0 = symlink.check 
(c:\, 0x22B4D0) (0x2A)
  104 70675630 [main] octave-2.9.9 1528 path_conv::check: this->path(c:\), 
has_acls(1)
  184 70675814 [main] octave-2.9.9 1528 fhandler_disk_file::readdir: 0 = 
readdir (0x110F9770, 0x22BCD4) (..)
   94 70675908 [main] octave-2.9.9 1528 fhandler_disk_file::readdir: 0 = 
readdir (0x110F9770, 0x22BCD4) (mytestfunction.m)
   92 70676000 [main] octave-2.9.9 1528 geterrno_from_win_error: windows error 
18 == errno 89
  597 70676597 [main] octave-2.9.9 1528 fhandler_disk_file::readdir: 89 = 
readdir (0x110F9770, 0x22BCD4) (***)
  376 70676973 [main] octave-2.9.9 1528 fhandler_disk_file::readdir: 0 = 
readdir (0x110F9770, 0x22BCD4) (.)
   84 70677057 [main] octave-2.9.9 1528 normalize_posix_path: src 
/cygdrive/c/testing/..
   83 70677140 [main] octave-2.9.9 1528 normalize_posix_path: /cygdrive/c/ = 
normalize_posix_path (/cygdrive/c/testing/..)
   77 70677217 [main] octave-2.9.9 1528 mount_info::conv_to_win32_path: 
conv_to_win32_path (/cygdrive/c)
   72 70677289 [main] octave-2.9.9 1528 mount_info::cygdrive_win32_path: src 
'/cygdrive/c', dst 'c:\'
   75 70677364 [main] octave-2.9.9 1528 set_flags: flags: binary (0x2)
   70 70677434 [main] octave-2.9.9 1528 mount_info::conv_to_win32_path: 
src_path /cygdrive/c, dst c:\, flags 0x2A, rc 0
  118 70677552 [main] octave-2.9.9 1528 symlink_info::check: not a symlink
   74 70677626 [main] octave-2.9.9 1528 symlink_info::check: 0 = symlink.check 
(c:\, 0x22B4D0) (0x2A)
   81 70677707 [main] octave-2.9.9 1528 path_conv::check: this->path(c:\), 
has_acls(1)
  152 70677859 [main] octave-2.9.9 1528 fhandler_disk_file::readdir: 0 = 
readdir (0x110F9770, 0x22BCD4) (..)
   93 70677952 [main] octave-2.9.9 1528 fhandler_disk_file::readdir: 0 = 
readdir (0x110F9770, 0x22BCD4) (mytestfunction.m)
 1026 70678978 [main] octave-2.9.9 1528 stat64: entering
   84 70679062 [main] octave-2.9.9 1528 normalize_posix_path: src 
/cygdrive/c/testing/.
   84 70679146 [main] octave-2.9.9 1528 normalize_posix_path: 
/cygdrive/c/testing/ = normalize_posix_path (/cygdrive/c/testing/.)
   76 70679222 [main] octave-2.9.9 1528 mount_info::conv_to_win32_path: 
conv_to_win32_path (/cygdrive/c/testing)
   73 70679295 [main] octave-2.9.9 1528 mount_info::cygdrive_win32_path: src 
'/cygdrive/c/testing', dst 'c:\testing'
   78 70679373 [main] octave-2.9.9 1528 set_flags: flags: binary (0x2)
   72 70679445 [main] octave-2.9.9 1528 mount_info::conv_to_win32_path: 
src_path /cygdrive/c/testing, dst c:\testing, flags 0x2A, rc 0
  112 70679557 [main] octave-2.9.9 1528 symlink_info::check: not a symlink
   80 70679637 [main] octave-2.9.9 1528 symlink_info::check: 0 = symlink.check 
(c:\testing, 0x22B920) (0x2A)
   87 70679724 [main] octave-2.9.9 1528 path_conv::check: 
this->path(c:\testing), has_acls(1)

<snipped further records of opening&reading mytestfunction.m>

In the fail case there is no record of opening mytestfunction.m.
What looks odd is the windows error 18 after the readdir().
However the same error is reported for the fixed drive case, so that
seems to make no difference. 

I'm not sure if this is an octave issue or a cygwin issue.
any further clues?

thanks for help so far,
benjamin
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer


reply via email to

[Prev in Thread] Current Thread [Next in Thread]