It is currently Tue, 30 Nov 2021 17:57:25 GMT



 
Author Message
 why does tcsh lstat() sibling directories at login
Hi.  This is related to a problem I've been trying to figure out for a
while.  We have our users' home directories scattered on different
machines and we use the Solaris automounter to manage it all.

But we have found that if any one machine is down, no one can log in,
thus negating the whole point of distributing the $HOMEs.  Instead they
get an "NFS server...not responding" message for some random other
server.

So I decided to track down this dependency.  I ran truss on the login
shell (tcsh) and found that it was lstat()ing some seemingly random
other home directories like:

23753:  stat("/", 0xFFBEEEC8)                           = 0
23753:  lstat(".", 0xFFBEEE40)                          = 0
23753:  stat("../", 0xFFBEED30)                         = 0
23753:  open64("../", O_RDONLY|O_NDELAY)                = 3
23753:  fcntl(3, F_SETFD, 0x00000001)                   = 0
24157:  fstat64(3, 0xFFBEE038)                          = 0
23753:  getdents64(3, 0x00083018, 1048)                 = 448
23753:  lstat("../jimmyg", 0xFFBEEDB8)                  = 0
23753:  lstat("../carol", 0xFFBEEDB8)                   = 0
23753:  lstat("../toddm", 0xFFBEEDB8)                   = 0
23753:  lstat("../clava", 0xFFBEEDB8)                   = 0
23753:  lstat("../csrt", 0xFFBEEDB8)                    = 0
[...]

Now since ../ is /home and those other logins are on various machines,
any one of them being down stops everything in its tracks.

What I can't figure out is why it is doing this.  If I change the
user's login shell to, say, /bin/bash, then this problem doesn't occur.
So it seems to be something particular to [t]csh.

Any ideas?  Thanks...
--
               NOTE: Remove the temp?? hostname to reply after two weeks.
Jim Gottlieb | E-Mail: jimmy at nccom.com |
               V-Mail: +1 619 364 6912    | Fax: +1 858 274 8181
               My Home Page URL:   http://www.**-**.com/



 Fri, 05 Jan 2007 07:44:40 GMT   
 why does tcsh lstat() sibling directories at login
At 18 Jul 2004 15:44:40 -0800, ji...@temp01.nccom.com (Jim Gottlieb) writes:

Most likely tcsh is doing the m{*filter*}equivalent of pwd, but is using
the old-fashioned algorithm that causes things to hang in your case.



 Fri, 05 Jan 2007 16:22:47 GMT   
 why does tcsh lstat() sibling directories at login
In article <7wzn5w76eg....@sic.twinsun.com>,
Paul Eggert  <egg...@twinsun.com> wrote:

Where did you get your tcsh from? The tcsh bundled with Solaris 9 doesn't
seem to do this: at least "truss tcsh -l" shows it opening /etc/mnttab and
avoiding the "old-fashioned algorithm" when it gets to a filing system
boundary it its climb up the directory tree.

Chris Thompson
Email: cet1 [at] cam.ac.uk



 Fri, 05 Jan 2007 21:41:17 GMT   
 why does tcsh lstat() sibling directories at login

Are you using the nobrowse option on /home?

This is typical for "old getpwd"; in order to find its current
working directory the old getpwd algorithm would recursively go
up one level and then stat all files to find one that matched the
current directory.

Are you using your own build tcsh?

I don't see this with Solaris tcsh in S8 or later.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.



 Fri, 05 Jan 2007 22:02:44 GMT   
 why does tcsh lstat() sibling directories at login
In article <40fbd484$0$65124$e4fe5...@news.xs4all.nl>,
Casper H.S. Dik  <Casper....@Sun.COM> wrote:

Yup, I was using a home-grown version of tcsh from 1995.  I always
replaced Sun's version with my own because it includes some additional
features compiled in (namely Japanese support).

I have put Sun's version back as /bin/tcsh and that seems to have taken
care of the problem.  Thank you all.
--
               NOTE: Remove the temp?? hostname to reply after two weeks.
Jim Gottlieb | E-Mail: jimmy at nccom.com |
               V-Mail: +1 619 364 6912    | Fax: +1 858 274 8181
               My Home Page URL:  http://tokyojim.com/



 Sat, 06 Jan 2007 04:49:47 GMT   
 
   [ 5 post ] 

Similar Threads

1. Waiting for tcsh login shell to terminate (via tcsh or perl)

2. Login Error -- getcwd: cannot access parent directories: No such file or directory

3. Tcsh doing cd dir\ ?

4. Why "login='exec login'"?

5. Get rid of "error: lstat() of directory /var/lib/texmf failed: No such file or directory"?

6. what's /etc/net/ directory doing in solaris

7. Doing a file content search across directories

8. Why people are doing that?

9. HTTP slooooow when doing FTP - Why?


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software