contemporary -current panic: locking against myself

Dmitry Morozovsky marck at rinet.ru
Sat Aug 4 05:44:35 UTC 2007


On Fri, 3 Aug 2007, Dmitry Morozovsky wrote:

DM> PJD> Here you can find two patches, which may or may not fix your problem.
DM> PJD> The first one is actually only to improve debug.
DM> PJD> 
DM> PJD> This patch adds all vnode flags to the output, because I believe you
DM> PJD> have VI_OWEINACT set, but not printed:
DM> PJD> 
DM> PJD> 	http://people.freebsd.org/~pjd/patches/vfs_subr.c.4.patch
DM> PJD> 
DM> PJD> The problem here is that vm_object_reference() calls vget() without any
DM> PJD> lock flag and vget() locks vnode exclusively when the VI_OWEINACT flag
DM> PJD> is set. vget() should probably be fixed too, but jeff@ opinion is that
DM> PJD> it shouldn't happen in this case, so this may be tmpfs bug.
DM> PJD> 
DM> PJD> The patch below fixes some locking problems in tmpfs:
DM> PJD> 
DM> PJD> 	http://people.freebsd.org/~pjd/patches/tmpfs.patch
DM> PJD> 
DM> PJD> The problems are:
DM> PJD> - tmpfs_root() should honour 'flags' argument, and not always lock the
DM> PJD>   vnode exclusively,
DM> PJD> - tmpfs_lookup() should lock vnode using cnp->cn_lkflags, and not always
DM> PJD>   do it exclusively,
DM> PJD> - in ".." case when we unlock directory vnode to avoid deadlock, we
DM> PJD>   should relock it using the same type of lock it was locked before and
DM> PJD>   not always relock it exclusively,
DM> PJD> 
DM> PJD> Note, that this patch wasn't even compiled tested.
DM> 
DM> Well, it at least compiled and booted on i386. Test release run is in progress 
DM> now, i'll followup with the results.

Good news: 

It fills 4G of RAM + 2G of swap, bailed out but not paniced. If the error is 
not fixed, it at least well masked now. Please consider your patch for commit.

Thanks!

Sincerely,
D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer:				      marck at FreeBSD.org ]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck at rinet.ru ***
------------------------------------------------------------------------


More information about the freebsd-current mailing list