From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,aecdf76128cc1d90,start X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-06-18 19:25:20 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: jake.stoll@logicacmg.com (Jake Stoll) Newsgroups: comp.unix.tru64 Subject: Tru64 5.1a msync causes corrupt files (sometimes) Date: 18 Jun 2003 19:25:19 -0700 Organization: http://groups.google.com/ Message-ID: <369fc9fe.0306181825.697f79cd@posting.google.com> NNTP-Posting-Host: 203.111.1.70 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1055989520 5612 127.0.0.1 (19 Jun 2003 02:25:20 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 19 Jun 2003 02:25:20 GMT Xref: archiver1.google.com comp.unix.tru64:10077 Hi All, I've experienced a situation using the c function msync() where the function returns successfully but the file being mapped has been corrupted (file changed but extra bytes set to zero). This doesn't happen everytime it varies from 1 in 5 times to 2 out of 3 times. Has anyone seen this behaviour before? I've tried changing some(most) of the dynamic kernel options using the kernel tuner and recompiled the kernel with various options, tried the mapped file on advfs and ufs, applied the latest accumulative patch kit, searching for similar problems, to no avail... Am I sure that it's the msync() function? Yes. Using ladebug and confirming that what's in the mapped memory is ok, as soon as the msync function returns the file is either corrupt or good. What does the application do? In my test case (approximately); creates a private memory map of files A,B,C which are about 5MB in size modifies a couple of the private memory maps (e.g A & B) creates a shared memory map for A bcopy's the modified private map to the shared map for A msync shared map A munmap shared map A munmap private map A repeat for other modified private maps Any help, suggestions or comments would be greatly appreciated. Regards, Jake.