Don't forget to reboot, please

by Michael S. Kaplan, published on 2007/04/24 22:10 -04:00, original URI:

I was told about the cause behind an interesting bug a few hours ago.

The behavior:

A crash in managed code running on Server 2003 with the following call stack:

System.ArgumentException: Culture ID 2155 (0x086B) is not a supported culture.
Parameter name: culture
   at System.Globalization.CultureTableRecord.GetCultureTableRecord(Int32 cultureId, Boolean useUserOverride)
   at System.Globalization.CultureInfo..ctor(Int32 culture, Boolean useUserOverride)
   at System.Globalization.CultureInfo..ctor(Int32 culture)
   at System.Globalization.CultureTable.GetCultures(CultureTypes types)
   at Microsoft.Exchange.Setup.Common.SetupContext.GetExchangeCulture()
   at Microsoft.Exchange.Setup.Common.SetupContext.GetSetupContext(PropertyBag parsedArguments)
   at Microsoft.Exchange.Setup.Common.RootDataHandler.OnReadData()
   at Microsoft.Exchange.Management.SystemManager.WinForms.SingleTaskDataHandler.OnReadData(CommandInteractionHandler interactionHandler)
   at Microsoft.Exchange.Management.SystemManager.WinForms.DataHandler.Read(CommandInteractionHandler interactionHandler)
   at Microsoft.Exchange.Setup.Common.LauncherBase.Run(String[] args)
   at Microsoft.Exchange.Setup.Common.LauncherBase.MainCore[T](String[] args)
   at Microsoft.Exchange.Management.ExSetupUI.ExSetupUI.Main(String[] args)

What is happening?

Well, I guess you could blame it on Service Pack 1 of Server 2003....

Remember ELKs aren't roaming where the servers are?

Well, they fixed that and added a whole bunch of ELKs to Server 2003.

That means they added a whole bunch of registry keys saying that these locales were present and an updated locale.nls that contains the data for those locales.

Unfortunately, locale.nls is one of those files that cannot be replaced without a reboot. So after the service pack is installed, the machine is not rebooted.

Then the machine starts running some managed code that is enumerating all of the locales, including the Windows-only ones that everyone wanted working on Server 2003.

So EnumSystemLocales is claiming a bunch of locales exist which won't really exist until after the reboot that the person installing the service pack decided not to do yet. And the .NET Framework trusts those results and crashes since it was unable to get the data.

SUMMARY: the .NET Framework trusts Windows, Windows trusts the user, and the user trusts reboots after service packs are optional. Or at least optional so that other things can be installed first.

I am not sure how to respond exactly....

Well, other than to suggest that people please reboot after service packs and security updates and such, I mean.


This post brought to you by (U+215b, a.k.a. VULGAR FRACTION ONE EIGHTH)

# Thomas on 24 Apr 2007 10:22 PM:

Wow. That one must've been fun to track down :)

# Michael S. Kaplan on 25 Apr 2007 12:06 AM:

I was told it was an interesting little adventure. :-)

# Michael S. Kaplan on 25 Apr 2007 12:41 AM:

One additional note -- the underlying issue -- attempting to enumerate a locale when the underlying locale turns out to not be valid was addressed in Vista -- so in the future this particular bug won't be possible to hit, even if you don't reboot when you should.

Just think of it as Microsoft enabling bad behavior. :-)

referenced by

2008/05/10 Why Bengali keyboards can't be found on XP 64 bit

go to newer or older post, or back to index or month or day