I’ll be in New York City from Thursday, I have too many things to prepare right now, and I don’t have time to end this story. Anyway, I thought it might be interesting to write something about this strange behaviour. It’s only a sort of preview, I hope to complete it in the near future.
I have a new printer, it’s an hp c4380. Don’t know if it’s good or not, I don’t print too much. It was really easy to install and it works fine for me, I have nothing to complain about it… until some days ago when I noticed something strange. When the system starts, I sometimes happen to see the cpu at 100%:

As you can see it happens when the system starts. It’s one of the starting process for sure. I opened ProcessExplorer just to have an idea about what’s going on:

Svchost is used to load one or more services, there’s a specific list of services to load inside the registry. The problem doesn’t reside in svchost process, but it’s inside the specific loaded service. How to find it? ProcessExplorer is a great tool, it gives out a lot of information. Just click on the process item and you will have all the necessary information about the process. I’m interested in the command line section which is: “C:\WINDOWS\system32\svchost.exe -k HPService”. Ok, the problem should be inside HPService. To locate the name of the dll you can browse through the process properties, you’ll easily find out the dll: HPSLPSVC32.DLL
This service belongs to hp printer and it’s used to check hp’s peripherals connected through the net. The service is automatically started (have a look at services.msc utility). I made some tries discovering that the problem arises when one or more computers connected to the lan are offline. I’m pretty sure there’s an error inside the dll, but how to find out where the problem is located at? In case like that, when the cpu works at 100%, the problem resides inside a loop. The process is waiting for something that won’t be received; it’s impossible to quit from it due to of a programming error. It could be an error on a variable initialization/update but there are many possibilities, there’s not a general explaination.
What I did is to attach a debugger to the right svchost process hinstance. It’s pretty easy to locate the guilty loop, you only have to break on dll access. Here’s a snippet taken from the loop I was talking before:
10025D00 mov eax, dword_100AC550
10025D05 mov ecx, [edi+4]
10025D08 push eax ; dwMilliseconds: 1000 ms
10025D09 push ecx ; hHandle
10025D0A call ebx ; WaitForSingleObject
10025D0C mov edx, [edi+10h]
10025D0F push edx ; hEvent = 0
10025D10 mov esi, eax ; eax = WAIT_FAILED
10025D12 call ebp ; SetEvent
10025D14 cmp esi, WAIT_TIMEOUT
10025D1A jnz short loc_10025D27
10025D1C mov eax, [edi]
10025D1E mov edx, [eax+24h]
10025D21 mov ecx, edi
10025D23 call edx ; call sub_100255E0
10025D25 jmp short loc_10025D00
10025D27 cmp esi, WAIT_FAILED
10025D2A jnz short loc_10025D3A
10025D2C mov eax, dword_100AC550
10025D31 push eax ; dwMilliseconds
10025D32 call ds:Sleep
10025D38 jmp short loc_10025D00
Well, as you can see from the comments there are two problems:
1. WaitForSingleObject returns WAIT_FAILED
2. SetEvent’s parameter is 0
I tried to call GetLastError after the two calls and the result was an ERROR_INVALID_HANDLE system error code. Pretty obvious eh!
I don’t know where to look for now, an error on CreateEvent’s return value could be an answer. After a quick glance everything seems to be ok, but I need to check carefully.
The problem occours to many people out there. It was reported on HP forum support in March 2007, but the problem still exists. To solve (momentarily) it, it’s pretty easy: just set the service from automatic to manual… Anyway it could be interesting to find out where the problem resides, I’ll try to check when my trip will end.
February 5, 2008 at 6:32 am
this is very very good post about a very very large bug in svchost.exe. I had and have similar problem but now I know What IS that damny problem.
Thank you very very much & Good lock at any time ;).
February 9, 2008 at 12:31 am
Thanks so much.
It´s very difficult understand what happen with companies like HP. They would be solve the problem and communicate to everybody. What can do people with a basic acknowledgments on computers, with the computer only working for HP errors.
February 11, 2008 at 3:38 am
[...] at-fault svchost.exe was tied to the “HP Network Devices Support” service. the service apparently has a bug that HP hasn’t yet fixed. the service doesn’t do much other than locate your networked [...]
February 28, 2008 at 9:32 pm
Great post about this bug in the svchost.exe. My laptop cpu’s been at 100% ever since I got a c4380. Seems no permanent cure has been found. Were you able to get to the bottom of this?
February 29, 2008 at 12:42 am
Go to “Start” then “Run” type services.msc and press enter. Look for HP Network Devices Support” double click and change startup type to Manual.
Apply and close, then restart.
Hope this helps,
Jim
The Abacus Group
February 29, 2008 at 12:47 pm
Tequila: Jim’s procedure will help you to avoid the problem, but it would be better to see a fix by HP developers. They know, but seems like they don’t want to fix it…
I’ll try to take a deeper look at the problem later.
May 24, 2008 at 6:52 pm
Hi,
I encountered the same problem with the brand new C7280. The problem on my computer looks similar, except for the fact that it does not eat up all my processing speed, but “just” uses 30% of my CPU every 5 seconds or so.
If you start up the HP solution center, the CPU load will rise as well.
I suspect that the HP solution Center actually needs this service, otherwise it can’t locate the printer (as I found out). The question is: do you really need the Solution Center software? No, if you only want to print.
Joost
March 15, 2009 at 6:08 am
It’s true that you need the service, but only at boot or if you add a new printer. It’s purpose is to look for any new printers added to your network. I just open up Windows Task Manager after every boot and kill that svchost.exe process. All the printers that were up and running during boot will be accessable.
HP should be ashamed of themselves for leaving a bug like this around for years. It’s mentioned on several discussions on HP’s website, yet still HP hasn’t fixed it.
I just found this alleged fix, but haven’t tried it:
http://www.technibble.com/how-to-fix-svchost-using-100-cpu-memory-leak/
Since my workaround seems to meet my needs and since I only reboot this particular computer once a month or less, it’s not a big deal for me to just kill that process after every boot. If you reboot more frequently, maybe it’s worth your trouble to install this fix. Please post your results…
korz
June 16, 2009 at 3:03 pm
Clean out those nasty little bugs.
The antispyware solution from Orbasoft is one of the best scanners I’ve found so far to help me clean out those nasty little bugs that slows down my computer and causes it to freeze up or crash. It keeps my computer running like new and best of all it cost less than many of the other better known scanners that have been available for awhile now. I was glad that I finally found a scan that works and that’s so affordable. Orbasoft Antispyware is the best scanner I’ve used so far and you can find out more information by simply visiting http://www.orbasoft.com
February 28, 2012 at 7:34 am
Fashion Whistle…
[...]HP printer and cpu at 100% « My infected computer[...]…