Thursday, October 24, 2013

Has Rundll32 run away with your CPU?

So, the truth is you will probably get a call about application slowness and you will see rundll32.exe is taking up all the CPU. You will then proceed to call your server team and tell them to fix it. They will likely tell you that your application is causing it and that rundll32 could be any of a number of things. You will probably yell at them insisting that rundll32 is not part of your application. Luckily I've been a server guy and an application guy so I figured that out myself. But be warned this conversation has and will happen many times.

Easiest thing to start off with is simply trying to figure out what in the world rundll32.exe is actually attempting to do. There are probably many ways to find this but I simply opened up task manager --> clicked on the process tab --> went to the View menu --> Select Columns --> Check the box next to Command Line --> Click Ok.

You will now have an extra column for each process. Find your rundll32.exe process and look at the Command Line column. Hopefully you will see something you recognize but you may find something obscure that requires lots of research...your mileage may vary.

Back to my problem, here is what I found:

rundll32 C:\Windows\system32\spool\DRIVERS\x64\3\hpmsn130.dll,MonitorPrintJobStatus /pjob=31 /pname"printer-c"

That very quickly stood out as a printer related issue because of the spool directory, printer name which wasn't printer-c but changed for this example, MonitorPrintJobStatus, and well those dang hp dlls.

So for a while I cursed printers and HP unified print drivers but realized that wasn't going to fix my problem. I changed the print processor to winprint from the HP specific print processor but that didn't result in a fix.

I proceeded to poke around the printer properties and ran across and option called "Printer Status Notification:" which was the cause of the CPU hogging. I disabled this feature and all was good.

So I went back to cursing HP unified print drivers! But I will save that for another day (we'll call that day never)...I don't like printers.

No comments: