[erlang-bugs] Concurrent file access on Windows

Stein, Martin martin.stein@REDACTED
Tue Mar 11 15:27:39 CET 2008


There is a tool that shows each file access in Windows available from
Sysinternals (File Monitor and Process Monitor). Each file operation is
traced. This should show the concurrent accesses.

http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx 

http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx





>>>>>>>>>>>> Quote:
The problem might be concurrent access by some other interfering
program.
I believe (someone correct me if I'm wrong) that under Windows, the
default
way of opening files for reading is exclusive (yes, even for read-only).
This way, programs such as virus checkers and other things that traverse
your file system for one reason or another (notably TortoiseSVN), can
occasionally happen to prevent you from performing an operation even on
a file that you just created and nobody is supposed to know about yet.

I'm not 100% sure that this is really what is happening, but it's our
best
hypothesis so far. We often see spurious failures when unzipping
archives
with loads of files, or sometimes when checking out big source trees
from
the repository. Only in Windows(TM). Oh, joy!

    /Richard

PS. What seems to be happening with unzip is this: unzip creates the
file
and populates it from the archive data, then closes it again. Then, as a
separate operation it wants to set the timestamp to whatever it was in
the
archive. But, meanwhile, some greedy program is already checking out the
new
file, and we get error reports stating that the date could not be set.
Gah!




More information about the erlang-bugs mailing list