Kann der Windows Search Indexer das Löschen von Dateien verhindern?

1578
Val

Ich weiß, dass, wenn Windows offene Dateien zum Lesen verarbeitet, diese gesperrt werden. Wie macht der Windows-Indexer das? Kann es verhindern, dass die Datei gelöscht wird und alles verlangsamt? Kann mein Skript die Indizierung im Arbeitsordner deaktivieren ?

Ich frage mich, weil wir Dateien für die Kommunikation zwischen Prozessen verwenden . Ich überwache, wann eine to.ugpDatei gelöscht wird. Dies funktioniert sehr gut nur auf dem Computer, auf dem der Suchindex deaktiviert ist. Ich habe die Protokolle mit dem Filemonitor verfolgt :

 "Time of Day","Process Name","PID","Operation","Path","Result","Detail" "2:56,0481127","java.exe","5812","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:56,0529609","java.exe","5812","ReadFile","C:\to.ugp","SUCCESS","Offset: 0, Length: 124, Priority: Normal" "2:56,0532777","java.exe","5812","ReadFile","C:\to.ugp","END OF FILE","Offset: 124, Length: 8 192, Priority: Normal" "2:56,0533272","java.exe","5812","CloseFile","C:\to.ugp","SUCCESS","" "2:56,1397217","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:56,2482956","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:56,3578338","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:56,4672443","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:56,5773732","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:56,6858176","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:56,7515643","java.exe","3672","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Write Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:56,7546558","java.exe","3672","SetBasicInformationFile","C:\to.ugp","SUCCESS","CreationTime: 1.01.1601 2:00:00, LastAccessTime: 1.01.1601 2:00:00, LastWriteTime: 1.01.1601 2:00:00, ChangeTime: 1.01.1601 2:00:00, FileAttributes: N" "2:56,7547107","java.exe","3672","CloseFile","C:\to.ugp","SUCCESS","" "2:56,7548412","java.exe","3672","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:56,7548586","java.exe","3672","QueryBasicInformationFile","C:\to.ugp","SUCCESS","CreationTime: 11.11.2013 18:10:11, LastAccessTime: 11.11.2013 2:56, LastWriteTime: 11.11.2013 2:56, ChangeTime: 11.11.2013 2:56, FileAttributes: N" "2:56,7548660","java.exe","3672","CloseFile","C:\to.ugp","SUCCESS","" "2:56,7549417","java.exe","3672","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:56,7557996","java.exe","3672","QueryAttributeTagFile","C:\to.ugp","SUCCESS","Attributes: N, ReparseTag: 0x0" "2:56,7558105","java.exe","3672","SetDispositionInformationFile","C:\to.ugp","CANNOT DELETE","Delete: True" "2:56,7559298","SearchProtocolHost.exe","2556","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Generic Read, Disposition: Open, Options: Open Reparse Point, Open Requiring Oplock, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:56,7569872","java.exe","3672","CloseFile","C:\to.ugp","SUCCESS","" "2:56,7574543","SearchProtocolHost.exe","2556","FileSystemControl","C:\to.ugp","SUCCESS","Control: FSCTL_REQUEST_FILTER_OPLOCK" "2:56,7574678","SearchProtocolHost.exe","2556","QueryStandardInformationFile","C:\to.ugp","SUCCESS","AllocationSize: 128, EndOfFile: 124, NumberOfLinks: 1, DeletePending: False, Directory: False" "2:56,7574770","SearchProtocolHost.exe","2556","QueryBasicInformationFile","C:\to.ugp","SUCCESS","CreationTime: 11.11.2013 18:10:11, LastAccessTime: 11.11.2013 2:56, LastWriteTime: 11.11.2013 2:56, ChangeTime: 11.11.2013 2:56, FileAttributes: N" "2:56,7574851","SearchProtocolHost.exe","2556","QueryFileInternalInformationFile","C:\to.ugp","SUCCESS","IndexNumber: 0x19000000017817" "2:56,7574986","SearchProtocolHost.exe","2556","FileSystemControl","C:\to.ugp","NOT REPARSE POINT","Control: FSCTL_GET_REPARSE_POINT" "2:56,7575205","SearchProtocolHost.exe","2556","QuerySecurityFile","C:\to.ugp","BUFFER OVERFLOW","Information: Owner, Group, DACL" "2:56,7575449","SearchProtocolHost.exe","2556","QuerySecurityFile","C:\to.ugp","SUCCESS","Information: Owner, Group, DACL" "2:56,7575598","SearchProtocolHost.exe","2556","QueryNameInformationFile","C:\to.ugp","SUCCESS","Name: \to.ugp" "2:56,7577304","SearchProtocolHost.exe","2556","QueryBasicInformationFile","C:\to.ugp","SUCCESS","CreationTime: 11.11.2013 18:10:11, LastAccessTime: 11.11.2013 2:56, LastWriteTime: 11.11.2013 2:56, ChangeTime: 11.11.2013 2:56, FileAttributes: N" "2:56,7578549","SearchProtocolHost.exe","2556","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Disallow Exclusive, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:56,7640826","SearchProtocolHost.exe","2556","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Read Attributes, Read Control, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:56,7642734","SearchProtocolHost.exe","2556","QuerySecurityFile","C:\to.ugp","BUFFER OVERFLOW","Information: Owner" "2:56,7642868","SearchProtocolHost.exe","2556","QuerySecurityFile","C:\to.ugp","SUCCESS","Information: Owner" "2:56,7642992","SearchProtocolHost.exe","2556","CloseFile","C:\to.ugp","SUCCESS","" "2:56,7654345","SearchProtocolHost.exe","2556","CloseFile","C:\to.ugp","SUCCESS","" "2:56,7654858","SearchProtocolHost.exe","2556","CloseFile","C:\to.ugp","SUCCESS","" "2:56,7944973","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:56,9036038","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:57,0130876","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:57,0435401","MsMpEng.exe","168","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Non-Directory File, Open For Backup, Open Requiring Oplock, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:57,0436088","MsMpEng.exe","168","FileSystemControl","C:\to.ugp","OPLOCK HANDLE CLOSED","Control: FSCTL_REQUEST_OPLOCK" "2:57,0436382","MsMpEng.exe","168","FileSystemControl","C:\to.ugp","SUCCESS","Control: 0x902eb (Device:0x9 Function:186 Method: 3)" "2:57,0436661","MsMpEng.exe","168","CloseFile","C:\to.ugp","SUCCESS","" "2:57,1223547","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:57,2315334","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:57,3407068","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:57,4499606","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:57,5588147","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:57,6683427","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:57,7771626","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" 

