Date: Wed, 12 Jun 1996 15:27:41 -0700 From: Josh MacDonald <jmacd@CS.Berkeley.EDU> To: "John S. Dyson" <toor@dyson.iquest.net> Cc: freebsd-hackers@freebsd.org Subject: Re: strange mmap programming bug Message-ID: <199606122227.PAA21366@paris.CS.Berkeley.EDU> In-Reply-To: Your message of "Wed, 12 Jun 1996 09:35:23 CDT." <199606121435.JAA01198@dyson.iquest.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> > > > I'm having this problem. I don't know if its only on FreeBSD or not, > > as I have only experienced it on FreeBSD and its hard to reproduce. > > > > Occasionally, when a program of mine exits abnormally, it seems that > > small files which were opened O_RDONLY and then mmaped are being > > modified. I am mmaping the entire file. I have only noticed this > > for files smaller than PAGESIZE. The file's length is changed to > > be exactly 4096 bytes with zero's padding the original data. > > > More questions: > What filesystems were you using? > How much paging was going on? > Were you ever doing ANY read/write style I/O > to that file? (even in another process.) > > Tell me all you can... There has been a problem > (that hasn'nt been seen in -current) with mmap. > If you can run -current, try that also. > > Thanks... > John Sorry for not providing enough information. This is on a UFS filesystem, SCSI, 1G Seagate 1080N. The machine is FreeBSD deceit.xcf.berkeley.edu 2.2-960323-SNAP FreeBSD 2.2-960323-SNAP #0: Mon May 6 19:57:34 PDT 1996 root@:/home3/2.2-960323-SNAP-src/sys/compile/DECEIT i386 The machine has one other local filesystem mounted which is also a SCSI disk. I don't know how much paging was going on, I have 32 megs of ram and the machine was not too loaded. The process may have been paging due to it basically mmaps each of a (possibly long--100 in this case) list of files to compute checksum and then replace RCS-style keywords. Thinking about it further, I guess the file may have been the last one open before forking an RCS CI command on the file. I don't know how RCS opens files. I will try to reproduce this again. -josh
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606122227.PAA21366>