www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/12/01/11:14:08

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 1 Dec 2009 17:13:41 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Issues with find in /proc
Message-ID: <20091201161341.GA8059@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <2bf229d30912010331l7f041692ld4ed231a8b3edbf4 AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <2bf229d30912010331l7f041692ld4ed231a8b3edbf4@mail.gmail.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
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 Dec  1 06:31, Chris Sutcliffe wrote:
> Hi All,
> 
> I'm not sure if this is expected behaviour or not, but I've noticed
> the following:
> 
> csutclif AT EUSH000065 /proc
> $ find .
> .
> ./loadavg
> ./meminfo
> ./registry
> find: `./registry': Bad file descriptor

This is a bug in Cygwin.  It misses to set a certain flag for the
/proc/registry{32,64} directory itself.

> ./4080/fd/5
> assertion "ent->fts_info == FTS_NSOK || state.type != 0" failed: file
> "/usr/src/findutils-4.5.4-1/src/findutils-4.5.4/find/ftsfind.c", line
> 475, function: consider_visiting
> Aborted (core dumped)

This one appears to be a bug in find.  It looks like it's using its own
version of the fts(3) functions.  AFAICS, what happens is that find uses
fstatat(fd = "/proc/$PID/fd", name="6") in the first place.  This
returns with ENOENT since the descriptor 6 disappeared in the meantime.
That should be fine for find, but for some reason the next what happens
is that it calls lstat("6").  The problem here is that the current
working directory is /proc, which does not contain a file called "6" and
that in turn results in the assertion.

Eric, could you have a look into that, please?


Corinna

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

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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