Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Mar 1999 01:18:15 -0500 (EST)
From:      lennox@cs.columbia.edu
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/10381: hlfsd/NFS failure -- directory cached between users
Message-ID:  <199903040618.BAA01121@conrail.cs.columbia.edu>

next in thread | raw e-mail | index | archive | help


>Number:         10381
>Category:       kern
>Synopsis:       hlfsd/NFS failure -- directory cached between users
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar  3 22:20:00 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan Lennox
>Release:        FreeBSD 3.1-STABLE i386
>Organization:
Columbia University Computer Science
>Environment:

I have two users, lennox and llennox.  The following directories and
symlinks exist initially: 

conrail $ ls -ld /var/mail
lrwxr-xr-x  1 root  wheel  10 Mar  3 13:23 /var/mail@ -> /mail/home
conrail $ ls -ld /mail/home
lrwxrwxrwx  1 root  wheel  13 Mar  4 01:01 /mail/home@ -> /var/alt_mail
conrail $ ls -ld /var/alt_mail
drwxrwxrwt  2 root  mail  512 Mar  3 13:28 /var/alt_mail/
conrail $ ls -ld ~lennox/.mailspool
drwxr-xr-x  2 lennox  phd  512 Mar  4 00:50 /u/zer/lennox/.mailspool/
conrail $ ls -ld ~llennox/.mailspool
drwxr-xr-x  2 llennox  llennox  512 Mar  4 01:01 /home/llennox/.mailspool/

>Description:

When you use hlfsd, each user is supposed to see their own version of a
system-wide directory -- in this case, /mail/home -- symlinked to a
subdirectory of their home directory. In FreeBSD 3.1-STABLE, however
(cvsup'd on March 2nd), for all users the symlink in /mail/home points to
the home directory of whatever user first looked at it after hlfsd was
started. 

The hlfsd developer (Erez Zadok, ezk@cs.columbia.edu) said that this was
indicative of the NFS attribute cache not being turned off, so values are
cached by the kernel, resulting in the symlink being preserved between
users.  hlfsd tries to turn off the NFS attribute cache so this won't
happen.  I'm not sure if this is an NFS problem (in turning off the cache)
or an hlfsd problem (in how it tries to turn off the cache).  It seems to be
trying to turn it off by setting acregmin and acdirmin to 0.

I'm not sure if this PR should go in kern (as an NFS problem) or in bin (as
an hlfsd problem), so I guessed kern.

>How-To-Repeat:

I have two users, lennox and llennox, with home directories /u/zer/lennox
and /home/llennox respectively.  This can be repeated with any two non-root
users.

1.  Set up symlinks as described in "Environment" above.

2.  As root, start hlfsd:

conrail # /usr/sbin/hlfsd -a /var/alt_mail -l /var/log/hlfsd /mail/home .mailspool

3.  Look at /mail/home as the first user:
lennox@conrail$ ls -ld /mail/home
lrwxrwxrwx  1 root  wheel  1024 Mar  4 01:15 /mail/home@ -> /u/zer/lennox/.mailspool

4.  Look at /mail/home as the second user:

llennox@conrail$ ls -ld /mail/home
lrwxrwxrwx  1 root  wheel  1024 Mar  4 01:15 /mail/home -> /u/zer/lennox/.mailspool

[ This should be /mail/home -> /home/llennox/.mailspool. ]

>Fix:
	
Don't use hlfsd -- instead play games in .profile to set $MAIL to
$HOME/.mailspool.  (This is not a proper fix.)

Erez (Zadok, see above) has suggested that the best solution would be for
FreeBSD's nfs_mount to support a 'noac' attribute, and equivalent
syscall-level structures, similar to Solaris's, which turns off the NFS
attribute cache entirely, rather than having to play around with the maximum
and minimum cache times.

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903040618.BAA01121>