Subject: Re: Trying to mount procfs
To: None <port-arm32@NetBSD.ORG, jasper@ivision.co.uk>
From: Wolfgang Solfrank <ws@kurt.tools.de>
List: port-arm32
Date: 10/17/1996 16:00:45
> 	Before I tried this I was in X compiling and installing ispell. This
> triggered the 'lack of L1 page tables' (First time in ages). I quit fvwm
> (and hence X) and remembered that by default kernfs and procfs wern't
> mounted. so rather than reading any man pages or anything I tried random
> combinations of mount and proc to get one that worked. hence what I typed
> below may not be the correct way to mount procfs. It was the correct way to
> crash the machine at that time however! (I'm writing this from RiscOS)
> 
> 
> quatermass# mount proc /proc
> panic: locking against myself
> Stopped at    _Debugger +0x10: ldmdb r11,{r11,r13,r15}
> db> trace
> _Debugger (_Debugger +0x10)
> _panic (_panic+0x14)
> -ufs_lock (_ufs_lock +0x10)
> _lookup (etc...)
> _namei
> _ffs_mount
> _sys_mount
> _syscall
> db>

While the above of course shouldn't happen, I very much guess that you were
in / when you tried that.  This way proc and /proc are the same, and so the
mount code tries to mount one directory on itself and would deadlock when
trying to lock both vnodes if this deadlock wouldn't be broken in favour of
a panic.

The correct command to mount procfs is "mount -t procfs proc /proc".

I'll try to look into the underlying problem regarding the deadlock when I can
find some time for it.

Hope it helps,
Wolfgang
--
ws@TooLs.DE     (Wolfgang Solfrank, TooLs GmbH) 	+49-228-985800