mmap/read inconsistency
Nickolai Zeldovich
kolya at mit.edu
Thu May 17 03:12:31 CEST 2001
One of my users seems to have triggered a bug in arla whereby
mmap gives an old copy of the file (padded with zeroes at the
end), but stat() gives the correct (up-to-date) size, and using
read() also gives the new contents. This is arla-0-35-branch,
from Apr 17th, running on FreeBSD 4.2-STABLE.
If anyone is interested in looking at this bug, I've placed the
two test programs that try to read the file, one using mmap()
and other using read(), in /afs/zepa.net/user/kolya/arla/mmap-bug.
Also, "log-mmap" is the output from "fs xfsdeb almost-all ; fs
arladeb almost-all" and running the mmap() program, and "log-read"
is the same for the read() program.
-- kolya
More information about the Arla-drinkers
mailing list