cache_purge > cache_zap segmentation fault

Terry Lambert tlambert2 at mindspring.com
Fri May 9 07:44:29 PDT 2003


David Malone wrote:
> On Thu, May 08, 2003 at 07:54:10PM -0400, Ali Bahar wrote:
> > Considering its increasing frequency, I even suspected that the
> > filesystem had been corrupted -- in a way undetected by fsck. But, a
> > 'normal' filesystem corruption exhibits _random_ crashes, not ones
> > consistently following the above execution thread.
> 
> To me it seems very unlikely that a corrupted filesystem would
> result in a corrupted name cache. The name cache is independendent
> of the filesystem and is only populated as lookups in the filesystem
> code complete.

There are places in the FS that call directly into the name cache
to manage entries.  It's possible that free vnodes could be left
in the cache, but not references to the component name string.  So
for a limited set of situations, it's possible to corrupt the name
cache.  It's not possible to corrupt it the way that it's supposedly
being corrupted here, merely by having a broken FS, however.  The
worst case failure should be bogus vnode pointers for either the
file or directory.

This type of thing should be avoidable, if all name cache references
moved into the vfs_ layer instead,, and out of the FS.  This loses a
number of small optimizations, however.


> Is it possible that one of your modules is somehow stomping on
> memory that doesn't belong to it?

This is most likely.

-- Terry


More information about the freebsd-hackers mailing list