Home
%3CLINGO-SUB%20id%3D%22lingo-sub-723911%22%20slang%3D%22en-US%22%3EThe%20Case%20of%20the%20Printing%20Failure%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-723911%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3E%20First%20published%20on%20TechNet%20on%20Apr%2012%2C%202010%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3EThe%20most%20interesting%20cases%20I%20receive%20are%20those%20that%20demonstrate%20a%20unique%20troubleshooting%20technique%20or%20uncover%20an%20interesting%20root%20cause.%20I%20received%20this%20one%20recently%20that%20has%20both%20characteristics.%20The%20case%20opened%20when%20a%20systems%20administrator%20got%20a%20report%20from%20a%20user%20that%20they%20were%20unable%20to%20print%20from%20their%20computer.%20There%20was%20no%20visible%20reaction%20to%20clicking%20on%20a%20print%20dialog%20or%20menu%20item%2C%20where%20normally%20they%20saw%20a%20dialog%20stating%20that%20the%20document%20had%20been%20sent%20to%20the%20printer%20and%20a%20tray%20icon%20appear%20representing%20the%20active%20print%20queue.%3C%2FP%3E%0A%20%20%3CP%3EThe%20first%20thing%20the%20administrator%20did%20was%20to%20scan%20the%20event%20logs%20of%20the%20user%E2%80%99s%20machine%2C%20looking%20for%20any%20printing-related%20events.%20He%20quickly%20came%20upon%20two%20that%20correlated%20with%20the%20user%E2%80%99s%20most%20recent%20printing%20attempt%3A%3C%2FP%3E%0A%20%20%3CTABLE%20border%3D%220%22%20cellpadding%3D%222%22%20cellspacing%3D%220%22%20width%3D%22550%22%3E%0A%20%20%20%3CTBODY%3E%0A%20%20%20%20%3CTR%3E%0A%20%20%20%20%20%3CTD%20valign%3D%22top%22%20width%3D%22275%22%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22168%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fblogfiles%2Fmarkrussinovich%2FWindowsLiveWriter%2FTheCaseofthePrintingFailure_C074%2Fimage_thumb_1.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121219i57C214EB4F9294E9%22%20style%3D%22border-bottom%3A%200px%3B%20border-left%3A%200px%3B%20display%3A%20inline%3B%20border-top%3A%200px%3B%20border-right%3A%200px%22%20title%3D%22image%22%20width%3D%22278%22%20%2F%3E%3C%2FTD%3E%0A%20%20%20%20%20%3CTD%20valign%3D%22top%22%20width%3D%22275%22%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22192%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fblogfiles%2Fmarkrussinovich%2FWindowsLiveWriter%2FTheCaseofthePrintingFailure_C074%2Fimage_thumb_2.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121220iEDEC724A86192CF8%22%20style%3D%22border-bottom%3A%200px%3B%20border-left%3A%200px%3B%20display%3A%20inline%3B%20border-top%3A%200px%3B%20border-right%3A%200px%22%20title%3D%22image%22%20width%3D%22278%22%20%2F%3E%3C%2FTD%3E%0A%20%20%20%20%3C%2FTR%3E%0A%20%20%20%3C%2FTBODY%3E%0A%20%20%3C%2FTABLE%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3EIt%20appeared%20that%20the%20Spooler%20Service%20started%20when%20the%20user%20tried%20to%20print%2C%20but%20terminated%2C%20apparently%20with%20an%20exception%20(unexpectedly)%2C%20about%20a%20minute%20later.%20The%20question%20was%20why%3F%3C%2FP%3E%0A%20%20%3CP%3EThe%20administrator%20turned%20to%20%3CA%20href%3D%22http%3A%2F%2Ftechnet.microsoft.com%2Fen-us%2Fsysinternals%2Fdd996900.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Sysinternals%20Procdump%20%3C%2FA%3E%20.%20Procdump%20is%20a%20utility%20that%20generates%20crash%20dump%20files%20of%20a%20process%20when%20triggers%20you%20specify%20occur.%20Implemented%20triggers%20include%20CPU%20usage%2C%20virtual%20memory%20usage%2C%20unhandled%20exceptions%2C%20and%20process%20termination.%20You%20can%20use%20the%20CPU%20usage%20trigger%2C%20for%20example%2C%20to%20capture%20the%20state%20of%20a%20process%20when%20it%20hits%20a%20short-lived%20CPU%20burst%2C%20allowing%20you%20to%20look%20into%20the%20process%20to%20see%20the%20reason%20for%20the%20spike.%20The%20administrator%20guessed%20that%20the%20stack%20trace%20of%20the%20terminating%20thread%20might%20provide%20a%20clue.%3C%2FP%3E%0A%20%20%3CP%3EHe%20knew%20that%20he%20had%20some%20time%20to%20get%20Procdump%20running%20after%20the%20Spooler%20Service%20started%2C%20so%20he%20launched%20Notepad%2C%20tried%20to%20print%2C%20and%20then%20executed%20Procdump%20with%20the%20%E2%80%93e%20option%20and%20the%20name%20of%20the%20Spooler%20Service%20process%20(Spoolsv)%20to%20have%20Procdump%20wait%20until%20the%20service%20exited%20before%20writing%20the%20dump%20file.%20A%20few%20seconds%20later%20Procdump%20reported%20that%20it%20had%20completed%20the%20job%20and%20saved%20a%20dump%20file%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22294%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fblogfiles%2Fmarkrussinovich%2FWindowsLiveWriter%2FTheCaseofthePrintingFailure_A91F%2Fimage_thumb_6.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121221i7FF0F03FBA6A2F0E%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22454%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3EHe%20opened%20the%20dump%20in%20Windbg%20and%20executed%20the%20%E2%80%98k%E2%80%99%20command%2C%20which%20has%20Windbg%20dump%20the%20stack%20of%20the%20thread%20that%20caused%20the%20crash.%20The%20stack%20trace%2C%20which%20essentially%20lists%20a%20record%20of%20the%20function%20calls%20executed%20before%20the%20crash%2C%20showed%20that%20the%20process%20died%20in%20a%20sequence%20of%20calls%20that%20included%20several%20Ldr%20functions%2C%20including%20LdrpLoadDll%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22252%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fblogfiles%2Fmarkrussinovich%2FWindowsLiveWriter%2FTheCaseofthePrintingFailure_A91F%2Fimage_thumb_7.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121222i65A7C48BF66F6153%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22554%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EA%20web%20search%20revealed%20that%20%3CA%20href%3D%22http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Fmagazine%2Fcc301727.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20LdrpLoadDll%20%3C%2FA%3E%20is%20a%20function%20related%20to%20the%20system%E2%80%99s%20DLL%20loader.%20Suspecting%20that%20the%20process%20was%20dying%20either%20because%20it%20couldn%E2%80%99t%20find%20a%20DLL%20it%20was%20looking%20for%20or%20was%20loading%20an%20incorrect%20DLL%2C%20he%20turned%20to%20%3CA%20href%3D%22http%3A%2F%2Ftechnet.microsoft.com%2Fen-us%2Fsysinternals%2Fbb896645.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Process%20Monitor%20%3C%2FA%3E%20%2C%20which%20would%20enable%20him%20to%20see%20the%20process%E2%80%99s%20DLL-related%20file%20system%20activity.%20He%20started%20Process%20Monitor%2C%20attempted%20to%20print%20again%2C%20and%20then%20stopped%20the%20capture.%20Working%20his%20way%20from%20the%20end%20of%20the%20trace%20back%20to%20the%20beginning%2C%20he%20scanned%20for%20hints%20of%20the%20root%20cause.%20Shortly%20before%20Spoolsvc%20exited%2C%20he%20saw%20it%20searching%20unsuccessfully%20for%20Localspl.dll%20in%20various%20directories%20on%20the%20system%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22208%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fblogfiles%2Fmarkrussinovich%2FWindowsLiveWriter%2FTheCaseofthePrintingFailure_A91F%2Fimage_thumb.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121223i3356127E5DDFD908%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22554%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EHe%20assumed%20that%20the%20DLL%20was%20supposed%20to%20be%20there.%20When%20he%20looked%20at%20an%20another%20identically%20configured%20Windows%20XP%20system%20on%20his%20network%2C%20he%20found%20Localspl.dll%20in%20the%20%5CWindows%5CSystem32%20directory%2C%20but%20not%20on%20the%20system%20experiencing%20the%20problem%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22160%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fblogfiles%2Fmarkrussinovich%2FWindowsLiveWriter%2FTheCaseofthePrintingFailure_C074%2Fimage_thumb_3.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121224i070B86BEAEF8B46E%22%20style%3D%22border-bottom%3A%200px%3B%20border-left%3A%200px%3B%20display%3A%20inline%3B%20border-top%3A%200px%3B%20border-right%3A%200px%22%20title%3D%22image%22%20width%3D%22311%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EThe%20file%E2%80%99s%20description%20reported%20it%20to%20be%20the%20Local%20Spooler%20DLL%2C%20which%20explained%20the%20Spooler%E2%80%99s%20inability%20to%20support%20printing%20operations.%20After%20he%20copied%20the%20file%20from%20the%20working%20system%2C%20he%20was%20able%20to%20print%20successfully.%3C%2FP%3E%0A%20%20%3CP%3EAs%20far%20as%20the%20user%20was%20concerned%2C%20the%20case%20was%20closed%20and%20he%20was%20able%20to%20get%20back%20to%20work%2C%20but%20the%20administrator%20was%20left%20with%20the%20question%20of%20what%20had%20happened%20to%20the%20original%20DLL.%20Another%20web%20search%20turned%20up%20forum%20posts%20from%20others%20that%20had%20experienced%20the%20same%20problem.%20%3CA%20href%3D%22http%3A%2F%2Fwww.computing.net%2Fanswers%2Fwindows-2000%2Fevent-id-7031-the-print-spooler-%2F49121.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EOne%20post%20in%20particular%20%3C%2FA%3E%20described%20the%20exact%20symptoms%20he%E2%80%99d%20seen%2C%20including%20the%20event%20log%20entries%2C%20suggested%20the%20same%20fix%20of%20copying%20Localspl.dll%20from%20another%20system%2C%20and%20blamed%20uninstallers%20of%20third-party%20print%20and%20fax%20software%20for%20incorrectly%20deleting%20Localspl.dll%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22302%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fblogfiles%2Fmarkrussinovich%2FWindowsLiveWriter%2FTheCaseofthePrintingFailure_A91F%2Fimage_thumb_3.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121225iB3450BAE0053D6E8%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22454%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EHe%20couldn%E2%80%99t%20say%20for%20certain%20that%20was%20the%20case%20for%20this%20particular%20system%20because%20the%20end%20user%20didn%E2%80%99t%20remember%20uninstalling%20printing%20or%20fax%20software%2C%20but%20the%20post%20had%20at%20least%20given%20him%20a%20plausible%20theory%20to%20replace%20the%20unease%20he%20would%20have%20been%20left%20with%20that%20files%20were%20mysteriously%20being%20deleted%20from%20his%20systems.%20He%20could%20now%20close%20the%20case%20thanks%20to%20Procdump%20and%20Process%20Monitor.%3C%2FP%3E%0A%20%20%3CP%3EIf%20you%20solve%20an%20interesting%20case%20with%20Sysinternals%20tools%2C%20please%20send%20me%20screenshots%20(.PNG%20preferred)%20and%20log%20files%20so%20that%20I%20can%20share%20them%20with%20others%20in%20this%20blog%20and%20my%20presentations.%3C%2FP%3E%0A%20%0A%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-723911%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20TechNet%20on%20Apr%2012%2C%202010%20The%20most%20interesting%20cases%20I%20receive%20are%20those%20that%20demonstrate%20a%20unique%20troubleshooting%20technique%20or%20uncover%20an%20interesting%20root%20cause.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-723911%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMark%20Russinovich%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft
First published on TechNet on Apr 12, 2010

