Single 512-byte write to file taking 5-10 minutes

Single 512-byte write to file taking 5-10 minutes

Post by Slava M. U » Thu, 29 Jun 2006 09:50:37



Do you have any AV or security software on that system? Is there a minimal
file size for this behaviour? What kind of data do you write?

S
 
 
 

Single 512-byte write to file taking 5-10 minutes

Post by Scherbina » Thu, 29 Jun 2006 16:31:36

lava gave right directiong, do you have any AV installed? Seems like 3rd
party software is hooking file management api...

--
Vladimir

< XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...



 
 
 

Single 512-byte write to file taking 5-10 minutes

Post by Phil » Fri, 30 Jun 2006 06:13:32


We are running AVG anti-virus. It is configured to not scan the types of
files my program is accessing. The FileMon trace shows no activity by AVG
during the problem period.


Binary data organized in 512-byte blocks.

The strangest part of all of this is that FileMon shows a sequential read
through the entire file in 64 KB chunks during the write is hung. It's as
if Windws file system decided to scan the whole file for some reason. And,
as I said in my last message, killing my application through the Windows
task manager does not stop the disk scan until it reaches the end of the
file.
 
 
 

Single 512-byte write to file taking 5-10 minutes

Post by Phil » Fri, 30 Jun 2006 06:17:08


On 28-Jun-2006, "Scherbina Vladimir" < XXXX@XXXXX.COM >



We have AVG anti-virus installed, but it is configured not to scan the types
of files my application is accessing. FileMon shows no activity by AVG
during the problem period. It says my program is doing reads, but I know
from trace logs that my application is waiting for the write to finish while
the scan is taking place.
 
 
 

Single 512-byte write to file taking 5-10 minutes

Post by Slava M. U » Fri, 30 Jun 2006 07:03:23


I suggest that you test your application on a clean XP system.

S
 
 
 

Single 512-byte write to file taking 5-10 minutes

Post by Eugene Ger » Fri, 30 Jun 2006 15:13:22


Don't beleive the checkboxes you see in the GUI. All they do is (maybe) to
prevent the AV from *looking for viruses*. It probably still handles each
piece of IO internally. Same applies for "disabling" AV.
As Slava said either uninstall the AV or even better test on a ***
machine.


Why should it? It is *your* application that initiates I/O while AV simply
*intercepts* it.


Precisely.

Note that the particular AV you are using may not be the guilty party here.
Anything that installs kernel mode intercepts is a suspect. Test on a clean
machine.

--
Eugene
http://www.yqcomputer.com/
 
 
 

Single 512-byte write to file taking 5-10 minutes

Post by Phil » Fri, 30 Jun 2006 23:52:31

The problem turned out to be AVG anti-virus scanning the file. There were
several aspects of the problem that made is confusing.

1. The files having the problem had the extension mpdwhich is something
I came up with. AVG shows a list of potentially nfectablefiles that it
scans, and mpd is not in that list.

2. I was under the belief that anti-virus programs did their real-time scans
of files at the time that a file was closed after being created or modified.
I had no idea that they would take control of a file and scan it while
another program had it open and was actively reading and writing to it.

3. The FileMon utility did not show any activity from any of the AVG
components while the file scan was taking place. I now assume that AVG must
install some sort of driver that hooks into Windows so that the scanning is
associated with Windows and my application rather than their components.

After receiving several suggestions that the problem was connected to
anti-virus scanning, I tried turning off the real-time protection component
of AVG by unchecking the appropriate box. That did _not_ solve the problem.

I then decided to try changing the types of the files. When I used Windows
Explorer to rename one of the files from .mpd to another extension which I
know to be safe, a full file scan took place during the rename operation,
causing Windows Explorer to hang for about 10 minutes. At that point I knew
I was on to something.

I have now modified my program to use different file extensions, and the
problem is solved.

Thank you for your help and suggestions.
 
 
 

Single 512-byte write to file taking 5-10 minutes

Post by Phil » Fri, 30 Jun 2006 23:53:22


