[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Deleting trouble

From: John Peacock <jpeacock_at_rowman.com>
Date: 2003-12-12 15:26:45 CET

Lübbe Onken wrote:
> Now I wonder, if it's the scanner itself who is leaking the file handles
> or if it's Subversion, because of some interference by the scanner?!? I
> also wonder, why it's always the .svn/tmp directory and never anything
> else.

The way that virus scanners work in a Win32 environment is to hook into the
filesystem at a very low level. I would suspect the filehandle leakage is
actually in the virus scanner, because the way the hook works, the scanner has
to open the file before it can find out where the file was located and then
ignore it if it is not in one of the watched directories.

Any time files are created and destroyed in rapid succession (like the temporary
files in .svn/tmp), there is a significant risk that the following will happen:

1) Process A (svn) creates a temporary file
2) Process B (virus scanner) opens the file to scan it
3) Process A attempts to delete the temporary file
4) Process B blocks #3

There is already code in svn to retry certain operations under Win32 because of
this. The CVSNT project has also come up against this behavior and made similar
changes. Ultimately, it is poor design at the NTFS level, but all we can do is
work around it. Depending on the load on the system, the only acceptable way to
completely prevent the problem is to completely uninstall the virus scanner from
the server (subversion or CVSNT).

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Dec 12 15:27:02 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.