The most interesting cases I receive are those that demonstrate a unique troubleshooting technique or uncover an interesting root cause. I received this one recently that has both characteristics. The case opened when a systems administrator got a report from a user that they were unable to print from their computer. There was no visible reaction to clicking on a print dialog or menu item, where normally they saw a dialog stating that the document had been sent to the printer and a tray icon appear representing the active print queue.

The first thing the administrator did was to scan the event logs of the user’s machine, looking for any printing-related events. He quickly came upon two that correlated with the user’s most recent printing attempt:

image image

It appeared that the Spooler Service started when the user tried to print, but terminated, apparently with an exception (unexpectedly), about a minute later. The question was why?

The administrator turned to Sysinternals Procdump . Procdump is a utility that generates crash dump files of a process when triggers you specify occur. Implemented triggers include CPU usage, virtual memory usage, unhandled exceptions, and process termination. You can use the CPU usage trigger, for example, to capture the state of a process when it hits a short-lived CPU burst, allowing you to look into the process to see the reason for the spike. The administrator guessed that the stack trace of the terminating thread might provide a clue.

He knew that he had some time to get Procdump running after the Spooler Service started, so he launched Notepad, tried to print, and then executed Procdump with the –e option and the name of the Spooler Service process (Spoolsv) to have Procdump wait until the service exited before writing the dump file. A few seconds later Procdump reported that it had completed the job and saved a dump file:

