X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 13 Nov 2007 17:59:01 +0100 From: Thomas Baker To: cygwin AT cygwin DOT com Subject: Re: Reliable old script loses data on new Cygwin installation Message-ID: <20071113165901.GA2096@sub-tombaker> References: <20071111173033 DOT GA2360 AT sub-tombaker> <20071112090628 DOT GA3792 AT sub-tombaker> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.1i X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Mon, Nov 12, 2007 at 04:03:14AM -0600, René Berber wrote: > [snip] > > However, the other problem (see below) has occurred -- > > sporadically -- on three different machines, all running > > German or English-language versions of XP, two with SATA > > disks and one with an ATA disk, all with freshly downloaded > > installations of cygwin.[snip] > > OK, that's interesting, 3 machines one using non SATA disk. Same > irregular pattern of 10 to 20 runs without problem? I haven't run it enough to see clear patterns, but yes, the error occurs in an irregular manner. Since then I have tested this on a fourth machine -- my old machine, with newly installed XP and freshly downloaded Cywin but a slower hard disk -- and I get the same irregular errors there too! > No. The actual storage of data is done by the operating system, not by > Cygwin, the operating system provides the data even if it hasn't been > stored on disk (it could still be in a memory buffer). Okay, thank you for the explanation. > The speed is not the problem, it could be the usual suspect: an > anti-virus, unlikely because the data written is not executable but it > could be adding an extraneous delay between data written and data read. I'll ask the guy who installed the operating systems whether this looks possible. > The only solid evidence is the error message from Windows, and it says > "device", that means that the hard disk is having problems (it could be > the driver) but not your script or any program. Did you do anything > special to the hard disks on all 3 machines? something like run an > optimizer or tune parameters? I'll find out. > The other problem could be related to the first, if the disk is > "failing" then creating/moving a file will fail, I'm not sure if > "permission denied" will be the error message but I could test that > later (I can make my SATA disk fail using a program that allows the > async unbuffered I/O). The /bin/pdksh script sequence that is causing problems is: 1. gawk '$1 !~ /blahblah/' huh2 >|/tmp/shf2080.tmp (no error messages) 2. mv /tmp/shf2080.tmp huh2 mv: cannot create regular file `huh2': Permission denied 3. (some other commands in a looping construct) 4. gawk '$1 !~ /blahblah/' huh2 >|/tmp/shf2080.tmp gawk: cmd. line:1: fatal: cannot open file `huh2' for reading (No such file or directory) Sometimes the sequence runs correct. Sometimes it results in a file "huh2" with length "0". But the sequence has _sometimes_ resulted in the creation of files such as: - 2007-10-28 20:31 4010 german which _appear_ to have a length of 4010, but where "od german" shows: 0000000 000000 000000 000000 000000 000000 000000 000000 000000 * 0007640 000000 000000 000000 000000 000000 0007652 I'll get answers to the questions above... Tom Baker -- Tom Baker - tbaker AT tbaker DOT de - baker AT sub DOT uni-goettingen DOT de -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/