Skip site navigation (1)Skip section navigation (2)
Date:      02 Dec 1998 10:23:01 -0500
From:      "Robert V. Baron" <rvb@cs.cmu.edu>
To:        vallo@matti.ee
Cc:        Forrest Aldrich <forrie@forrie.com>, freebsd-current@FreeBSD.ORG, Terry Lambert <tlambert@primenet.com>, "John S. Dyson" <dyson@iquest.net>
Subject:   Re: CODA on FreeBSD-CURRENT ... an interesting vm bug
Message-ID:  <yzsogpmk1pm.fsf_-_@sicily.odyssey.cs.cmu.edu>
In-Reply-To: Vallo Kallaste's message of Wed, 25 Nov 1998 14:22:49 %2B0200
References:  <4.1.19981123122653.00abfe40@206.25.93.69> <19981125142249.B38959@matti.ee>

next in thread | previous in thread | raw e-mail | index | archive | help
Well, the bug is not that interesting ...  

I tried cvsup into coda on a 11/05 kernel.  Doing cvsup'ing src
worked, but then I switched the tag from RELENG_2_2 to . and 
the system crashed ...
panic: lockmgr: pid -2, not exclusive lock holder 23390 unlocking
Debugger("panic")
The stack trace looks like:
db> tr
_Debugger(f0123a7b) at _Debugger+0x35
_panic(f011f0b1,fffffffe,f011f09b,5b5e,f419cd8c) at _panic+0x6f
_lockmgr(f08cbe00,6,f41897f0,0,f419cc84) at _lockmgr+0x2b3
_vop_stdunlock(f419cd18,f419cd2c,f01076b7,f419cd18,f419cd70) at _vop_stdunlock+0x23
_ufs_vnoperate(f419cd18) at _ufs_vnoperate+0x15
_coda_rdwr(f421ef00,f419cd8c,0,0,f079c780) at _coda_rdwr+0x10f
_coda_read(f419cd70,0,1,0,166) at _coda_read+0x50
_vnode_pager_input_old(f41c03b8,f043c858,f421ef00,1000,0) at _vnode_pager_input_old+0xf2
_vnode_pager_generic_getpages(f421ef00,f419cf18,1000,0,f419ce88) at _vnode_pager_generic_getpages+0xea
_coda_fbsd_getpages(f419ce6c) at _coda_fbsd_getpages+0x17
_vnode_pager_getpages(f41c03b8,f419cf18,1,0,f419cf58) at _vnode_pager_getpages+0x4e
_vm_pager_get_pages(f41c03b8,f419cf18,1,0) at _vm_pager_get_pages+0x1f
_vm_fault(f40b1800,201f7000,1,0,f40ad080) at _vm_fault+0x464
_trap_pfault(f419cfbc,1) at _trap_pfault+0xf6
_trap(27,27,26f1cc,0,567a60) at _trap+0x137
calltrap() at calltrap+0x1c

What is happening here is that coda_rdwr does a VFS_VGET to get a
vnode the hardway.  The vnode comes back locked (probably thru vget)
and is locked by the process "curproc" (cvsup in this case).  But
coda_rdwr needs to unlock the vnode.  It gets its process pointer
from the uio_procp field of the uio argument.  Well
vnode_pager_input_old sets this field to 0 ... not curproc!  Thus
the unlock fails with the panic above.

moral: vnode_pager_input_old gets called in a process context so it
should use curproc not 0 as its procp.

I fixed a different coda/related bug in vnode_pager_input_coda
earlier,  so if there are no major objections I will commit this
change Fri noon.  With the earlier bug (look in the "current" archives
for vnode_pager_input_old around Sep 28.), I determined that only 
coda used vnode_pager_input_old, so I don't expect this change to 
effect anyone besides Coda.

Vallo Kallaste <vallo@matti.ee> writes:

> Forrest Aldrich <forrie@forrie.com> wrote:
> 
> > Wondered about anyone's experience with CODA on FreeBSD-CURRENT.
> > I see that vinum and some other stuff is included in the source tree, but want
> > to find out more about people's experience  (good and bad) with these.  Are
> > they stable, etc.
> 
> I have tried CODA on current-elf machines.  One acts as server and 
> one as a client :-) , but my client machine crash everytime I run 
> cvsup on /coda mounted /usr/src.  As the cvsup crashes client 
> machine everytime, I mark coda as unstable for me and don't spend 
> any more time, althought it seems very interesting and suitable for 
> our needs.  Maybe I should try an aout version instead, because it's 
> better supported and tested ? Anyone knowledgeable ?
> 
> 
> Vallo Kallaste
> vallo@matti.ee
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-current" in the body of the message

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



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