delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/11/13/11:59:28

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 <tbaker AT tbaker DOT de>
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> <fh7ppg$uaa$1 AT ger DOT gmane DOT org> <20071112090628 DOT GA3792 AT sub-tombaker> <fh98d3$ded$1 AT ger DOT gmane DOT org>
Mime-Version: 1.0
In-Reply-To: <fh98d3$ded$1@ger.gmane.org>
User-Agent: Mutt/1.4.2.1i
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019