www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/08/18/09:38:38

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 18 Aug 2008 15:39:30 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Bug in cygcheck (1.7)
Message-ID: <20080818133930.GK21040@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <48A787F0 DOT 408 AT cwilson DOT fastmail DOT fm> <48A8188E DOT 4030203 AT elite-systems DOT org> <20080817165425 DOT GA3708 AT ednor DOT casa DOT cgf DOT cx> <48A85BA5 DOT 20501 AT cwilson DOT fastmail DOT fm> <48A8E552 DOT 3070803 AT cwilson DOT fastmail DOT fm> <20080818032220 DOT GA28914 AT ednor DOT casa DOT cgf DOT cx> <48A8F8A7 DOT 8080805 AT cwilson DOT fastmail DOT fm>
MIME-Version: 1.0
In-Reply-To: <48A8F8A7.8080805@cwilson.fastmail.fm>
User-Agent: Mutt/1.5.16 (2007-06-09)
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 Aug 18 00:20, Charles Wilson wrote:
> Christopher Faylor wrote:
> > Have you investigated the possibility that one of the package files
> > may be corrupted?
> 
> Not really -- but when I run cygcheck.exe under gdb, I get all the
> packages listed properly (when 'set arg -cd') -- so I really don't think
> that's it.

I can reproduce the problem 1 out of 3 or 4.  I also added some
additional debug output for a start:

  get_packages()
  [...]
    for (n = 0; fgets (buf, 4096, fp) && n < nlines;)
      {
	char *package = strtok (buf, " ");
	printf ("(%8ld) %-20s :: %-20s\n",
		ftell (fp), package ?: "<NULL>", argv[0]);
        [...]
      }
    printf ("finished\n");

And that's weird, when the problem occurs, ftell(fp) prints the
same offset into the file twice:

  [...]
  (     502) automake1.8          :: openssh
  (     545) automake1.9          :: openssh
  (     545) automake1.9          :: openssh

and then the next call to fgets() just pegs out.

The next test was not to call load_cygwin().  In this case, the problem
seems to disappear.  I can't reproduce it in 100s of calls.

Next, I call LoadLibrary ("cygwin1.dll") but none of the other
processing in load_cygwin().  Still no problem.

Next, enable the FreeLibrary call.  Now the problem reappears.

So it's the FreeLibrary call which triggers the problem.  What I don't
understand so far is, why it does.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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