Help with filing a [maybe] ZFS/mmap bug.

George Hartzell hartzell at alerce.com
Thu Jul 18 18:40:53 UTC 2013


Richard Todd writes:
 > George Hartzell <hartzell at alerce.com> writes:
 > 
 > > Hi All,
 > >
 > > I have what I think is a ZFS related bug.
 > > [...]
 >
 > [summary: Picard seems to trigger an mmap consistency bug in ZFS].
 > 
 > [...]
 > Anyway, what I'd suggest is the following: see if my patch for py-mutagen
 > disabling the mmap() in those two functions lets you run picard reliably.

Removing the mmap support from those two routines seems to avoid the
issue.

 > If so, then the issue is triggered by one or both of those two routines;
 > hack them to print out the exact offsets used on each call and use that to 
 > try and code up a simple C++ test case.  
 > [...]

Your test case doesn't use mmap, I assume that you've offered it up as
a hint, not as something that's nearly done.  The shell script in
particular seems useful.

In my case I'd want to find a particular set of file size, offset, and
insertion size that triggers the problem and code up a c/c++ equiv. of
the mmap calls that py-mutagen does.  Right?

I'm hesistant about that.  I believe (and will try to prove) that the
problem does not occur deterministically for a particular track
between different test runs.  I'm worried that it's not as simple as
"using mmap to insert 27 bytes into a 1024 bytes file at pos 42 causes
corruption" but rather that it depends on a more complex set of
interactions.

My next step will be to see if a track that has trouble in one run has
trouble in another.  If not, then I'm not sure that a simple test will
be successful.

g.


More information about the freebsd-stable mailing list