Aswidsagent.exe taking a file lock on external HDD, not allowing safe eject

Hi, I want to ask you for a solution for a following problem:

After connecting an external HDD and performing a system backup, it isn’t possible to disconnect (eject) the HDD safely, because there is a file lock taken by Windows 10. An Avast process aswidsagent.exe is reported by LockHunter to be the culprit, along with various “System Volume Information” or $Extend locks.

Obviously, nobody would want to globally disable their security shield for the entire computer even for a second just to be able to eject one HDD. I don’t know about any possible solution, maybe except putting the computer to sleep before disconnecting the drive.

Please, provide any means to troubleshoot and fix this problem in real time. If the unexpected file lock is a common bug of yours (and trust me, I’ve experienced Avast holding file locks quite often), you should add a setting option where we can manually detach Avast from specific files.

For other people who find this post: a workaround is available, mentioned by reddit.com r techsupport comments 48zq7n comment mzw0x6b (links are censored) describing that you can run diskmgmt.msc, right-click the drive, and set it to Offline.

My experience is this is not a new problem but is a regular occurrance after using a external (USB) HDD. Eventually Avast will release the drive for safe ejection, but it is inconvienient and should not be this way.

2 Likes

Don’t stress so much … just pull out the drive, nothing will happen.
Also disabling the AV for a few seconds is also nothing to stress about … relax

For years my workaround has been power down, unplug drive(s), boot up.

1 Like

Some of us don’t only ever use computer casually :frowning: There is no chance for this to be incorporated into a regular workflow just because you lack security hygiene. This is especially nonsense given the latest computer trend, as the complexity of threats may easily grow… And disconnecting the drive can also help avoid other apps quickly accessing it, plus you can never predict the new behavior after applying any (app/OS) updates. We can’t be sure a system backup has been fully flushed from any cache, and the OS can be doing an actual work on the system volume.

:rofl: :rofl: :rofl:

I will join the party at this point at this point.

I do weekly data and system backups to external SSD drives (alternating on two different SanDisk and Crucial) 1TD and 2TB USB3 Drives respectively. This on my Window 10 laptop and don’t have this problem. I use the Show Hidden Icons link to disconnect my SSD drive, I don’t know if this is an option with old HDD format and whatever connection is used.

Yes that is how I do it. Click on USB then Eject USB HDD … but can often reply “device is in use”

Repeating the eject command a few seconds later sometimes makes it work.

Closing Windows Explorer can help because it also tends to hold a lock on a drive.

There are also special File Unlocker tools available that will force quit any locks.

In my experience, it never works, whatever amount of time you wait.

It may be an issue of compatibility with whatever windows settings, drivers, or apps, but it obviously impacts more people, and we have no reproducible steps to fix this (other than the “Offline drive” solution I found).

I gave an example of one File Unlocker, which didn’t have the ability to kill the literal System app.

Let’s bump this to increase the visibility; we need Avast developers to care - this fundamentally isn’t something a community can resolve on their own.