Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jan 2005 13:43:26 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        Peter Holm <peter@holm.cc>
Cc:        current@FreeBSD.org
Subject:   Re: panic: proc not held @ fs/procfs/procfs_regs.c:60
Message-ID:  <200501131343.26286.jhb@FreeBSD.org>
In-Reply-To: <20050113114939.GA79046@peter.osted.lan>
References:  <20050109214454.GA60018@peter.osted.lan> <200501121503.29257.jhb@FreeBSD.org> <20050113114939.GA79046@peter.osted.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 13 January 2005 06:49 am, Peter Holm wrote:
> On Wed, Jan 12, 2005 at 03:03:29PM -0500, John Baldwin wrote:
> > On Sunday 09 January 2005 04:44 pm, Peter Holm wrote:
> > > With GENERIC HEAD from Jan 8 08:45 UTC I got:
> > >
> > > panic(c0826351,c0826973,c082fcfc,3,c175a2e0) at panic+0xd8
> > > procfs_doprocregs(c175a2e0,c1b1b5e8,c1665d80,0,ce778c90) at
> > > procfs_doprocregs+0x10a pfs_read(ce778c1c,20000,c1f19e04,c08294ba,845)
> > > at pfs_read+0x20f
> > > vn_read(c1b17ae4,ce778c90,c1a9c080,0,c175a2e0) at vn_read+0x1b9
> > > dofileread(8,bfbfea50,4c,ffffffff,ffffffff) at dofileread+0x82
> > > read(c175a2e0,ce778d14,3,1,282) at read+0x44
> > > syscall(2f,2f,2f,8059f48,a7c) at syscall+0x128
> > >
> > > Details at http://www.holm.cc/stress/log/cons105.html
> >
> > Hmm, looking at procfs_doprocregs() I'm not sure how it could lose the
> > proc lock.  The assertion must be in one of the PROC_UNLOCK().  Can you
> > do a listing of the procfs_doprocregs() frame to see where it died?
>
> No, sorry. I seem to have fumbled the backup of the tree before I
> did an update :-(
>
> But isn't the panic in this code:
>
> procfs_regs.c, Revision 1.29.2.1
> 1.24      jhb        59:        PROC_LOCK(p);
> 1.29.2.1! das        60:        KASSERT(p->p_lock > 0, ("proc not held"));

Ah, doh.  Too many different locks around. :(  Weird, pfs_read() does a _PHOLD 
and PRELE around calling procfs_doprocregs(), so I'm not sure how this 
happened.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



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