Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Current panics



On Fri, Nov 20, 2009 at 09:57:01PM +0100, Manuel Bouyer wrote:
> On Fri, Nov 20, 2009 at 08:54:00PM +0300, Aleksej Saushev wrote:
> > > I can't see from where the _atomic_inc_32 could come from in
> > > vn_open(). Could you see what is the address of vn_open() in your kernel
> > > (nm /netbsd |grep vn_open should tell) ?
> > 
> > c0462e4d B vn_open
> > 
> > Is there any way to associate addresses to line numbers?
> 
> The only way I know is with gdb, but this needs a kernel compiled with -g.
> Here this would give:
> (gdb) l *(vn_open+320) 
> 0xc0665050 is in vn_open (/home/bouyer/HEAD/src/sys/kern/vfs_vnops.c:149).
> 144             if (fmode & O_CREAT) {
> 145                     ndp->ni_cnd.cn_nameiop = CREATE;
> 146                     ndp->ni_cnd.cn_flags |= LOCKPARENT | LOCKLEAF;
> 147                     if ((fmode & O_EXCL) == 0 &&
> 148                         ((fmode & O_NOFOLLOW) == 0))
> 149                             ndp->ni_cnd.cn_flags |= FOLLOW;
> 150             } else {
> 151                     ndp->ni_cnd.cn_nameiop = LOOKUP;
> 152                     ndp->ni_cnd.cn_flags |= LOCKLEAF;
> 153                     if ((fmode & O_NOFOLLOW) == 0)
> 
> So it doesn't make sense.
> Could you send me your kernel config file (if it's not GENERIC) ?

Wit the right kenrel config file I get:
(gdb) l *(vn_open+320)
0xc0462edd is in vn_open (/home/bouyer/HEAD/src/sys/kern/vfs_vnops.c:159).
154                             ndp->ni_cnd.cn_flags |= FOLLOW;
155             }
156     
157             VERIEXEC_PATH_GET(ndp->ni_dirp, ndp->ni_segflg, ndp->ni_dirp, 
path);
158     
159             error = namei(ndp);
160             if (error)
161                     goto out;
162     
163             vp = ndp->ni_vp;

So it could be in namei(). If you still have your netbsd.gdb around
could you confirm it (in my binary the address don't match exactly to
what you reported) ?

namei() does a VREF which is atomic_inc_uint(&vp->v_usecount).
I guess vp is NULL; extracting dmesg
from the core dump to get the fault address could confirm it.

Now I don't have much clues about how namei works, so I can't easily see if
something is wrong with vnode locking or reference count here.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index