Coda File System

venus assert failure after crash

From: Greg Troxel <gdt_at_ir.bbn.com>
Date: Sat, 07 Apr 2007 17:08:47 -0400
After an OS crash (due to mmap in kernel module hitting NetBSD uvm
asserts, I think due to containerfile-vnode/coda-vnode differing), venus
failed to start due to hitting an assertion.  I don't really understand,
but the fsobj in question appears to 'data.havedata == 0', but 'cf' has
a non-zero length.  The file 'cf.name' does not exist in venus.cache,
although similar names do.  So, the invariant that containerfile.length
is 0 at destructor time is clearly violated, but I couldn't figure out
how/why so I just did a reinit.   I think that perhaps the cachefile
pointer in data got cleared due to it not being present.

(gdb) bt
#0  0xbb9b606f in nanosleep () from /usr/lib/libc.so.12
#1  0xbba03529 in sleep () from /usr/lib/libc.so.12
#2  0x080c2f6e in coda_assert (pred=0x80ca301 "length == 0", 
    file=0x80ca2f0 "fso_cachefile.cc", line=79) at coda_assert.c:46
#3  0x0805d30b in ~CacheFile (this=0x52f1b4f4) at fso_cachefile.cc:79
#4  0x0805cb95 in ~fsobj (this=0x52f1b388) at fso1.cc:382
#5  0x0805cf6b in fsobj::GC (this=0x52f1b388) at fso1.cc:637
#6  0x080670fd in fsdb::GarbageCollect (this=0x53318a88) at fso_daemon.cc:179
#7  0x080672aa in fsdb::GetDown (this=0x53318a88) at fso_daemon.cc:192
#8  0x08067476 in FSODaemon () at fso_daemon.cc:105
#9  0x080962fd in VprocPreamble (arg=0x80f8b40) at vproc.cc:148
#10 0xbb9d7718 in swapcontext () from /usr/lib/libc.so.12
(gdb) fr 3
#3  0x0805d30b in ~CacheFile (this=0x52f1b4f4) at fso_cachefile.cc:79
(gdb) print *this
$14 = {length = 512, validdata = 512, refcnt = 1, name = "00/00/23/9B", 
  numopens = 0}
(gdb) up
#4  0x0805cb95 in ~fsobj (this=0x52f1b388) at fso1.cc:382
(gdb) print *this
$15 = {MagicNumber = 2687694, fid = {Realm = 1, Volume = 4278190081, Vnode = 1, 
    Unique = 1}, comp = 0x0, vol = 0x0, primary_handle = {next = 0x0}, 
  vol_handle = {next = 0x52f1b3a8, prev = 0x52f1b3a8}, prio_handle = {
    _vptr.bsnode = 0x0, mytree = 0x0, parent = 0x0, leftchild = 0x0, 
    rightchild = 0x0}, del_handle = {_vptr.dlink = 0x0, next = 0x0, prev = 0x0}, 
  owrite_handle = {_vptr.olink = 0x0, next = 0x0}, state = FsoDying, stat = {
    VnodeType = Directory, LinkCount = 2 '\002', Length = 2048, DataVersion = 1, 
    VV = {Versions = {Site0 = 0, Site1 = 0, Site2 = 0, Site3 = 0, Site4 = 0, 
        Site5 = 0, Site6 = 0, Site7 = 0}, StoreId = {Host = 4294967295, 
        Uniquifier = 0}, Flags = 0}, Date = 1175951706, Author = 4294967295, 
    Owner = 0, Mode = 365}, GotThisData = 0, RcRights = 0, AnyUser = {
    uid = 4294967295, rights = 0 '\0', inuse = 0, valid = 0}, SpecificUser = {{
      uid = 4294967295, rights = 0 '\0', inuse = 0, valid = 0}, {
      uid = 4294967295, rights = 0 '\0', inuse = 0, valid = 0}, {
      uid = 4294967295, rights = 0 '\0', inuse = 0, valid = 0}, {
      uid = 4294967295, rights = 0 '\0', inuse = 0, valid = 0}, {
      uid = 4294967295, rights = 0 '\0', inuse = 0, valid = 0}, {
      uid = 4294967295, rights = 0 '\0', inuse = 0, valid = 0}, {
      uid = 4294967295, rights = 0 '\0', inuse = 0, valid = 0}, {
      uid = 4294967295, rights = 0 '\0', inuse = 0, valid = 0}}, flags = {
    random = 31949, fake = 0, owrite = 0, dirty = 0, local = 1, ckmtpt = 0, 
    fetching = 0, expanded = 0, modified = 0, padding = 0}, 
  VenusSHA = '\0' <repeats 19 times>, mvstat = ROOT, u = {root = 0x0, 
    mtpoint = 0x0}, pfid = {Realm = 0, Volume = 0, Vnode = 0, Unique = 0}, 
  pfso = 0x0, children = 0x0, child_link = {_vptr.dlink = 0x80dace8, next = 0x0, 
    prev = 0x0}, priority = -1, HoardPri = 0, HoardVuid = 4294967294, 
  hdb_bindings = 0x0, FetchAllowed = 1, AskingAllowed = 0, mle_bindings = 0x0, 
  CleanStat = {Length = 4294967295, Date = 4294967295}, tSid = {Host = 0, 
    Uniquifier = 0}, shadow = 0x0, data = {havedata = 0, file = 0x0, dir = 0x0, 
    symlink = 0x0}, ix = 9115, cf = {length = 512, validdata = 512, refcnt = 1, 
    name = "00/00/23/9B", numopens = 0}, fso_sync = 0 '\0', readers = 0, 
  writers = 0, openers = 0, Writers = 0, Execers = 0, refcnt = 0, 
  lastresolved = 0}
(gdb) 
Received on 2007-04-07 17:11:20