NetBSD-Bugs archive

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

Re: kern/46053: Diagnostic assertion failed in uvm/uvm_vnode.c



The following reply was made to PR kern/46053; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/46053: Diagnostic assertion failed in uvm/uvm_vnode.c
Date: Sun, 18 Mar 2012 16:52:20 +0000

 On Sun, Feb 19, 2012 at 03:05:04PM +0000, Hauke Fath wrote:
  >  [root@venediger] ~ # panic: Feb 19 14:47:42 kernel diagnostic assertion
  >  "oldsize != VSIiZfrEeNOe:TS EdeT v| =|  0pxg1en3d07 >,  oilndo s=iz e4"14
  >  6f0ai62l0e,d : ffsi =l e
  >  public/netbsd-6/sys/uvm/uvm_vnode.c", line 350
 
 For the record, that's the beginning of the "freeing free inode"
 message overlaid with the "oldsize != VSIZENOTSET || pgend > oldsize"
 UVM assertion.
 
 "freeing free inode" is almost always caused by fs corruption. If
 you're getting repeated fs corruption, fscking once in a while before
 it becomes lethal may both keep the system running and help to track
 down what's wrong.
 
 The UVM assertion looks strange to me:
 
    oldsize = vp->v_writesize;
    KASSERT(oldsize != VSIZENOTSET || pgend > oldsize);
 
    if (oldsize > pgend) {
 
 so, we assert that either oldsize is not VSIZENOTSET, or if it *is*
 VSIZENOTSET, that pgend > VSIZENOTSET. Since VSIZENOTSET is
 (voff_t)-1, and voff_t is signed, it seems like this can only fail if
 the new size passed in is negative... and less than -4096, since pgend
 is round_page(newsize) and round_page(-1) will produce 0. That seems
 very weird.
 
 It's also a crazy thing to be asserting, and a crazy way to assert
 that newsize isn't negative, so I'm thinking it's probably just wrong
 and something else must have been intended. But maybe I'm missing
 something...
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index