NetBSD Problem Report #2423

From gnats  Thu May 16 12:39:13 1996
Received: from wipux2.wifo.uni-mannheim.de by pain.lcs.mit.edu (8.7.4/8.6.12) with ESMTP id MAA07350 for <gnats-bugs@gnats.netbsd.org>; Thu, 16 May 1996 12:11:20 -0400 (EDT)
Message-Id: <199605161606.SAA02308@wipux2.wifo.uni-mannheim.de>
Date: Thu, 16 May 1996 18:06:11 +0200 (MET DST)
From: Andrew Wheadon <andrew@wipux2.wifo.uni-mannheim.de>
Reply-To: andrew@wipux2.wifo.uni-mannheim.de
To: gnats-bugs@gnats.netbsd.org
Subject: bugs in union-mounts
X-Send-Pr-Version: 3.95

>Number:         2423
>Category:       kern
>Synopsis:       union mounts panic when unmounting, panic when done twice
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 16 12:50:03 +0000 1996
>Closed-Date:    
>Last-Modified:  Mon Jun 05 22:28:14 +0000 2000
>Originator:     Andrew Wheadon
>Release:        19960515
>Organization:
The cost of living hasn't affected it's popularity. (Mark Twain)
current	release=doc host=wipux2.wifo.uni-mannheim.de \ "NetBSD-current mirror"
hostbase=/mit/ftp/pub/NetBSD base=/usr prefix=/usr backup delete use-rel-suffix
>Environment:

System: NetBSD wipux2 1.1B NetBSD 1.1B (WIPOOL) #0: Thu May 16 14:57:24 MET DST 1996 toor@wipux2:/src/src/sys/arch/i386/compile/WIPOOL i386


>Description:
three bugs:	1) panics when unmounting, 2) allows double-mounting,
		which is followed by panic on access, 3) no dependencies
		explained when compiling kernel.
one nicety:	4) union-mounts are not nfs-exportable

1)
	Union mounts panic when trying to unmount them:
mount -t union -o -b /src2/boot/wippc00 /src2/boot/wippc51
ls /src2/boot/wippc51
umount /src2/boot/wippc51
	vgone
	vflush
	union_unmount
	dounmount
	sys_unmount
	syscall (22)

2)
	Union mounts are easily mounted twice over each other:

mount /src2/boot/wippc53
mount /src2/boot/wippc53
(this is the output of 'mount')
...
/dev/sd1g on /src2 type ffs (NFS exported, local)
<below>:/src2/boot/wippc00 on /src2/boot/wippc51 type union
<below>:/src2/boot/wippc00 on /src2/boot/wippc53 type union
<below>:/src2/boot/wippc00 on /src2/boot/wippc55 type union
<below>:/src2/boot/wippc00 on /src2/boot/wippc53 type union


	and when you then try to ls /src2/boot/wippc53 it (naturally)
	panics:
	panic locking against myself
	ufs_lock
	union_dir_cache
	sys_getdirentries
	syscall (196)
	(I have the (11mb compressed) core-dump for this one)

3)
	When compiling the Kernel and setting 'option UNION', unions
	will still fail to mount. At least one of the following additional
	options are needed to compile a kernel that supports UNION
	NULLFS,UMAPFS (probably NULLFS) but dependency is not defined
	in files*.

4)
<root@wipux2:/src2/boot> mount -v -t nfs wipux2:/src2/boot /mnt
wipux2:/src2/boot on /mnt type nfs
<root@wipux2:/src2/boot> ls /mnt/wippc53
.s      dev/    home/   root/   src2/   usr/
bin/    etc/    mnt/    sbin/   tmp/    var/
<root@wipux2:/src2/boot> mount
...
<below>:/src2/boot/wippc00 on /src2/boot/wippc53 type union
wipux2:/src2/boot on /mnt type nfs
...
<root@wipux2:/src2/boot> umount /mnt
<root@wipux2:/src2/boot> mount -v -t nfs wipux2:/src2/boot/wippc53 /mnt
nfs: can't access /src2/boot/wippc53: Permission denied
<root@wipux2:/src2/boot> umount /mnt

As you can tell mounting /src2/boot lets me see the file but
ignores the union, and just shows me truely local files. (ie. the kernel
file on wippc00/netbsd is not listed etc.)
Trying to mount the union-directory fails completely.

>How-To-Repeat:
	see above.
>Fix:
	1)	??? 
	2)	Do NOT permit mounting same stuff in same place twice.
	3)	somehow add dependencies for config.
	4)	???
>Release-Note:
>Audit-Trail:
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.