image

He opened the dump in Windbg and executed the ‘k’ command, which has Windbg dump the stack of the thread that caused the crash. The stack trace, which essentially lists a record of the function calls executed before the crash, showed that the process died in a sequence of calls that included several Ldr functions, including LdrpLoadDll:

image

A web search revealed that LdrpLoadDll is a function related to the system’s DLL loader. Suspecting that the process was dying either because it couldn’t find a DLL it was looking for or was loading an incorrect DLL, he turned to Process Monitor , which would enable him to see the process’s DLL-related file system activity. He started Process Monitor, attempted to print again, and then stopped the capture. Working his way from the end of the trace back to the beginning, he scanned for hints of the root cause. Shortly before Spoolsvc exited, he saw it searching unsuccessfully for Localspl.dll in various directories on the system:

image

He assumed that the DLL was supposed to be there. When he looked at an another identically configured Windows XP system on his network, he found Localspl.dll in the \Windows\System32 directory, but not on the system experiencing the problem:

image

The file’s description reported it to be the Local Spooler DLL, which explained the Spooler’s inability to support printing operations. After he copied the file from the working system, he was able to print successfully.

As far as the user was concerned, the case was closed and he was able to get back to work, but the administrator was left with the question of what had happened to the original DLL. Another web search turned up forum posts from others that had experienced the same problem. One post in particular described the exact symptoms he’d seen, including the event log entries, suggested the same fix of copying Localspl.dll from another system, and blamed uninstallers of third-party print and fax software for incorrectly deleting Localspl.dll:

image

He couldn’t say for certain that was the case for this particular system because the end user didn’t remember uninstalling printing or fax software, but the post had at least given him a plausible theory to replace the unease he would have been left with that files were mysteriously being deleted from his systems. He could now close the case thanks to Procdump and Process Monitor.

If you solve an interesting case with Sysinternals tools, please send me screenshots (.PNG preferred) and log files so that I can share them with others in this blog and my presentations.