For a while now, I’ve been noticing that my Windows printer list would come up empty in the control panel, or when I tried to print something, I’d get an error that indicates that the Print Spooler service is not running. Going and manually starting the Print Spooler service fixes the problem, but that’s silly, why should I have to do it? Why is the Print Spooler service stopping at all?
Well, the cheesiest way to fix this problem is to set the Print Spooler service to automatically after failure. Visit the Print Spooler service properties in the Services module in the MMC and click on the “Recovery” tab. I found the default settings to be “Restart the Service” for first and second failures, but not for subsequent failures. Set all three of the options to “Restart the Service.”
Alright… problem solved.
Except the Print Spooler service is still crashing, as I can see in the reliability monitor:
What’s this? Some of these crashes are 10 minutes apart or less? Even though the Print Spooler restart every time it crashes, I’d like to get rid of the crashes altogether.
Looking at the system event logs, I found error messages that correspond to the service crash times that look like this:
Faulting application name: spoolsv.exe, version: 6.1.7600.16385, time stamp: 0x4a5bd3d1
Faulting module name: wsdapi.dll, version: 6.1.7600.16385, time stamp: 0x4a5be0a1
Exception code: 0xc0000005
Fault offset: 0x000000000000769a
Faulting process id: 0x1340
Faulting application start time: 0x01cb3e447c97686a
Faulting application path: C:\Windows\System32\spoolsv.exe
Faulting module path: C:\Windows\System32\wsdapi.dll
Report Id: d1e7f7eb-aa38-11df-b6ff-caee131491bf
Ah ha! wsdapi.dll is blamed for crashing the Print Spooler service. Some research indicates that this DLL is used to talk to printers configured to print via WSD, or Web Services for Devices.
Turns out that we have a couple of printers at the office where I work that support WSD, and Windows 7 had automatically chosen WSD when I set them up using the printer setup wizard. By the way, you can check to see if you have any printers set up to use WSD by opening Print Management (find it using the Start Menu search), and then clicking on Print Servers -> (your computer) -> Ports. Any WSD ports will have a name starting with “WSD.”
Now, I don’t know if this crash is because of Microsoft’s WSD support, or flaky printer drivers, or a flaky WSD implementation on the printer itself, or what. All of the print drivers I am using are either the ones bundled with Windows 7 or ones provided automatically by Windows Update, though. Anyway, I decided to delete the WSD printers and set them up again using plain old TCP/IP printing without WSD, to see if that cured the problem. Sure enough, it did. Here’s how it goes.
In the printer setup wizard, after telling it you want to search for a network printer, make sure you choose the option that says your printer was not listed (even if it was).
Then say you want to add a printer by its IP address.
Then set the device type to “TCP/IP Device” instead of “Autodetect” or “WSD”…
And then, type in the IP address.
Then complete the printer setup as normal and repeat for any other WSD printers that you have. If you got them all, no more crashes due to WSD!
Update: September 17, 2010
Barnkeeper below in the comments suggests that this is related to security issue MS10-061 (corrected by update KB2347290). I have tested this and confirmed that the update does not fix the problem. The Print Spooler service continues to crash even with the update applied.
Update: February 3, 2011
This issue still occurs in Windows 7 Service Pack 1.