Sie sehen, dass java.exe: 2484 ein Erzeugerprozess ist und die to.ugp-Datei abfragt, bis sie mit der Absicht vorhanden ist, eine neue zu erstellen, wenn die Datei vom Konsumenten gelöscht wird. java.exe: 5812 ist der Verbraucher. Es liest die Datei am Anfang des Trace und hört auf zu existieren. Dann java.exe: 2484 Umfragen - Datei existiert noch. Dann wird ein neuer Verbraucher erstellt. Es muss die zuvor verbrauchte Datei entfernen. SetDispositionInformationFile führt jedoch zu einem Fehler "CANNOT DELETE". Warum? Ich sehe, dass SeachHost die Datei öffnet, bevor der neue Verbraucher sie schließt. Die Datei wird niemals gelöscht und java.exe:2484wird am Ende alleine abgefragt.

Ich habe auch die vorangegangenen Zugriffe auf die Datei nachverfolgt (kann es Ihnen vielleicht helfen zu sagen, was den Fehler verursacht hat?):

 "2:54,8446903","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:54,9535548","java.exe","2484","QueryDirectory","C:\to.ugp","SUCCESS","Filter: to.ugp, 1: to.ugp" "2:54,9757732","java.exe","5812","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Write Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:54,9760764","java.exe","5812","SetBasicInformationFile","C:\to.ugp","SUCCESS","CreationTime: 1.01.1601 2:00:00, LastAccessTime: 1.01.1601 2:00:00, LastWriteTime: 1.01.1601 2:00:00, ChangeTime: 1.01.1601 2:00:00, FileAttributes: N" "2:54,9761405","java.exe","5812","CloseFile","C:\to.ugp","SUCCESS","" "2:54,9763673","java.exe","5812","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:54,9763960","java.exe","5812","QueryBasicInformationFile","C:\to.ugp","SUCCESS","CreationTime: 11.11.2013 18:10:11, LastAccessTime: 11.11.2013 2:54, LastWriteTime: 11.11.2013 2:54, ChangeTime: 11.11.2013 2:54, FileAttributes: N" "2:54,9764080","java.exe","5812","CloseFile","C:\to.ugp","SUCCESS","" "2:54,9765206","java.exe","5812","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:54,9766858","java.exe","5812","QueryAttributeTagFile","C:\to.ugp","SUCCESS","Attributes: N, ReparseTag: 0x0" "2:54,9766972","java.exe","5812","SetDispositionInformationFile","C:\to.ugp","SUCCESS","Delete: True" "2:54,9767347","SearchProtocolHost.exe","2556","CreateFile","C:\to.ugp","NAME NOT FOUND","Desired Access: Generic Read, Disposition: Open, Options: Open Reparse Point, Open Requiring Oplock, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: n/a" "2:54,9767870","java.exe","5812","CloseFile","C:\to.ugp","SUCCESS","" "2:55,0636366","java.exe","2484","QueryDirectory","C:\to.ugp","NO SUCH FILE","Filter: to.ugp" "2:55,3118545","MsMpEng.exe","168","CreateFile","C:\to.ugp","NAME NOT FOUND","Desired Access: Read Attributes, Disposition: Open, Options: Non-Directory File, Open For Backup, Open Requiring Oplock, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a" "2:56,0325778","java.exe","2484","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Generic Read/Write, Disposition: OpenIf, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: 0, OpenResult: Created" "2:56,0332831","java.exe","2484","QueryBasicInformationFile","C:\to.ugp","SUCCESS","CreationTime: 11.11.2013 18:10:11, LastAccessTime: 11.11.2013 2:56, LastWriteTime: 11.11.2013 2:56, ChangeTime: 11.11.2013 2:56, FileAttributes: A" "2:56,0333387","java.exe","2484","QueryStandardInformationFile","C:\to.ugp","SUCCESS","AllocationSize: 0, EndOfFile: 0, NumberOfLinks: 1, DeletePending: False, Directory: False" "2:56,0333560","java.exe","2484","SetEndOfFileInformationFile","C:\to.ugp","SUCCESS","EndOfFile: 0" "2:56,0333840","java.exe","2484","SetAllocationInformationFile","C:\to.ugp","SUCCESS","AllocationSize: 0" "2:56,0334979","java.exe","2484","WriteFile","C:\to.ugp","SUCCESS","Offset: 0, Length: 124, Priority: Normal" "2:56,0335560","java.exe","2484","CloseFile","C:\to.ugp","SUCCESS","" "2:56,0337311","MsMpEng.exe","168","CreateFileMapping","C:\to.ugp","FILE LOCKED WITH WRITERS","SyncType: SyncTypeCreateSection, PageProtection: " "2:56,0337485","MsMpEng.exe","168","QueryStandardInformationFile","C:\to.ugp","SUCCESS","AllocationSize: 128, EndOfFile: 124, NumberOfLinks: 1, DeletePending: False, Directory: False" "2:56,0354539","SearchProtocolHost.exe","2556","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Generic Read, Disposition: Open, Options: Open Reparse Point, Open Requiring Oplock, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:56,0360802","SearchProtocolHost.exe","2556","FileSystemControl","C:\to.ugp","SUCCESS","Control: FSCTL_REQUEST_FILTER_OPLOCK" "2:56,0360990","SearchProtocolHost.exe","2556","QueryStandardInformationFile","C:\to.ugp","SUCCESS","AllocationSize: 128, EndOfFile: 124, NumberOfLinks: 1, DeletePending: False, Directory: False" "2:56,0361142","SearchProtocolHost.exe","2556","QueryBasicInformationFile","C:\to.ugp","SUCCESS","CreationTime: 11.11.2013 18:10:11, LastAccessTime: 11.11.2013 2:56, LastWriteTime: 11.11.2013 2:56, ChangeTime: 11.11.2013 2:56, FileAttributes: A" "2:56,0361262","SearchProtocolHost.exe","2556","QueryFileInternalInformationFile","C:\to.ugp","SUCCESS","IndexNumber: 0x19000000017817" "2:56,0361457","SearchProtocolHost.exe","2556","FileSystemControl","C:\to.ugp","NOT REPARSE POINT","Control: FSCTL_GET_REPARSE_POINT" "2:56,0361687","SearchProtocolHost.exe","2556","QuerySecurityFile","C:\to.ugp","BUFFER OVERFLOW","Information: Owner, Group, DACL" "2:56,0361793","SearchProtocolHost.exe","2556","QuerySecurityFile","C:\to.ugp","SUCCESS","Information: Owner, Group, DACL" "2:56,0361928","SearchProtocolHost.exe","2556","QueryNameInformationFile","C:\to.ugp","SUCCESS","Name: \to.ugp" "2:56,0363623","SearchProtocolHost.exe","2556","QueryBasicInformationFile","C:\to.ugp","SUCCESS","CreationTime: 11.11.2013 18:10:11, LastAccessTime: 11.11.2013 2:56, LastWriteTime: 11.11.2013 2:56, ChangeTime: 11.11.2013 2:56, FileAttributes: A" "2:56,0366114","SearchProtocolHost.exe","2556","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Disallow Exclusive, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:56,0375913","SearchProtocolHost.exe","2556","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Read Attributes, Read Control, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:56,0377580","SearchProtocolHost.exe","2556","QuerySecurityFile","C:\to.ugp","BUFFER OVERFLOW","Information: Owner" "2:56,0377764","SearchProtocolHost.exe","2556","QuerySecurityFile","C:\to.ugp","SUCCESS","Information: Owner" "2:56,0377941","SearchProtocolHost.exe","2556","CloseFile","C:\to.ugp","SUCCESS","" "2:56,0383196","java.exe","5812","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:56,0383494","java.exe","5812","QueryNetworkOpenInformationFile","C:\to.ugp","SUCCESS","CreationTime: 11.11.2013 18:10:11, LastAccessTime: 11.11.2013 2:56, LastWriteTime: 11.11.2013 2:56, ChangeTime: 11.11.2013 2:56, AllocationSize: 1.01.1601 2:00:00, EndOfFile: 1.01.1601 2:00:00, FileAttributes: A" "2:56,0383628","java.exe","5812","CloseFile","C:\to.ugp","SUCCESS","" "2:56,0384852","SearchProtocolHost.exe","2556","CloseFile","C:\to.ugp","SUCCESS","" "2:56,0385482","SearchProtocolHost.exe","2556","CloseFile","C:\to.ugp","SUCCESS","" "2:56,0401676","java.exe","5812","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:56,0402242","java.exe","5812","QueryInformationVolume","C:\to.ugp","SUCCESS","VolumeCreationTime: 3.09.2013 8:22:20, VolumeSerialNumber: C2F2-255E, SupportsObjects: True, VolumeLabel: " "2:56,0402387","java.exe","5812","QueryAllInformationFile","C:\to.ugp","BUFFER OVERFLOW","CreationTime: 11.11.2013 18:10:11, LastAccessTime: 11.11.2013 2:56, LastWriteTime: 11.11.2013 2:56, ChangeTime: 11.11.2013 2:56, FileAttributes: A, AllocationSize: 128, EndOfFile: 124, NumberOfLinks: 1, DeletePending: False, Directory: False, IndexNumber: 0x19000000017817, EaSize: 0, Access: Read Attributes, Synchronize, Position: 0, Mode: Synchronous IO Non-Alert, AlignmentRequirement: Word" "2:56,0406567","java.exe","5812","CloseFile","C:\to.ugp","SUCCESS","" "2:56,0409493","java.exe","5812","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Generic Read, Disposition: Open, Options: Sequential Access, Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened" "2:56,0411136","java.exe","5812","QueryAttributeTagFile","C:\to.ugp","SUCCESS","Attributes: A, ReparseTag: 0x0" "2:56,0411295","java.exe","5812","CloseFile","C:\to.ugp","SUCCESS","" "2:56,0412625","java.exe","5812","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Generic Read, Disposition: Open, Options: Sequential Access, Synchronous IO Non-Alert, Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened" "2:56,0414413","java.exe","5812","QueryStandardInformationFile","C:\to.ugp","SUCCESS","AllocationSize: 128, EndOfFile: 124, NumberOfLinks: 1, DeletePending: False, Directory: False" "2:56,0414501","java.exe","5812","QueryBasicInformationFile","C:\to.ugp","SUCCESS","CreationTime: 11.11.2013 18:10:11, LastAccessTime: 11.11.2013 2:56, LastWriteTime: 11.11.2013 2:56, ChangeTime: 11.11.2013 2:56, FileAttributes: A" "2:56,0414660","java.exe","5812","QueryStreamInformationFile","C:\to.ugp","SUCCESS","0: ::$DATA" "2:56,0414791","java.exe","5812","QueryBasicInformationFile","C:\to.ugp","SUCCESS","CreationTime: 11.11.2013 18:10:11, LastAccessTime: 11.11.2013 2:56, LastWriteTime: 11.11.2013 2:56, ChangeTime: 11.11.2013 2:56, FileAttributes: A" "2:56,0414869","java.exe","5812","QueryEaInformationFile","C:\to.ugp","SUCCESS","EaSize: 0" "2:56,0430376","java.exe","5812","QueryAttributeInformationVolume","C:\to.ugp","SUCCESS","FileSystemAttributes: Case Preserved, Case Sensitive, Unicode, ACLs, Compression, Named Streams, EFS, Object IDs, Reparse Points, Sparse Files, Quotas, Transactions, 0x3c00000, MaximumComponentNameLength: 255, FileSystemName: NTFS" "2:56,0432018","java.exe","5812","ReadFile","C:\to.ugp","SUCCESS","Offset: 0, Length: 124, Priority: Normal" "2:56,0433752","java.exe","5812","CloseFile","C:\to.ugp","SUCCESS","" "2:56,0457130","java.exe","5812","CreateFile","C:\to.ugp","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "2:56,0457516","java.exe","5812","QueryNetworkOpenInformationFile","C:\to.ugp","SUCCESS","CreationTime: 11.11.2013 18:10:11, LastAccessTime: 11.11.2013 2:56, LastWriteTime: 11.11.2013 2:56, ChangeTime: 11.11.2013 2:56, AllocationSize: 1.01.1601 2:00:00, EndOfFile: 1.01.1601 2:00:00, FileAttributes: A" "2:56,0457647","java.exe","5812","CloseFile","C:\to.ugp","SUCCESS","" 

