Avast WEBforum

Consumer Products => Avast Free Antivirus / Premium Security (legacy Pro Antivirus, Internet Security, Premier) => Topic started by: donb6806 on December 20, 2011, 02:59:47 AM

Title: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: donb6806 on December 20, 2011, 02:59:47 AM
AvastSvc.exe on my XP/sp3 desktop system currently has over 130K handles.

This appears to be similar to the handle leak reported in AvastNet.exe (see: http://forum.avast.com/index.php?topic=90156.msg717270#msg717270 (http://forum.avast.com/index.php?topic=90156.msg717270#msg717270))

I am attaching the properties window from Process Explorer.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: igor on December 20, 2011, 10:51:23 AM
Can you please dump the process (e.g. from Process Explorer itself) and upload the dump to ftp://ftp.avast.com/incoming (ftp://ftp.avast.com/incoming) ?
Thanks.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: Broken Hope on December 20, 2011, 06:30:27 PM
Similar issue is happening on Windows 7 x64 too, the dump file appears to be huge though so not really wanting to upload it anywhere..

(http://img859.imageshack.us/img859/3954/clipboard01lo.jpg)
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: DavidR on December 20, 2011, 06:43:34 PM
The dump file should be able to be zipped, this should cut the size considerably, what size is it after zipping (7zip gives good compression) ?
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: Broken Hope on December 20, 2011, 07:09:26 PM
Around 80MB after zipping the dump file.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: Broken Hope on December 20, 2011, 07:16:00 PM
Okay, I've uploaded the dump file.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: Broken Hope on December 20, 2011, 07:32:48 PM
Actually thought I'd uploaded it, but it doesn't seem to complete the upload :/
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: DavidR on December 20, 2011, 07:34:46 PM
Did you give the upload a unique name, so they can identify it as yours ?

I also tend to create a text file (readme.txt) with any relevant information, avast topic URL, user name, etc. etc. in the zip file. Not to mention posting the name of the file you uploaded in the topic acts as another searchable reference.


You don't have read access on the incoming folder, so you won't see it there. Only if you uploaded it using an FTP program/process would you get confirmation that it was uploaded successfully.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: donb6806 on December 20, 2011, 09:58:00 PM
I am still trying to get a process dump.  When I tried ProcDump it froze my system and I had to reboot. 

I hope Broken Hope's dump shows something useful (it looks like the same symptom).
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: bezerk on December 20, 2011, 10:17:49 PM
I have the same handle leak problem myself.  Win7 Home premium 64-bit fully updated and using the free version of Avast 6.0.1367. Presently AvastSvc.exe (32-bit) is using a massive 138932 handles! Number two in line concerning handle usage is "System" with 4363.

Could the leak come from one or more 3rd party components Avast is using? Like SQLite, HTMLaylout, libPNG, UPX, Zlib etc...
  
EDIT:
Using Services to stop and then restart "avast! Antivirus" a.k.a. AvastSvc.exe - note that for security reasons I disconnect/connect my UTP cable during this operation - which btw only takes a few seconds, results in a handle count of a much more reasonable 900!
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: DavidR on December 20, 2011, 11:06:24 PM
No one can speculate, which is why the dump files (if they can be initiated) are requested.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: donb6806 on December 21, 2011, 06:21:09 AM
A newer version of Process Explorer allowed the process dump!

The number of handles is now much lower, but rapidly increasing.

The first dump had over 3K handles.

The second dump has over 12K handles (less than 6 hours later).

The FTP transfer is currently in progress.

The name of the file is:  AvastSvc_HandleDumps.7z

Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: Broken Hope on December 21, 2011, 05:46:16 PM
Up to over 100k handles now, not sure how something like this gets past testing, especially since it doesn't seem just limited to this process either judging by the other thread.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: LairdDrambeg on December 22, 2011, 10:38:36 AM
Is this issue now being addressed or is a Full(?) Dump file still required?  Incidentally when the Handle Count got up to 58,000 on my WinXP/SP3 system with 1GB memory, the network server stopped working and I got a System Event ID 2020 from Source Srv with "The server was unable to allocate from the system paged pool because the pool was empty."

When I look at the AvastSvc.exe handles with Process Explorer I see that there are multiple occurrences of the same handles, in particular the "defs" files, e.g., F:\Program Files\Alwil Software\Avast5\defs\11122102\s_idx.map as well as handles for the previous version of the "defs", e.g. F:\Program Files\Alwil Software\Avast5\defs\11122101\s_idx.map.  Perhaps there's a clue here?
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: igor on December 22, 2011, 01:13:03 PM
I believe the problem has been found, thanks for the dumps.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: ady4um on December 22, 2011, 01:54:23 PM
@LairdDrambeg,

Unless avast releases a new program update really soon (which I doubt), I would suggest first to back up your license file (if you have a paid-for edition), then to uninstall avast, run the specific aswclear.exe removal utility under Windows Safe Mode for BOTH avast 6 and avast 5, selecting the correct folder too.

Then remove any (hidden) folders with "avast*" or "alwil*" as part of the name. Download the latest stable version and install anew. Reboot immediately after the installation process finishes.

I'm NOT saying this will completely solve your particular problem, but since you already have some troubles, then maybe eliminating previous remnants (of previous avast versions) could potentially help.

The latest stable installation would not be just an update from avast 5 to 6 (as you currently have), so some of the issues could be potentially solved. Unfortunately, I can't assure you this will solve any problem.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: donb6806 on December 22, 2011, 06:50:17 PM
@igor, @DavidR

Thank you very much.

If you need more info (or need for me to test something) please send me an email.

I had to reboot the system again last night.  14 hours later, AvastSvc.exe has over 30K handles.

Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: DavidR on December 22, 2011, 09:02:56 PM
You're welcome, hopefully it will be resolved in the next program update.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: Broken Hope on December 23, 2011, 03:01:25 PM
I believe the problem has been found, thanks for the dumps.

Any chance you could provide a fixed version of the AvastSvc.exe that we can replace manually? Waiting until the next full program update could be months from now and since I rarely reboot my computer my AvastSvc.exe is currently using over 140k handles.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: OisteinR on December 23, 2011, 06:21:29 PM
You're welcome, hopefully it will be resolved in the next program update.

Hopefully.... It better be soon.
Every three days the computer freezes and BSOD. No problem on previous version....
Win 64 Pro
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: ady4um on December 23, 2011, 08:29:33 PM
As a temporal workaround, if the previous free version was working better than the latest stable, previous versions could be downloaded from filehippo.com, but only for the free editions of avast.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: Broken Hope on December 27, 2011, 02:11:40 PM
Since Christmas is over, any update on this issue? Ideally it would be great if you could provide a fixed executable like you did with the other issue, for anyone who doesn't restart/shutdown their system often the handle count gets ridicules.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: bezerk on December 28, 2011, 12:36:59 AM
Since Christmas is over, any update on this issue? Ideally it would be great if you could provide a fixed executable like you did with the other issue, for anyone who doesn't restart/shutdown their system often the handle count gets ridicules.

But as described on page 1 you should be able to stop and restart the Avast service - takes max. 7-10 secs total on my PC (ev. you could unplug/plug Internet cable during this service operation). Thus no rebooting required!
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: DonZ63 on December 28, 2011, 02:14:52 AM
Interesting thread.

My peak handle count on a WIN 7 x64 installation is 2,441.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: pk on December 28, 2011, 11:43:25 AM
My peak handle count on a WIN 7 x64 installation is 2,441.

I think it's a minor issue -- there're two known handle leaks in the current avast version (one in avastsvc.exe, another one in network service: sbc edition, i guess). 2500 handles are still ok, system maximum is 16,777,216 handles. As you can see, it's not the critical problem right now.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: ady4um on December 28, 2011, 04:51:02 PM
I think it's a minor issue -- there're two known handle leaks in the current avast version (one in avastsvc.exe, another one in network service: sbc edition, i guess). 2500 handles are still ok, system maximum is 16,777,216 handles. As you can see, it's not the critical problem right now.

I don't know if it is a minor issue or not. 2500 handles are one thing, 140'000 is several orders of magnitude higher than that, but yet not 16'777'216. A reboot, or stopping and restarting the service, should reduce potential problems.

I guess developers should know if this is really a minor issue or not.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: igor on December 30, 2011, 04:46:22 PM
Make sure you've got the latest virus definitions and restart the "avast! Antivirus" service (or the computer) - it should fix the problem.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: Broken Hope on December 31, 2011, 11:45:03 AM
Not sure how you managed to fix it in a definitions update but it seems to have sorted it, holding steady at just over 1100 handles.
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: bob3160 on December 31, 2011, 03:46:25 PM
Not sure how you managed to fix it in a definitions update but it seems to have sorted it, holding steady at just over 1100 handles.
Because it is no longer just a simple definitions update and is capable
of doing more than just update your definitions.  :)
Title: Re: AvastSvc.exe handle leak: Avast 6.0.1367
Post by: DonZ63 on December 31, 2011, 03:55:26 PM
I agree this appears to be resolved, my peak handle count just a a bit over 1000.