When Windows Profiles Fail and Why
Last updated: 9/6/2002; 10:06:38 AM
The FuzzyBlog!

Marketing 101. Consulting 101. PHP Consulting. Random geeky stuff. I Blog Therefore I Am.

When Windows Profiles Fail and Why

NOTE : This has been on my website since April but I keep getting nice emails about it so I thought I'd blog it.  Ignore if you saw it on my site.

Oh those dirty monkeys! 
Barbados monkey stealing fruit from breakfast

Windows Profiles: Just Pull the Power! 

In another essay, I described how I don't like to fix computers when they break. I just went thru this twice recently with the same problem and I thought my experiences might be useful to someone else since even with the power of Google and QueryServer, I couldn't find an explanation.  After some digging and thinking, I think I now understand it – even if, perhaps, Microsoft doesn't want to admit to the problem.

Here's what happened: 

  • I had been using my computer the night before, doing some development with PHP (if you care) and shut down
  • The next morning when I started up and logged in, I got a message from Windows that "My Profile Could Not Be Loaded" (if I can dig up the screen cap, I'll add it)
  • I was able to log in but every single customization, the Documents menu, Internet Explorer Favorites, Email settings, Access to my Outlook PST – gone!
  • Windows recommended that I create a new account for myself since the profile was corrupted.

Wonderful.  Bloody wonderful.  I dutifully followed Microsoft's directions after searches of http://support.microsoft.com/ yielded not very much.  It put me out of commission for a day or so recreating stuff.  I wasn't happy but I dealt with it.

Then it happened again.  On a different computer.  And I got angry so it was time to figure it out.

Here are my machine configurations:

  • First Crash
    • Emachines Celeron Box
    • 192 megs of Ram
    • Windows 2000 Server
  • Second Crash
    • Compaq Deskpro
    • 256 megs of ram 
    • Windows 2000 

Now, perhaps I can rationalize the first crash as "Emachines isn't all that good" (actually that's true, they really are excellent).  But the second crash??? Compaq makes damn good hardware.  What the heck was going on…

The first step in debugging is looking for commonality:

  • Both profiles were corrupted when I logged in.  This pretty much means that the corruption had been sometime prior.  Given that I generally leave my computers on 24x7, I generally remember my shutdowns.
  • On both machines I had followed my usual work style – which is fairly intensive multitasking (see below)
  • On both machines I had gotten an unusual error message: Out of Memory.  I haven't seen an out of memory error in literally years so this stood out in my memory 

I've had friends kid me about the amount of multitasking I do.  I've also been known as "The King of Browser Windows".  Shown below is a screen capture of my Windows task bar that shows the amount of Windows I generally have open:

Yes, I know that this amounts to a lot of Windows but here's why.

  • Most of them are browser Windows, not programs.  I generally don't run more than Project and FrontPage together along with Outlook and a lightweight code editor.  
  • I view browser windows as "Virtual Paper".  Just as I have a messy desk, I also have a messy set of Windows.  Why?  When you are doing technical work, you need to look stuff up and then test it.  That usually adds up quickly as follows: 
    • A Browser open to Google
    • Four or Five browser windows open to different technical topics, each one usually solving 1/8 to 1/3 of the current problem
    • A window open to Slashdot for relieving development brain fry
    • Two Browser windows open to my SQL database's web based admin tools, one for querying and the other for checking / inserting
    • Four or five browser windows for testing different pages I am developing 

Its pretty easy to add that up and get up to 10 or 15 browser windows and then just add some random surfing to the mix and you get more.

Could it be that lots of browser windows add up to memory loss?  As best as I can tell, the answer is "YES".  I haven't been able to definitively confirm this but its the only answer I have and some links on the web (no, I don't have them handy right now) seem to agree with me.  Even if this is true, why running out of memory affect the profile?

The key here lies in understanding running out of memory and when the Windows profile is saved.  When you run out of memory on a computer, what happens is pretty, well, random.  What seems to have happened to me is that when I ran out of memory, the parts of memory that contained the Windows profile were corrupted.  Windows 2000 (and NT) seems to keep the user's profile entirely in memory at all times.  For performance this makes a lot of sense.  For robustness and safety, it doesn't.  Anyway, this means that when the profile gets corrupted, you have a big problem.  Now, here is the key point: Windows 2000 (and again NT) only writes the profile at Shutdown or Restart.  Its at this point only when the corruption is an issue for you.  If you can avoid the saving of the corrupted profile then you are ok.

Don't Turn it Off: PULL THE PLUG (literally)!

Here is the key thing: If you want to NOT have your profile saved after an out of memory condition, the machine has to move into an off condition.  Note that I didn't say "be turned off".  On newer machines, the power switch actually triggers the Windows shut down process.  It happens on my Compaq Deskpro and I've seen it on other machines.  

Here's what you have to do: Pull The Plug!

This is definitely not advice that I want to give and it is something that you generally shouldn't do but… Here is my process for this: 

  • Close all open applications and browser windows
  • Email and IM too
  • Let your machine sit quietly for ten or minutes or so until you hear NO hard disc activity
  • Reach around the back and pull out the power cord

The reason for this (fairly silly I'll admit) process is that what you don't want to do is turn the power off while the computer is actually writing to disc.  This can cause a hard drive crash and that would be even worse than a corrupted profile.  Still, with Windows (not Linux / Unix), as long as no drive activity is going on, you should be ok with this.

Moral of the story : Watch for this error message if you use Windows 2000 or NT.  Pull the plug. 

Note to Microsoft: Fix Your Search Engine, Please! 

Just a side note to Microsoft, could you please improve the search engine at http://support.microsoft.com/.  I can't remember the last time I had such a bad search experience.  It looks better since Windows XP came out but seems to have the same bad experience underneath.  Among my gripes are that you don't use " " marks for exact phrase searches. I have to open up the advanced options and then pick "Exact Phrase".  Come on here…  Pretty much every search engine on the Internet uses " " marks.  There are some other things that I'll talk about another time.

comment []

Copyright 2002 © The FuzzyStuff