NetBSD-Bugs archive

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

Re: kern/47739: tmpfs panic: kernel diagnostic assertion "(node)->tn_spec.tn_dir.tn_readdir_lastp == NULL..."



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

From: Thomas Klausner <wiz%NetBSD.org@localhost>
To: NetBSD bugtracking <gnats-bugs%NetBSD.org@localhost>
Cc: 
Subject: Re: kern/47739: tmpfs panic: kernel diagnostic assertion
 "(node)->tn_spec.tn_dir.tn_readdir_lastp == NULL..."
Date: Tue, 8 Oct 2013 00:34:07 +0200

 --IrhDeMKUP4DT/M7F
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Mon, Oct 07, 2013 at 07:42:23AM +0000, David Holland wrote:
 > On Thu, Aug 08, 2013 at 08:30:01PM +0000, Mindaugas Rasiukevicius wrote:
 >  >  >  Can someone please take a look?
 > 
 > almost certainly the same as 47480 (and 41068)
 > 
 >  >  >   Thomas
 >  >  
 >  >  Most likely this is due to tmpfs_dircookie() truncation here:
 >  >  
 >  >  http://nxr.netbsd.org/source/xref/src/sys/fs/tmpfs/tmpfs.h#88
 >  >  
 >  >  It is wrong and there are other PRs because of it.  Thomas, you can test
 >  >  this by replacing the function body with the following:
 >  >  
 >  >   return (off_t)(uintptr_t)de;
 >  >  
 >  >  This breaks linux32 compat, but we really just need to decide how we want
 >  >  to fix it (it would be good to avoid penalising the native code, but 
 > better
 >  >  to penalise than fail).
 > 
 > Four and a half years ago (in PR 41068) I asked why tmpfs does this
 > nonsense instead of just assigning sequence numbers to each node.
 > Nobody has ever managed to come up with a coherent justification, just
 > FUD.
 
 Thanks for taking a look.
 
 I've been using rmind's patch (attached) for some weeks now, and it
 has definitely reduced by bulk build panics.
 
 I still get them sometimes, so there must be a second problem.
  Thomas
 
 --IrhDeMKUP4DT/M7F
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="rmind.diff"
 
 Index: tmpfs.h
 ===================================================================
 RCS file: /cvsroot/src/sys/fs/tmpfs/tmpfs.h,v
 retrieving revision 1.45
 diff -u -r1.45 tmpfs.h
 --- tmpfs.h    27 Sep 2011 01:10:43 -0000      1.45
 +++ tmpfs.h    7 Oct 2013 22:32:14 -0000
 @@ -87,14 +87,7 @@
  static inline off_t
  tmpfs_dircookie(tmpfs_dirent_t *de)
  {
 -      off_t cookie;
 -
 -      cookie = ((off_t)(uintptr_t)de >> 1) & 0x7FFFFFFF;
 -      KASSERT(cookie != TMPFS_DIRCOOKIE_DOT);
 -      KASSERT(cookie != TMPFS_DIRCOOKIE_DOTDOT);
 -      KASSERT(cookie != TMPFS_DIRCOOKIE_EOF);
 -
 -      return cookie;
 +      return (off_t)(uintptr_t)de;
  }
  #endif
  
 
 --IrhDeMKUP4DT/M7F--
 


Home | Main Index | Thread Index | Old Index