Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #11667 > unrolled thread

Random file access errors

Started byArne Ortlinghaus <Arne.Ortlinghaus@acs.it>
First post2018-05-25 11:30 +0200
Last post2018-05-30 05:30 +0200
Articles 4 — 4 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Random file access errors Arne Ortlinghaus <Arne.Ortlinghaus@acs.it> - 2018-05-25 11:30 +0200
    Re: Random file access errors dlzc <dlzc1@cox.net> - 2018-05-25 06:41 -0700
    Re: Random file access errors gianluca.pinoli@proximacentauri.it - 2018-05-29 07:47 -0700
      Re: Random file access errors "Wolfgang Riedmann" <wriedmann@gmail.com> - 2018-05-30 05:30 +0200

#11667 — Random file access errors

FromArne Ortlinghaus <Arne.Ortlinghaus@acs.it>
Date2018-05-25 11:30 +0200
SubjectRandom file access errors
Message-ID<pe8l3u$1bvu$1@gioia.aioe.org>
It seems that random file access errors are increasing together with our 
programs when copying, creating, or deleting files. It seems to me that 
this is due to changes in the Antivirus programs (we are using mainly 
Trend antivirus). I believe that it is not because of the last Windows 
updates, but I am still not sure. This seems to happen sometimes after 
having created a file and then trying to read it. But it seems also that 
the program cannot access a file after some copy processes of other 
files in the process. A reason could be some behavior driven controls by 
Antivirus (or Windows) and temporarily blocking operations of a process. 
Currently I am inserting calls to the function FFileCanOpen as defined 
below in different parts of the program to see if this reduces the 
number of errors. I use FFileCanOpen(nil, cfile,FO_EXCLUSIVE, 3, false) 
for example. In this case the function repeats opening the file in 
exclusive mode for a certain maximum number of seconds.

Arne




function FFileCanOpen(oOwner, cFile, nMode, nSecWait, lWithErrorMessages)
//p Testen, ob eine Datei mit einem bestimmten Attribut geöffnet werden 
kann und Warten für nSecWait, falls es nicht geht
//a oOwner - falls angegeben Progressbar (noch nicht ausprogrammiert)
//a cInFile
//a nMode
// FO_SHARED     := 0x00000040  // Allow other processes to read or write
// FO_EXCLUSIVE  := 0x00000010  // Exclusive
//a nSecWait
//a lWithErrorMessages
//
local lOk as logic
local pOutfile as ptr
local lGoOn as logic
local nsec as dword
Default (@lWithErrorMessages, true)
if Empty(nMode)
    nMode := FO_EXCLUSIVE
endif
if Empty(nSecWait)
    nSecWait := 0
endif
lOk := true
lGoOn := true
nsec := 0
do while lGoOn
    lGoOn := false
    pOutfile := FOpen2(cFile, nMode)
    if pOutfile == F_Error
       nsec += 1
       if nsec <= nSecWait
          lGoOn := true
          Sleep(1000)
       else
          lOk := false
    		if lWithErrorMessages
    			MsgError 
(Msg(ID_DATEIOeffnen)+CRLF+cFile+CRLF+DosErrString(FError()), 
Msg(ID_DATEIoeffnen))
    		endif
       endif
    endif
    if pOutfile != null_ptr .and. pOutfile != F_Error
    	FClose(pOutfile)
    endif
enddo

return lOk

[toc] | [next] | [standalone]


#11669

Fromdlzc <dlzc1@cox.net>
Date2018-05-25 06:41 -0700
Message-ID<85f6b323-ff80-43c8-9a4a-8e1f1c774d14@googlegroups.com>
In reply to#11667
Dear Arne Ortlinghaus:

On Friday, May 25, 2018 at 2:30:40 AM UTC-7, Arne Ortlinghaus wrote:
> It seems that random file access errors are increasing together with our 
> programs when copying, creating, or deleting files. It seems to me that 
> this is due to changes in the Antivirus programs (we are using mainly 
> Trend antivirus). I believe that it is not because of the last Windows 
> updates, but I am still not sure. This seems to happen sometimes after 
> having created a file and then trying to read it. But it seems also that 
> the program cannot access a file after some copy processes of other 
> files in the process. A reason could be some behavior driven controls by 
> Antivirus (or Windows) and temporarily blocking operations of a process. 
> Currently I am inserting calls to the function FFileCanOpen as defined 
> below in different parts of the program to see if this reduces the 
> number of errors. I use FFileCanOpen(nil, cfile,FO_EXCLUSIVE, 3, false) 
> for example. In this case the function repeats opening the file in 
> exclusive mode for a certain maximum number of seconds.

And did this "black magic" significantly reduce the number of errors?

Can you speak to the infrastructure you observe this on?
What RDD are you using at both ends?
Is server remote on the network, on the same machine, or remote on the internet?
What OS / version in both places?
Any wireless connections between the client and the data?
Is there off-brand VoIP on this network, that changed more-or-less concurrently with the onset of this?
There may be a clumsy packet sniffer in operation, that is causing dropped packets... but this should have just slowed down the system.  In other words this network has been hacked.

And I have to say this sounds strangely reminiscent of the problems Windoze constructed in trying to better their network response times as compared to Linux, where all xBase variants had to change registry settings to disable various caches that Windoze did not correctly buffer to disk.
<https://social.technet.microsoft.com/Forums/lync/en-US/01ddd2c0-568d-457e-a229-8f51872610b0/file-corruption-on-file-share-dbf-files?forum=winservergen>

David A. Smith

[toc] | [prev] | [next] | [standalone]


#11675

Fromgianluca.pinoli@proximacentauri.it
Date2018-05-29 07:47 -0700
Message-ID<41077296-1033-4819-9326-f7a65dac5c71@googlegroups.com>
In reply to#11667
Hi Arne,
I fixed a similar problem disabling the network cache in the client PC.

Try setting to '0' the following Key in the registry

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanworkstation\Parameters

FileInfoCacheLifetime
FileNotFoundCacheLifetime
DirectoryCacheLifetime


You can find more information here (Sorry but it is in Italian Language):
https://social.technet.microsoft.com/Forums/it-IT/cb5fd6c3-acf2-417f-b168-81102781027f/windows-7-32-bit-ritardo-visualizzazione-files-su-cartelle-di-rete?forum=windows7italian

Regards
Gianluca

[toc] | [prev] | [next] | [standalone]


#11678

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2018-05-30 05:30 +0200
Message-ID<fn6k5vFc5jgU1@mid.individual.net>
In reply to#11675
Hi Gianluca,

PMFJI, 

> You can find more information here (Sorry but it is in Italian
> Language):

for Arne this is no problem <g>. 

You will have the possibility to meet him in the Italian X# meeting in
June.

Wolfgang




-- 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web