Friday, January 29, 2010

STOP 0x0000003B: SYSTEM_SERVICE_EXCEPTION

For a Windows System Administrator there's nothing that can ruin your day more than a Blue Screen of Death (BSOD).  Worse still is a server that goes into a BSOD loop and neither Safe Mode nor the Last Known Good Profile get it to boot into the operating system.  I worked on such a server earlier this week.  As part of my troubleshooting efforts I googled for clues as to what exactly the SYSTEM_SERVICE_EXCEPTION error was supposed to be telling me.  I never did find the exact solution to my problem, but the error pretty clearly referred to a device driver.  A round of Windows security patches had just been installed and that turned out to be at the heart of the problem.  This particular server had a defective hardware driver that caused it to periodically crash and one of those crashes occurred while Windows was in the midst of configuring the updates that had just been installed.  The poor timing of the crash rendered Windows unbootable with the BSOD loop.

Here are the steps that I used to recover this Windows Server 2008 Enterprise SP2 x64 server:
  1. Boot from a Server 2008 DVD or a "Diagnostics and Recovery Toolset" (DaRT) 6.0 CD
  2. Allow Startup Repair to run even though failure is expected
  3. Select "View advanced options for system recovery" and open the Command Prompt
  4. Change directory to C:\WINDOWS\WINSXS
  5. Rename pending.xml to pending.bad, then eject the media and reboot (a BSOD may occur if the server is SAN attached due to the defect described in KB961891 so power-cycle if necessary)
  6. Attempt to boot Windows normally but don't be surprised to see the STOP 0x3B again (this step is needed to trigger another Startup Repair)
  7. Boot from the Server 2008 DVD or the DaRT 6.0 CD again
  8. Startup Repair should work this time so let it run until it finishes, then eject the media and reboot
  9. Server should now boot into Windows but any attempt to install a Windows update will fail
  10. Log on and run regedit
  11. Export the HKEY_LOCAL_MACHINE\COMPONENTS key and save the file to a temporary folder (in the unlikely event you need to rollback the next step)
  12. Delete the AdvancedInstallersNeedResolving and PendingXmlIdentifier values from the HKEY_LOCAL_MACHINE\COMPONENTS key (see KB946414)
  13. Reboot one more time to validate the issue has been resolved and Windows is happy :)

0 comments: