AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20070109135139.7e026153@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:onstor-exch02.onstor.net
NSV:
SSH:
R:<larry.scheer@onstor.com>,<tim.gardner@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@onstor-exch02.onstor.net/INBOX	0	BB375AF679D4A34E9CA8DFA650E2B04E0A9465@onstor-exch02.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Tue, 9 Jan 2007 13:55:02 -0800
From: Andrew Sharp <andy.sharp@onstor.com>
To: "Larry Scheer" <larry.scheer@onstor.com>
Cc: Tim Gardner <tim.gardner@onstor.com>
Subject: Re: No simple solution
Message-ID: <20070109135502.3d09e2c7@ripper.onstor.net>
In-Reply-To: <BB375AF679D4A34E9CA8DFA650E2B04E0A9465@onstor-exch02.onstor.net>
References: <20070109101845.632e4947@ripper.onstor.net>
	<BB375AF679D4A34E9CA8DFA650E2B04E0A9465@onstor-exch02.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Larry,

Please try your test with the following patch applied to xinstall.c:

@@ -479,6 +479,7 @@
         * trash memory on big files.  This is really a minor hack, but it
         * wins some CPU back.  Sparse files need special treatment.
         */
+#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
        if (!sparse && size <= 8 * 1048576) {
                volatile size_t siz;
 
@@ -491,12 +492,14 @@
                siz = (size_t)size;
                if ((nw = write(to_fd, p, siz)) != siz) {
                        serrno = errno;
+                       (void) munmap(p, (size_t)size);
                        (void)unlink(to_name);
                        errx(EX_OSERR, "%s: %s",
                            to_name, strerror(nw > 0 ? EIO : serrno));
                }
                (void) munmap(p, (size_t)size);
        } else {
+#endif
                int sz, rem, isem = 1;
                struct stat sb;
 



On Tue, 9 Jan 2007 11:06:01 -0800 "Larry Scheer"
<larry.scheer@onstor.com> wrote:

> I should have included that in my previous email. My apologies for my
> thoughtlessness.
> Like all of openbsd source it is kept in an obvious place ;-)
> 
> openbsd/src/usr.bin/xinstall/xinstall.c
> 
> Yea, it took me a while to find it too.
> 
> Larry
> 
> 
> 
> -----Original Message-----
> From: Andrew Sharp [mailto:andy.sharp@onstor.com] 
> Sent: Tuesday, January 09, 2007 10:19 AM
> To: Tim Gardner
> Cc: Larry Scheer; Jay Michlin
> Subject: Re: No simple solution
> 
> Where are we keeping the source for install?  I can't find it under
> openbsd.  Or anywhere else.
> 
> a
> 
> On Mon, 8 Jan 2007 21:05:35 -0800 "Tim Gardner"
> <tim.gardner@onstor.com> wrote:
> 
> > Andy,
> >  
> > Please take a look at the source code for install.
> > Lets find out if it is using mmap. Also look at the code for cp. We
> > need to find out what is different. That will help us understand
> > what is causing the corruption. 
> > Tim
> >  
> > 
> > ________________________________
> > 
> > From: Larry Scheer
> > Sent: Mon 1/8/2007 7:32 PM
> > To: Jay Michlin; Andy Sharp; Tim Gardner
> > Cc: Larry Scheer
> > Subject: No simple solution
> > 
> > 
> > 
> > I downloaded, built, and installed the latest revision
> > of /usr/bin/install from OpenBSD 4.0. I started my test suites and I
> > am still seeing file corruption. (/usr/local/agile/lib/libucdmibs.so
> > for instance)
> > 
> > I am still seeing the corruption when running /usr/bin/install
> > standalone (in a script) or with our upgrade program.
> > 
> > I think this indicates it is something deep with BSD, perhaps in
> > libc?
> > 
> > I can provide a map of install so we can see all of the functions it
> > uses. If that would help.
> > 
> > Larry
> > 
> > 
> > 
