Bug 55349 - amd(8) mixes up symlinks in its virtual filesystem.
Summary: amd(8) mixes up symlinks in its virtual filesystem.
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.7-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-07 18:50 UTC by Max Okumoto
Modified: 2018-05-20 23:51 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max Okumoto 2003-08-07 18:50:11 UTC
	Bad symlinks are presented when multiple programs try to open filesystems
controlled by amd. The correct nfs filesystems are mounted but the links created
in the virutal filesystem are mixed up.

lrwxrwxrwx  1 root  wheel  52 Aug  7 10:40 /home/dhutches	-> /.amd_mnt/jsoefs/vol/vol0/unix/home/de/prog/dhutches
lrwxrwxrwx  1 root  wheel  48 Aug  7 10:40 /home/dstevens	-> /.amd_mnt/jsoefs/vol/vol0/unix/home/de/staff/jpr
lrwxrwxrwx  1 root  wheel  52 Aug  7 10:40 /home/grh		-> /.amd_mnt/jsoefs/vol/vol0/unix/home/de/prog/dhutches
lrwxrwxrwx  1 root  wheel  48 Aug  7 10:40 /home/jlgibson	-> /.amd_mnt/jsoefs/vol/vol0/unix/home/de/staff/grh
lrwxrwxrwx  1 root  wheel  53 Aug  7 10:40 /home/jpr		-> /.amd_mnt/jsoefs/vol/vol0/unix/home/de/staff/jlgibson
lrwxrwxrwx  1 root  wheel  52 Aug  7 10:40 /home/oconnor	-> /.amd_mnt/jsoefs/vol/vol0/unix/home/de/prog/dstevens
lrwxrwxrwx  1 root  wheel  52 Aug  6 04:28 /home/okumoto	-> /.amd_mnt/jsoefs/vol/vol0/unix/home/de/staff/okumoto

jsoefs:/vol/vol0/unix/home/de/staff/okumoto     221987 200502 21484    90%    /.amd_mnt/jsoefs/vol/vol0/unix/home/de/staff/okumoto
jsoefs:/vol/vol0/unix/home/de/prog/dhutches     221987 200502 21484    90%    /.amd_mnt/jsoefs/vol/vol0/unix/home/de/prog/dhutches
jsoefs:/vol/vol0/unix/home/de/staff/grh         221987 200502 21484    90%    /.amd_mnt/jsoefs/vol/vol0/unix/home/de/staff/grh
jsoefs:/vol/vol0/unix/home/de/staff/jlgibson    221987 200502 21484    90%    /.amd_mnt/jsoefs/vol/vol0/unix/home/de/staff/jlgibson
jsoefs:/vol/vol0/unix/home/de/staff/jpr         221987 200502 21484    90%    /.amd_mnt/jsoefs/vol/vol0/unix/home/de/staff/jpr
jsoefs:/vol/vol0/unix/home/de/prog/dstevens     221987 200502 21484    90%    /.amd_mnt/jsoefs/vol/vol0/unix/home/de/prog/dstevens
jsoefs:/vol/vol0/unix/home/de/staff/oconnor     221987 200502 21484    90%    /.amd_mnt/jsoefs/vol/vol0/unix/home/de/staff/oconnor

How-To-Repeat: 
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% cat /etc/amd.conf
# GLOBAL OPTIONS SECTION
[ global ]
browsable_dirs		= no
map_type		= nis

auto_dir		= /.amd_mnt
#cache_duration		= 300
cache_duration		= 60	# make things break faster.
#debug_options		= all
log_file		= /var/log/amd
log_options		= all
pid_file		= /var/run/amd.pid
plock			= yes
print_pid		= yes
print_version		= no
restart_mounts		= yes
selectors_on_default	= yes
unmount_on_exit		= yes

# DEFINE AN AMD MOUNT POINT
[ /home ]
map_name		= amd.home

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% pcat amd.home
/defaults opts:=dev,grpid,intr,nosuid,proto=tcp,quota,resvport,rw,soft,vers=3
dhutches type:=nfs;rhost:=jsoefs;rfs:=/vol/vol0/unix/home/de/prog/${key}
dstevens type:=nfs;rhost:=jsoefs;rfs:=/vol/vol0/unix/home/de/prog/${key}
grh type:=nfs;rhost:=jsoefs;rfs:=/vol/vol0/unix/home/de/staff/${key}
jlgibson type:=nfs;rhost:=jsoefs;rfs:=/vol/vol0/unix/home/de/staff/${key}
jpr type:=nfs;rhost:=jsoefs;rfs:=/vol/vol0/unix/home/de/staff/${key}
oconnor type:=nfs;rhost:=jsoefs;rfs:=/vol/vol0/unix/home/de/staff/${key}
okumoto type:=nfs;rhost:=jsoefs;rfs:=/vol/vol0/unix/home/de/staff/${key}

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#!/bin/sh

while true; do
	echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
	df -t nfs | grep jsoefs
	ls -l /home/
	echo YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY

	for i in dhutches dstevens grh jlgibson jpr oconnor okumoto; do
		cat /home/$i/.cshrc > /dev/null &
	done

	df -t nfs | grep jsoefs

	for i in dhutches dstevens grh jlgibson jpr oconnor okumoto; do
		ls -l /home/$i
	done

	sleep 300
done
exit  0
Comment 1 Martin Blapp freebsd_committer 2004-05-13 09:03:15 UTC
Responsible Changed
From-To: freebsd-bugs->mbr

Take this PR.
Comment 2 Martin Blapp freebsd_committer 2010-01-02 22:59:45 UTC
State Changed
From-To: open->feedback

Hi, Is this still a problem with latest am-utils ?
Comment 3 nbaldwin 2011-07-28 00:26:19 UTC
I can confirm that this is still an issue on a machine running 
8.1-RELEASE. It's a sporadic, inconsistent problem. It seems likely it's 
related to this:

http://www.am-utils.org/docs/am-utils/attrcache.txt
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2013-07-03 01:50:32 UTC
State Changed
From-To: feedback->open

Confirmed as of 2011. 


Comment 5 Mark Linimon freebsd_committer freebsd_triage 2013-07-03 01:50:32 UTC
Responsible Changed
From-To: mbr->freebsd-bugs

commit bit has been taken in for safekeeping.
Comment 6 Gasol Wu 2014-09-22 17:26:13 UTC
Still happening on FreeBSD 9.3-RELEASE.
Comment 7 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:51:30 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

Do
- Set Status to "Open"