The problem turned out to be AVG anti-virus scanning the file. There were
several aspects of the problem that made is confusing.

1. The files having the problem had the extension mpdwhich is something
I came up with. AVG shows a list of potentially nfectablefiles that it
scans, and mpd is not in that list.

2. I was under the belief that anti-virus programs did their real-time scans
of files at the time that a file was closed after being created or modified.
I had no idea that they would take control of a file and scan it while
another program had it open and was actively reading and writing to it.

3. The FileMon utility did not show any activity from any of the AVG
components while the file scan was taking place. I now assume that AVG must
install some sort of driver that hooks into Windows so that the scanning is
associated with Windows and my application rather than their components.

After receiving several suggestions that the problem was connected to
anti-virus scanning, I tried turning off the real-time protection component
of AVG by unchecking the appropriate box. That did _not_ solve the problem.

I then decided to try changing the types of the files. When I used Windows
Explorer to rename one of the files from .mpd to another extension which I
know to be safe, a full file scan took place during the rename operation,
causing Windows Explorer to hang for about 10 minutes. At that point I knew
I was on to something.

I have now modified my program to use different file extensions, and the
problem is solved.

Thank you for your help and suggestions.
 
 
 

Single 512-byte write to file taking 5-10 minutes

Post by Phil » Fri, 30 Jun 2006 23:55:02


On 28-Jun-2006, "Scherbina Vladimir" < XXXX@XXXXX.COM >



The problem turned out to be AVG anti-virus scanning the file. There were
several aspects of the problem that made is confusing.

1. The files having the problem had the extension mpdwhich is something
I came up with. AVG shows a list of potentially nfectablefiles that it
scans, and mpd is not in that list.

2. I was under the belief that anti-virus programs did their real-time scans
of files at the time that a file was closed after being created or modified.
I had no idea that they would take control of a file and scan it while
another program had it open and was actively reading and writing to it.

3. The FileMon utility did not show any activity from any of the AVG
components while the file scan was taking place. I now assume that AVG must
install some sort of driver that hooks into Windows so that the scanning is
associated with Windows and my application rather than their components.

After receiving several suggestions that the problem was connected to
anti-virus scanning, I tried turning off the real-time protection component
of AVG by unchecking the appropriate box. That did _not_ solve the problem.

I then decided to try changing the types of the files. When I used Windows
Explorer to rename one of the files from .mpd to another extension which I
know to be safe, a full file scan took place during the rename operation,
causing Windows Explorer to hang for about 10 minutes. At that point I knew
I was on to something.

I have now modified my program to use different file extensions, and the
problem is solved.

Thank you for your help and suggestions.
 
 
 

Single 512-byte write to file taking 5-10 minutes

Post by Phil » Fri, 30 Jun 2006 23:56:03


The problem turned out to be AVG anti-virus scanning the file. There were
several aspects of the problem that made is confusing.

1. The files having the problem had the extension mpdwhich is something
I came up with. AVG shows a list of potentially nfectablefiles that it
scans, and mpd is not in that list.

2. I was under the belief that anti-virus programs did their real-time scans
of files at the time that a file was closed after being created or modified.
I had no idea that they would take control of a file and scan it while
another program had it open and was actively reading and writing to it.

3. The FileMon utility did not show any activity from any of the AVG
components while the file scan was taking place. I now assume that AVG must
install some sort of driver that hooks into Windows so that the scanning is
associated with Windows and my application rather than their components.

After receiving several suggestions that the problem was connected to
anti-virus scanning, I tried turning off the real-time protection component
of AVG by unchecking the appropriate box. That did _not_ solve the problem.

I then decided to try changing the types of the files. When I used Windows
Explorer to rename one of the files from .mpd to another extension which I
know to be safe, a full file scan took place during the rename operation,
causing Windows Explorer to hang for about 10 minutes. At that point I knew
I was on to something.

I have now modified my program to use different file extensions, and the
problem is solved.

Thank you for your help and suggestions.