delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/07/07/04:46:19

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Wed, 7 Jul 2010 10:46:01 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Weird directories on Windows share when using rm to delete a directory
Message-ID: <20100707084601.GD22451@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4C2D0872 DOT 9080306 AT redhat DOT com> <AANLkTikhK10IDSpRQWXU3LD_Fll4lr3AzAVpm2rE1Ugz AT mail DOT gmail DOT com> <4C2D161C DOT 4090608 AT cygwin DOT com> <AANLkTilm753Nc34EKLOlfkOrqsWKNPh5vdrmbjrShDNw AT mail DOT gmail DOT com> <20100702144225 DOT GE8163 AT calimero DOT vinschen DOT de> <AANLkTinBrtrZe-YKqNWtdMVL0teYauVUr8qFoJ_XwmC9 AT mail DOT gmail DOT com> <20100702160651 DOT GF8163 AT calimero DOT vinschen DOT de> <AANLkTikfPRai2YXSiL_8LAVmdXkTkcIDzDVwkadz7sIa AT mail DOT gmail DOT com> <20100706080251 DOT GN6521 AT calimero DOT vinschen DOT de> <AANLkTilGSpy5z_wW_WEyWw-jCYE5Fkja7FKRRFPgB3uI AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <AANLkTilGSpy5z_wW_WEyWw-jCYE5Fkja7FKRRFPgB3uI@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 Jul  6 06:41, Slide wrote:
> On Tue, Jul 6, 2010 at 1:02 AM, Corinna Vinschen
> <corinna-cygwin AT cygwin DOT com> wrote:
> > On Jul  5 23:00, Slide wrote:
> >> <snip>
> >>
> >> > This funtionality wasn't available in 1.5, so, yes, this would only
> >> > have started with 1.7.
> >> >
> >> > So it seems that these netapp drives somehow don't understand the
> >> > entirely normal FileDispositionInformation method, or they ignore it for
> >> > some unknown reason.
> >> >
> >> > Unfortunately the strace from your OP isn't helpful since it
> >> > only contains the deletion of a single file.  What would help is
> >> > an strace of a rmdir or rm -rf(*) of a directory which then creates
> >> > one of those temporary directories.  There are lots of potential
> >> > debug messages wqhich might sched a light here.
> >> >
> >> >
> >> > Corinna
> >> >
> >> > (*) If possible with not more than a single file in the dir, so that
> >> >    the strace doesn't become too big.
> >> >
> >>
> >> The directory structure is like the following:
> >>
> >> //share/directory/path/to/dir/hammer.ba_
> >>
> >> Command is "rm -rf //share/directory/path/to/dir"
> >
> > Thanks.  The strace doesn't help, though.  The rmdir of foo works
> > without any problem, so not even a single debug output is generated.
> >
> > I have an idea or two what could be the problem of the netapp drive,
> > but that requires testing with a Cygwin DLL with enhanced debug output
> > in the unlink/rmdir functionality.
> >
> > Would you mind to play guinea pig if I send you the link to such a
> > DLL via PM?
> >
> >
> 
> 
> I'd love to play guinea pig if it will help get the issue resolved :-)

Thanks for your help.  This problem should be fixed now in CVS.
I switched off the entire mechanism which tries to resolve sharing
violations for netapp drives.

What happens is this:

The netapp drive is thoroughly confused when trying to move-and-delete
a file or directory using a single handle.  In case of directories it
moves the directories and the subsequent delete call returns success
without actually having succeeded.  In case of files, renaming the file
fails with "sharing violation" and the subsequent call for deletion
fails with "file has been moved" (I guess you see the confusion here).
Above all, when trying to remove a directory tree, after all files in a
directory have been removed, opening the directory with only the
FILE_SHARE_DELETE sharing flag set fails with a ... sharing violation.


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