Der Dateimonitor meldet die Fehlerursache nicht. Es berichtet, dass SearchProtocolHost die Datei nach dem fehlgeschlagenen Löschversuch geöffnet hat. Aber könnte der Filemonitor nur die Dateiereignisse außerhalb der Reihenfolge melden? Könnte SearchProtocolHost die Datei nur Sekunden zuvor geöffnet haben und den Löschvorgang trotz des Dateiüberwachungsberichts verhindern?

Ich habe die Indizierung in meinem Ordner deaktiviert, bekomme es aber immer noch

 "Time of Day","Process Name","PID","Operation","Path","Result","Detail" "3:04,2768992","SearchProtocolHost.exe","4912","CloseFile","C:\test.bin","SUCCESS","" "3:04,2900787","java.exe","4332","CreateFile","C:\test.bin","SUCCESS","Desired Access: Write Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "3:04,2903130","java.exe","4332","SetBasicInformationFile","C:\test.bin","SUCCESS","CreationTime: 1.01.1601 2:00:00, LastAccessTime: 1.01.1601 2:00:00, LastWriteTime: 1.01.1601 2:00:00, ChangeTime: 1.01.1601 2:00:00, FileAttributes: N" "3:04,2903760","java.exe","4332","CloseFile","C:\test.bin","SUCCESS","" "3:04,2906127","java.exe","4332","CreateFile","C:\test.bin","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "3:04,2906456","java.exe","4332","QueryBasicInformationFile","C:\test.bin","SUCCESS","CreationTime: 11.11.2013 20:08:50, LastAccessTime: 11.11.2013 3:04, LastWriteTime: 11.11.2013 3:04, ChangeTime: 11.11.2013 3:04, FileAttributes: N" "3:04,2906591","java.exe","4332","CloseFile","C:\test.bin","SUCCESS","" "3:04,2907872","java.exe","4332","CreateFile","C:\test.bin","SUCCESS","Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "3:04,2910002","java.exe","4332","QueryAttributeTagFile","C:\test.bin","SUCCESS","Attributes: N, ReparseTag: 0x0" "3:04,2911567","java.exe","4332","SetDispositionInformationFile","C:\test.bin","CANNOT DELETE","Delete: True" "3:04,2911712","SearchProtocolHost.exe","4912","CreateFile","C:\test.bin","SUCCESS","Desired Access: Generic Read, Disposition: Open, Options: Open Reparse Point, Open Requiring Oplock, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "3:04,2919504","java.exe","4332","CloseFile","C:\test.bin","SUCCESS","" "3:04,2923298","java.exe","4332","QueryDirectory","C:\test.bin","SUCCESS","Filter: test.bin, 1: test.bin" 

