lockmgr: non-zero exclusive count (was Re: **HEADS UP** FreeBSD-5 boot code has been committed)

YONETANI Tomokazu qhwt at myrealbox.com
Sat Nov 15 19:22:11 PST 2003


On Sat, Nov 15, 2003 at 10:31:24AM -0800, Matthew Dillon wrote:
> :On Sat, Nov 15, 2003 at 03:32:26PM +0900, YONETANI Tomokazu wrote:
> :> However, the new kernel doesn't survive make -j2 buildworld:
> :> 
> :>   lockmgr: non-zero exclusive count
> :
> :Ok, if I back out src/sys/vfs/ufs/ufs_ihash.c,1.8, make -j2 buildworld
> :finished. My /tmp and /usr/obj are null-mounted from /var, so I suppose
> :ufs_ihash.c,1.8 doesn't work well with null-mounted filesystem.
> :
> :> > sorry, I couldn't get the exact panic message because the
> :> > syncing disk message didn't complete; also tried dropping into
> :> > DDB, but the trace command only showed two lines, and the last one
> :> > is 'col_conv.342' again. I also noticed some weird messages appeared
> :> > while doing buildworld:
> :> > 
> :> >   nm: could not exec elf/nm in /usr/obj/home/source/dragonfly/sr: No such file or directory
> :
> :This seems to be a separate problem. I'm going to dig into this.
> 
>     Ok, I'm an Id*ot.  Try that rev but add a vdrop() just before the
>     return (vp);
> 
> 	vp = ITOV(ip);
> 	vhold(vp);
> 	lwkt_gettoken(&vp->v_interlock);
> 	if (lwkt_gentoken(&ufs_ihash_token, &gen) != 0) {
> 		lwkt_reltoken(&vp->v_interlock);
> 		vdrop(vp);
> 		goto loop;
> 	}
> 	if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td)) {
> 		vdrop(vp);
> 		lwkt_gentoken(&ufs_ihash_token, &gen);
> 		goto loop;
> 	}
> 	if (lwkt_reltoken(&ufs_ihash_token) != gen) {
> 		vdrop(vp);
> 		vput(vp);
> 		gen = lwkt_gettoken(&ufs_ihash_token);
> 		goto loop;
> 	}
> 	vdrop(vp);		<<<<<<<<<<<<<<<<<<<<<< add me
> 	return (vp);
> 
>     It's an aweful hack.  I need to redo the interlock stuff.
>     Actually, I need to scrap the interlock stuff.
> 
>     Please tell me if the added vdrop() works.

Yes, the new kernel with added vdrop() survived make -j3 buildworld,
so I think it's OK now. Thanks.





More information about the Bugs mailing list