Re: Directory Ops Behaving Asynchronous
Fabian Schmied <[email protected]> Fri, 23 May 2008 18:11:49 +0200
| Newsgroups | gmane.comp.windows.devel.dotnet.clr |
|---|---|
| Message-ID | <[email protected]> |
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... > > =================================== > This list is hosted by DevelopMentor(R) http://www.develop.com > > View archives and manage your subscription(s) at http://discuss.develop.com > > =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com