Bitte nochmals beachten

"3:04,2911567","java.exe","4332","SetDispositionInformationFile","C:\test.bin","CANNOT DELETE","Delete: True" "3:04,2911712","SearchProtocolHost.exe","4912","CreateFile","C:\test.bin","SUCCESS","Desired Access: Generic Read, Disposition: Open, Options: Open Reparse Point, Open Requiring Oplock, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" 

einer nach dem anderen passieren und mein Java - Prozess schlägt fehl, weil er das nicht entfernen kann test.bin. Ich sehe außer dem SearchProtocolHost niemanden, der auf diese Datei zugegriffen hat. Warum meldet niemand, dass SearchProtocolHost die Dateien auch nach Deaktivierung der Indizierung sperrt?

Update Ich habe mein Problem behoben, indem ich das Löschen erneut versuchte. Zweites sofortiges Löschen ist erfolgreich. Hier ist zum Beispiel ein Profil von Wiederholungen (die erste Spalte enthält die Sekunden)

19012: evaluator\to.ugp 21764: evaluator\to.ugp 22318: evaluator\to.ugp 23422: evaluator\to.ugp 

und

03:14:02: failed to remove asm.o 03:19:37: failed to remove test.bin 03:46:11: failed to remove test.lst 04:04:24: failed to remove asm.o 04:44:39: failed to remove test.bin 04:46:30: failed to remove asm.o 04:46:30: failed to remove asm.o 04:46:31: failed to remove asm.o 

