[OpenAFS-devel] kernel debug info for iput issue...
Neulinger, Nathan
nneul@umr.edu
Mon, 16 Apr 2001 09:48:51 -0500
I added some debug tracing to afs/LINUX/osi_misc.c and afs/LINUX/osi_vfs.h.
I've determined that it occurs when loading the root page for that server.
It increases by approximately 9-12 each time that page is loaded. Simply
killing and restarting the web server increases it by 1 or 2.
i_count for 0xd0340a28/1831075970 at ../afs/afs_vcache.c:2374 is 117
i_count++ for 0xd0340a28/1831075970 at ../afs/afs_vcache.c:2374 now 118
that's osi_vnhold in FindVCache
i_count for 0xd0340a28/1831010434 at ../afs/afs_osidnlc.c:246 is 118
i_count++ for 0xd0340a28/1831010434 at ../afs/afs_osidnlc.c:246 now 119
tvc->mvstat = 2 in afs_vnop_lookup
osi_iput: i_count for 0xd0340a28/1831010434 at ../afs/osi_misc.c:352, is 119
i_count for 0xd0340a28/1831010434 at ../afs/osi_misc.c:377, is 119
i_count-- for 0xd0340a28/1831010434 at ../afs/osi_misc.c:380, now 118
That's osi_iput called from osi_dnlc_lookup called from afs_vnop_lookup
i_count for 0xd0340a28/1831010434 at ../afs/afs_vcache.c:2374 is 118
i_count++ for 0xd0340a28/1831010434 at ../afs/afs_vcache.c:2374 now 119
i_count for 0xd0340a28/1831075970 at ../afs/afs_osidnlc.c:246 is 119
i_count++ for 0xd0340a28/1831075970 at ../afs/afs_osidnlc.c:246 now 120
It sure looks to me like the reference obtained by FindVCache is being lost.
Both FindVCache and osi_dncl_lookup are incrementing the reference count,
yet osi_iput is only being called after the afs_vnop_lookup and never
cancelling out the reference from FindVCache.
For other inodes (stripped from above output) it looks fine. I typically see
a FindVCache for those, shortly followed by an osi_iput that decrements the
refcount.
Look at this from VNOPS/afs_vnop_lookup.c
*avcp = tvc; /* maybe wasn't initialized, but it is now */
#ifdef AFS_LINUX22_ENV
if (tvc) {
if (tvc->mvstat == 2) { /* we don't trust the dnlc for root vcaches */
AFS_RELE(tvc);
*avcp = 0;
}
else {
code = 0;
hit = 1;
goto done;
}
}
#else /* non - LINUX */
That release is definately taking place...
-- Nathan
------------------------------------------------------------
Nathan Neulinger EMail: nneul@umr.edu
University of Missouri - Rolla Phone: (573) 341-4841
Computing Services Fax: (573) 341-4216