delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/07/30/10:44:49

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Wed, 30 Jul 2008 16:44:12 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: opendir/readdir failure on non-Samba Unix-hosted remote volumess
Message-ID: <20080730144412.GA7319@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <2870 DOT 139 DOT 153 DOT 254 DOT 191 DOT 1217245935 DOT squirrel AT www DOT cs DOT stir DOT ac DOT uk> <20080728123114 DOT GM29031 AT calimero DOT vinschen DOT de> <1399 DOT 139 DOT 153 DOT 254 DOT 191 DOT 1217336060 DOT squirrel AT www DOT cs DOT stir DOT ac DOT uk> <20080729134843 DOT GY29031 AT calimero DOT vinschen DOT de> <2536 DOT 139 DOT 153 DOT 254 DOT 191 DOT 1217343309 DOT squirrel AT www DOT cs DOT stir DOT ac DOT uk> <20080729151626 DOT GF29031 AT calimero DOT vinschen DOT de> <1451 DOT 139 DOT 153 DOT 254 DOT 191 DOT 1217426437 DOT squirrel AT www DOT cs DOT stir DOT ac DOT uk>
MIME-Version: 1.0
In-Reply-To: <1451.139.153.254.191.1217426437.squirrel@www.cs.stir.ac.uk>
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 Jul 30 15:00, Sam Nelson wrote:
> On Tue, July 29, 2008 16:16, Corinna Vinschen wrote:
> > Here's one additional test I'd like to ask you to do for the sake of
> > Cygwin 1.7.  Please replace the FileBothDirectoryInformation with
> > FileDirectoryInformation and strace it again.  You'll suffer the crash,
> > but until then, does the NtQueryDirectoryFile return successfully?
> 
> Set up like this, `ls' seems to be able to read directories (readdir
> returns 0) but seems to have some sort of character-set disagreement with
> the far end, with the result that the `strace' output becomes incredibly
> messy when the `lstat' calls fail on files whose names appear to consist
> of the right number of `?' for their length.  At the end of the directory,
> I see
> 
> ---------------------------------------------------------------
>    57  108833 [main] ls 4200 fhandler_disk_file::readdir:
> NtQueryDirectoryFile failed, status 0x80000006, win32 error 18
>    49  108882 [main] ls 4200 geterrno_from_win_error: windows error 18 ==
> errno 89
> ---------------------------------------------------------------
> 
> which looks reasonable (ENMFILE, `No more files', is it?) to me.
> 
> I don't see anything from `NtQueryDirectoryFile' until the report above.
> 
> So, the upshot appears to be that `FileIDBothDirectoryInformation' doesn't
> work at all, `FileBothDirectoryInformation' works, and
> `FileDirectoryInformation' is somewhere in between, but not in a useful
> way.  Is that what you wanted to discover, or did I miss the point?

That's what I wanted to see.  I expected a crash but apparently you
were lucky :)  The messy stuff you see is because the subsequent code
in Cygwin still assumes that structures of type FileBothDirectoryInformation
are returned.  It scrambles the filenames because the filename length and
string pointer are incorrect for that reason.  The test should only show
that FileDirectoryInformation doesn't make any problems becasue Cygwin 1.7
will use FileDirectoryInformation rather than FileBothDirectoryInformation.

> In user-operations terms, I now seem to have a situation I can deal with,
> in that I have a latest-release version of `cygwin1.dll' that local users
> can work with, and for the moment at least I have the means to tweak and
> build any subsequent releases.

There will be no more release before Cygwin 1.7.  I'm going to apply a 
patch to Cygwin 1.7.  For testing purposes you should try the *next*
snapshot (not the current one) from http://cygwin.com/snapshots/, or
build Cygwin from CVS HEAD and see if it solves the problem for you.
If you get a warning due to a missing /etc/fstab file, that's expected.


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