vom Produzentenprozess. Wir sehen alle 30 Minuten einen Fehler. Meine Prozesse sind Single-Threading. Es kann nicht sein, dass einer meiner Threads die Sperre aufhebt, damit das Löschen erfolgreich ist. Wenn ich jedoch die Berechnung entferne und die bloße Datei-E / A belasse, werden keine Löschfehler beobachtet, und es ist mir bei anderen Java-Anwendungen noch nie passiert.

Obwohl ich das Problem gelöst habe, habe ich gefragt, ob Windows-Dienste (Dateiindex, Antivirus) schuldig sein können und immer noch auf die Antwort warten. Warum schlägt das Löschen fehl? Warum kann ich mich immer noch auf file open und file.exists () verlassen, ohne erneut versuchen zu müssen?

Update-2

Die Antwort ist richtig . MsMpEng ist zuständig. Ich frage mich jedoch, wie es gelingt, die Datei zuzuordnen, nachdem CreateFile in meinen Protokollen fehlgeschlagen ist. Ich habe auch gesehen, dass Realplayer dies ( Windows XP, RealPlayer 15.0.1.13, RealNetworks, Inc., Build time: Wed Nov 30 02:07:39 2011 command line: "c:\program files\real\realplayer\\RealPlay.exe" /runevent "C:\program files\real\realplayer\update\upgr3270.dll" AutoUpdateEvent) auf einem anderen Rechner macht.

 50,2525433,cscript,8128,WriteFile,fname.txt,SUCCESS,Offset: 15, Length: 2" 50,2527714,cscript,8128,CloseFile,fname.txt,SUCCESS," 50,2530630,RealPlay,6076,CreateFile,fname.txt,SUCCESS,Desired Access: Read Data/List Directory, Read Attributes, Disposition: Open, Options: Non-Directory File, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" 50,2552132,cscript,8128,QueryOpen,fname.txt,SUCCESS,CreationTime: 2.02.2014 21:04:31, LastAccessTime: 2.02.2014 21:20:50, LastWriteTime: 2.02.2014 21:20:50, ChangeTime: 2.02.2014 21:20:50, AllocationSize: 24, EndOfFile: 17, FileAttributes: A" 50,2553296,cscript,8128,CreateFile,DIRjs_slot0,SUCCESS,Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened" 50,2554178,cscript,8128,QueryDirectory,fname.txt,SUCCESS,Filter: filename.txt, 1: filename.txt" 50,2555344,cscript,8128,CreateFile,fname.txt,SUCCESS,Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" 50,2558546,cscript,8128,QueryAttributeTagFile,fname.txt,SUCCESS,Attributes: A, ReparseTag: 0x0" 50,2559248,cscript,8128,SetDispositionInformationFile,fname.txt,CANNOT DELETE,Delete: True" 50,2560505,RealPlay,6076,CreateFileMapping,fname.txt,SUCCESS,SyncType: SyncTypeCreateSection, PageProtection: PAGE_READWRITE" 50,2560599,RealPlay,6076,QueryStandardInformationFile,fname.txt,SUCCESS,AllocationSize: 24, EndOfFile: 17, NumberOfLinks: 1, DeletePending: False, Directory: False" 50,2560731,RealPlay,6076,CreateFileMapping,fname.txt,SUCCESS,SyncType: SyncTypeOther" 50,2942892,cscript,8128,CloseFile,fname.txt,SUCCESS," 50,3028039,cscript,8128,CloseFile,DIRjs_slot0,SUCCESS," 50,4411248,RealPlay,6076,CloseFile,fname.txt,SUCCESS," 
