[OpenAFS] bad pwd in AFS, complete
Brent Johnson
brent.johnson@jpl.nasa.gov
Thu, 08 Aug 2002 11:09:20 -0700
Hello (sorry for the previous incomplete message),
Every so often (every couple of hours it seems), I get the following
when I run "pwd":
(304)-eis-fil: pwd
pwd: cannot determine current directory!
I'm using the csh but I get similar results (different output though) in
other shells:
# bourne shell
(304)-eis-fil: sh
$ pwd
sh error: pwd too long
# korn shell
$ ksh
$ pwd
cannot access parent directories
# bash shell
$ bash
shell-init: could not get current directory: getcwd: cannot access
parent directories: Result too
large
bash-2.03$ pwd
pwd: could not get current directory: getcwd: cannot access parent
directories: Result too large
This seems to happen only in AFS space (may have seen it once on local
space). The AFS client of the above example is Transarc AFS 3.6 2.5 but
this happens fairly regularly on openafs 1.2.3 and I think on Tranarc
AFS 3.6 2.32 (all on Solaris 8 64-bit). My fileservers are Transarc 3.6
2.32/Sol 8 (2 are 3.5 3.56/Sol 2.6) and db servers are 3.6 2.26/Sol 2.6.
I found that if I flush the volume (fs flushvolume) a time or two it
clears up (for half an hour or so). An excerpt of a truss on pwd follows:
pathconf(".", _PC_PATH_MAX) = 1024
35 stat64("./", 0xFFBEE630) = 0
36 stat64("/", 0xFFBEE598) = 0
37 open64("./../", O_RDONLY|O_NDELAY) = 3
38 fcntl(3, F_SETFD, 0x00000001) = 0
39 fstat64(3, 0xFFBEDBB0) = 0
40 fstat64(3, 0xFFBEE630) = 0
41 getdents64(3, 0x00021FF8, 1048) = 1048
42 close(3) = 0
43 open64("./../../", O_RDONLY|O_NDELAY) = 3
44 fcntl(3, F_SETFD, 0x00000001) = 0
45 fstat64(3, 0xFFBEDBB0) = 0
46 fstat64(3, 0xFFBEE630) = 0
47 getdents64(3, 0x00021FF8, 1048) = 1048
48 getdents64(3, 0x00021FF8, 1048) = 1048
49 getdents64(3, 0x00021FF8, 1048) = 1048
50 getdents64(3, 0x00021FF8, 1048) = 1048
51 getdents64(3, 0x00021FF8, 1048) = 1048
52 close(3) = 0
*
* ## stuff deleted
*
*
open64("./../../../../../../../../../../../../../../../../../../../../../../../../../../.
./../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../..
/../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../
../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../.
./../../../../../../../../..", O_RDONLY|O_NDELAY) = 3
1554 fcntl(3, F_SETFD, 0x00000001) = 0
1555 fstat64(3, 0xFFBEDBB0) = 0
1556 fstat64(3, 0xFFBEE630) = 0
1557 getdents64(3, 0x00021FF8, 1048) = 728
1558 close(3) = 0
1559
open64("./../../../../../../../../../../../../../../../../../../../../../../../../../../.
./../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../..
/../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../
../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../.
./../../../../../../../../..", O_RDONLY|O_NDELAY) = 3
1560 fcntl(3, F_SETFD, 0x00000001) = 0
1561 fstat64(3, 0xFFBEDBB0) = 0
1562 fstat64(3, 0xFFBEE630) = 0
1563 getdents64(3, 0x00021FF8, 1048) = 480
1564 close(3) = 0
1565 pwd: cannot determine current directory!
1566 write(2, " p w d : c a n n o t ".., 41) = 41
It appears that 'pwd' is trying to find the top of the directory tree
("open64()" call) and is failing. Anybody ever experienced this (it is
quite annoying)? I read something about you could incur this problem
if "/afs" did not have 755 permissions (which it does) and that it only
occurs on csh and bourne shell (which is not the case either; occurs on
korn and bash, too).
-Brent
--
Brent A. Johnson
JPL File Services Engineer
Jet Propulsion Laboratory
Telephone: 4-2138 or 818-354-2138 Pager: 1-800-759-8888 PIN=1256866