delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/07/29/09:47:52

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 29 Jul 2008 15:48:43 +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: <20080729134843.GY29031@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>
MIME-Version: 1.0
In-Reply-To: <1399.139.153.254.191.1217336060.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 29 13:54, Sam Nelson wrote:
> On Mon, July 28, 2008 13:31, Corinna Vinschen wrote:
> >   and right in front of the comment starting in line 1713 in
> >   fhandler_disk_file.cc add
> >
> >     if (!NT_SUCCESS (status))
> >       debug_printf ("NtQueryDirectoryFile failed, status %p, win32 error
> > %lu",
> > 		    status, RtlNtStatusToDosError (status));
> >
> >   Add the same lines preceeding the closing brace in line 1728.
> 
> OK, did that.  With the `augmented' cygwin1.dll in place, my `strace ls'
> now says (excerpted):
> 
> --------------------------------------------------------------------
>  1481  230803 [main] ls 5132 path_conv::check: this->path(h:\), has_acls(0)
>   562  231365 [main] ls 5132 build_fh_pc: fh 0x61168D40
>  7242  238607 [main] ls 5132 fhandler_disk_file::opendir: 0x6857F0 =
> opendir (/cygdrive/h)
>   934  239541 [main] ls 5132 fhandler_disk_file::readdir:
> NtQueryDirectoryFile failed, status 0xC00000BB, win32 error 50
>   526  240067 [main] ls 5132 fhandler_disk_file::readdir:
> NtQueryDirectoryFile failed, status 0xC00000BB, win32 error 50

That's weird.  None of the calls work and the status code is actually
STATUS_NOT_SUPPORTED.  That's ... weird.  I have no idea what to think
about this.  At least the FileBothDirectoryInformation info class is
really old and exists since at least NT 4 times.

Here's a question:  Does TAS have a client side component?  Do you
have to install a driver or something?  Or does it work transparently
like Samba?

> and is otherwise as before, as far as I can tell.  I trust that was
> required?  I haven't tried running against a snapshot build yet, as
> suggested in your later response.

That might not change anything.  The problem here is to figure out what
the underlying problem is and then how to workaround it.  I don't know
how much time you want to invest, but if you want to, you will have to
dig deeper:

- First of all, disable setting dir->__flags |= dirent_get_d_ino in
  fhandler_disk_file::opendir at line 1570.  This disables the
  FileIdBothDirectoryInformation call entirely, so only the
  FileBothDirectoryInformation call is left.

  Try again.  Still status 0xC00000BB?  Bummer.

  Keep dirent_get_d_ino disabled so you can concentrate on a single
  NtQueryDirectoryFile call, the second one.

- Replace FileBothDirectoryInformation with FileDirectoryInformation.
  The readdir call will crash now at one point, but if you call
  `strace ls' from cmd.exe, you get at least one of the above debug
  strings.  Still status 0xC00000BB?  Try FileNamesInformation  Still?

- Change the ninth parameter to NtQueryDirectoryFile from FALSE to TRUE.
  Try again.  Still?  Try in combination with the different info classes.

- Change the NtOpenFile call in fhandler_disk_file::opendir to
  use GENERIC_READ instead of FILE_LIST_DIRECTORY.

- Remove the FILE_OPEN_FOR_BACKUP_INTENT from NtOpenFile.

- Still?  Then we're probably stuck if you can't get help from the
  TAS guys.


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