Re: Directory Ops Behaving Asynchronous

"Ryan Rinaldi (TT)" <[email protected]> Fri, 23 May 2008 11:41:53 -0500
Newsgroups gmane.comp.windows.devel.dotnet.clr
Message-ID <8300EE53FE0B104391E0983F3AA8FA1F0421EE58@chiex01>
Could it be some sort of race condition with write-behind caching?

-----Original Message-----
From: Discussion of development on the .NET platform using any managed
language [mailto:[email protected]] On Behalf Of Fabian
Schmied
Sent: Friday, May 23, 2008 11:12 AM
To: [email protected]
Subject: Re: [DOTNET-CLR] Directory Ops Behaving Asynchronous

I'm seeing the same problem every once in a while when running a high
number of automated tests (NUnit 2.2 or 2.4 in this case) with each
test deleting and re-creating a directory: sometimes, directory
creation fails immediately after the original was deleted. The IO
exception claims that the old directory still exists. Everything is
strictly sequential, no multithreading going on. The directory is a
perfectly ordinary NTFS folder on a local hard drive (with RAID
mirroring). And it happens on different PCs, so it's likely not a
hardware issue.

It's not reproducible at all, so it's hard to find the cause of the
issue (file system, virus scanner, .NET, ...). In fact, we decided to
just work around this issue by running a short while-Directory.Exists
loop after the delete operation, spinning until the directory is
really gone. This "solves" the issue for our test suite, although a
deeper explanation would be nice, of course.

Fabian


On 5/20/08, Peter Ritchie
<[email protected]> wrote:
> I'm unable to reproduce too ,in 10,000 iterations performing the
actions
> you've described (except the database update).  Can you provide the
> details of the exception?
>
> Do you have an anti-virus programming running?  What happens if you
turn
> it off?
>
> If there truly is no other threads or processes that are deleting that
> directory, I can't think of anything else that could cause that.
>
> Is the directory a sub-directory of a shared directory?  I once
> encountered someone with mysterious disappearing files because he had
> shared the directory and a user on another computer was performing
> housekeeping on what they thought was a local drive.  But, about 1 in
20
> seems a little too regular for that...
>
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> This list is hosted by DevelopMentor(R)  http://www.develop.com
>
> View archives and manage your subscription(s) at
http://discuss.develop.com
>
>

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This list is hosted by DevelopMentor(r)  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This list is hosted by DevelopMentor=AE  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com