Files on Windows 10 share remain locked after accessing them from other computer

4

I have a Windows 7 (Ultimate) computer that got upgraded to Windows 10 Pro.

After upgrade everything works fine except that I needed to manually update the Geforce drivers, which wasn't too much of an issue.

But now I've got this problem and I have no idea what is causing it:
On the system there is 1 shared folder containing video-clips (WMV, MKV, MP4 formats). This share is accessible to 5 other computers in the house: 3 Windows 7 systems and 2 Mac's (Yosemite).

After the upgrade the other systems can still get at the share and view the video's, but they can not longer delete them after viewing.

In fact: On the Windows 10 box itself the files are locked too, after being viewed from over the network, and I can't delete them there either.

I need to reboot the Windows 10 box to clear the locks. (Logging off and back on is not enough.)

With Windows 7 this never happened.

Anybody have any idea what is going on? And how to solve this?

PS. No domain involved. The other computers log on to the share with the userid/password of a local user on the Windows 10 computer. This is exactly the same as previously under Windows 7.

All computers, Windows and OSX, are current with updates.

Behavior is independent of the virus-scanner (Windows Defender) being active or not.

This question suggests that the Search-Index engine may have something to do with it. I'm going to disable that later today as it doesn't make sense anyway for a disk only holding transient, temporary data. If it makes any difference I will update this.

Tonny

Posted 2015-08-04T15:04:53.250

Reputation: 19 919

Thanks for the hint on disabling indexing, doing it now on my new Win10 movie machine… similar setup to yours with Mac & Win accessing media on it. idk if it may also help, but I set the movie drives to be full control for everybody in the Security tab - I just don't need security on a disk full of ephemeral media. – Tetsujin – 2015-08-04T15:16:19.040

@Tetsujin Full Control in my case too. No need for anything stringent. – Tonny – 2015-08-04T17:43:32.577

Answers

3

Seems the other question I linked too actually provided the solution even though that question wasn't directly related.

The Windows Search Engine can index not only files/folders but also content of files.

For some obscure reason the attempt to delete the file across the LAN causes the Search Index to think the file has changed so it tries to determine what changed. This requires reading through the file, which in turns locks the file.

But the delete action also locked the file to determine if it actually could delete it.

Seems both locks get into a deadlock situation.

I consider this a bug in Windows 10. This should never lead to a deadlock.

If it happens it can be resolved without rebooting by stopping the Windows Search (WSearch) service, deleting the files and starting the service again.

For the moment I have disabled "Content Indexing" in the folder-properties for all my shared folders on the Windows 10 box. So far (2 hours testing by 3 client computers) this appears to be 100% effective in preventing the issue occurring again.

Tonny

Posted 2015-08-04T15:04:53.250

Reputation: 19 919

Very Interesting bug indeed. – Moab – 2015-08-05T01:12:02.803

Nice bit of research. – Tetsujin – 2015-08-05T05:39:45.203

0

I ran into this difficulty in Windows 10. You may try what I did:

  1. I opened a Windows Explorer
  2. I clicked on the View menu.
  3. I disabled "Preview Pane".
  4. I went back to the offending files and deleted them.

I think Microsoft erred here. It is logical that preview functionality creates a lock instance. Microsoft should have made an exception by not regarding the previewing of a document in a pane within the same Windows Explorer as a file lock.

Owen Ekechukwu

Posted 2015-08-04T15:04:53.250

Reputation: 1

I don't even use Explorer... Ever... And therefore it wasn't the Preview function. – Tonny – 2015-09-20T10:00:09.943

0

You can figure out which process has the file locked using Process Explorer or Unlocker (or any other application that lets you view open handles).

Process Explorer has a lot of other features, but for this specific case just open it, hit Ctrl+F and type your file name. You may need to run it as administrator. After finding the file, you can kill the process holding the lock or close the handle.

Unlocker is built just for specific task of deleting locked files, so it should be easier to use. Right click on the file you want to delete, choose Unlocker and follow instructions.

kichik

Posted 2015-08-04T15:04:53.250

Reputation: 236

The owning process is svchost. I had already determined that. Problem is that just about any network-related process uses svchost as intermediary so that doesn't get you any further. – Tonny – 2015-09-22T09:51:48.473

Killing the process is just one option. You can also forces close the file. Probably a dangerous thing to do in this case, but could be in useful in others. – kichik – 2015-09-22T15:33:50.683