1

1 Antwort auf die Frage

2
Rob

Es liegt an MsMpEng.exe, das ist Windows-Malware, die Code scannt. Die Datei wird für alles andere als zum Lesen gesperrt. Es sperrt es nur für kurze Zeit - sobald der Scanvorgang abgeschlossen ist, wird die Sperre aufgehoben und in eine andere Datei verschoben.

"Wir suchen nach langen Antworten, die einige Erklärungen und einen Kontext liefern. Geben Sie nicht nur eine einzeilige Antwort. Erklären Sie, warum Ihre Antwort richtig ist, idealerweise mit Zitaten. Antworten, die keine Erklärungen enthalten, werden möglicherweise entfernt." gparyani vor 10 Jahren 0
@gparyani "Sie" (sind hier) [http://meta.stackexchange.com/questions/160875/]. Die Antwort ist absolut ausreichend und sollte nicht durch "Rauschen für Qualität" beeinträchtigt werden. Val vor 10 Jahren 0
@Rob Ich habe die MsMpEng.exe auf den Maschinen, auf denen die Fehler ziemlich häufig auftreten. Aber ich habe es nicht auf der Maschine, die sehr selten ausfällt. Vielleicht haben Sie Recht, MsMpEng ist für die meisten Fehler mitschuldig. In der Tat sehe ich, dass MsMpEng.exe die Datei um 2: 56,0337485 öffnet und sie nirgendwo schließt. Danke, ROB! Val vor 10 Jahren 0