[6571] in Athena Bugs
Moira NFS update
daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Sat Dec 8 06:13:00 1990
To: bugs@ATHENA.MIT.EDU
Date: Sat, 08 Dec 90 06:12:41 EST
From: David Krikorian <dkk@ATHENA.MIT.EDU>
What were you trying to do?
Wait for the Moira NFS update to finish.
What's wrong:
The install_dirs script can tight-loop forever, burning up CPU
time like nobody's business.
What should have happened:
The install_dirs script should have exited (with an error).
It definitely should not be using about 50% of the CPU.
Please describe any relevant documentation references:
The code.
Moira had a filsys entry for locker psun on Atlas, in /u2/lockers.
There was already a /u2/lockers/psun. That file was a dangling
symlink, so the test for existance of a directory named psun failed.
The new-user construction directory was created in /u2/lockers, named
_psun. Then an "mv _psun psun" was done to put it in place. The mv
tried to follow the symlink, but since the symlink had an impossible
path (a directory missing en route to the target of the symlink), the
mv failed. The script was at that point set up to encounter the next
problem:
This bug, which can occur without the problem above, is that if
$tmpdir (/u2/lockers/_psun) already exists, the shell loops in
while(1). This can happen independently if $tmpdir (_psun) exists for
any reason, such as a previous aborted Moira update.
Here are some code excerpts:
------------
while (1)
while (1) #
if (-d $tmpdir) then # Infinite loop
continue #
else
mkdir $tmpdir
break
endif
end
switch ($type)
case HOMEDIR:
# ***** Remove this when /etc/encorce_quota becomes obsolete!
# Give this filesystem a 1200K quota
setquota $dev $uid 1200
# *****
endsw
mv $tmpdir $dir
### Soft failure when ready
end
------------