Microsoft KB Archive/889095

From BetaArchive Wiki
Knowledge Base


FIX: An MFC application stops running when a thread deadlock condition occurs in Visual Studio .NET 2003

Article ID: 889095

Article Last Modified on 5/15/2006



APPLIES TO

  • Microsoft Visual Studio .NET 2003 Enterprise Architect
  • Microsoft Visual Studio .NET 2003 Enterprise Developer
  • Microsoft Visual Studio .NET 2003 Academic Edition




SYMPTOMS

A Microsoft Foundation Class (MFC) application stops running when a thread deadlock condition occurs in Microsoft Visual Studio .NET 2003.

CAUSE

This problem occurs when two threads in the MFC code are in a thread deadlock condition. In the thread deadlock condition, one thread is trying to load an MFC .dll file. The other thread is calling any function that in turn calls the FindResource function. This problem occurs with operating systems that have Multilingual User Interface (MUI) installed.

The deadlock stack is similar to the following:

0:000> kbL
ChildEBP RetAddr Args to Child 
0012eb74 77f5c534 77f69f68 00000458 00000000 SharedUserData!SystemCallStub+0x4
0012eb78 77f69f68 00000458 00000000 00000000 ntdll!ZwWaitForSingleObject+0xc
0012ec00 77f5b2e6 01fc1774 77f6024e 77fc1774 ntdll!RtlpWaitForCriticalSection+0x125
0012ec08 77f6024e 77fc1774 00000000 0012faac ntdll!RtlEnterCriticalSection+0x46
0012ec44 77f7825a 00000001 00000000 0012f96c ntdll!LdrLockLoaderLock+0xea
0012f998 77f7631c 43900000 00000000 00157030 ntdll!LdrLoadAlternateResourceModule+0x40
0012fa64 77f77c8d 43900000 0012fa34 00000000 ntdll!LdrpSearchResourceSection_U+0x230
0012fa7c 77e6d398 43900000 0012faac 00000003 ntdll!LdrFindResource_U+0x17
0012fad0 7c26a1ee 43900000 0000021f 00000006 kernel32!FindResourceW+0x60
0012fae0 7c28c287 43900000 000021e2 0012fb30 MFC71U!ATL::AtlGetStringResourceImage+0x18
0012fafc 7c26226f 000021e2 00000000 4211e335 MFC71U!AfxFindStringResourceHandle+0x55
0012fb08 4211e335 000021e2 0ed6d3d0 7c32ea74 MFC71U!ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > >::LoadStringW+0xc

0:011> kbL
ChildEBP RetAddr Args to Child 
187ae4cc 77f5c534 77f69f68 000004b4 00000000 SharedUserData!SystemCallStub+0x4
187ae4d0 77f69f68 000004b4 00000000 00000000 ntdll!ZwWaitForSingleObject+0xc
187ae558 77f5b2e6 0032ed60 7c2745ac 7c32ed60 ntdll!RtlpWaitForCriticalSection+0x125
187ae560 7c2745ac 7c32ed60 00000000 0ed89298 ntdll!RtlEnterCriticalSection+0x46
187ae574 7c25ae1b 00000000 00000000 00000001 MFC71U!AfxLockGlobals+0x5d
187ae598 7c3001bb 7c32c140 00000001 0ed89298 MFC71U!CDynLinkLibrary::CDynLinkLibrary+0x63
187ae5b8 0f8ebcd5 00000000 00000000 00000001 MFC71U!AfxCoreInitModule+0x2c
187ae5d4 0f8ec385 0f800000 00000000 00000000 PEICathBasicsDB!DllMain+0x1c
187ae610 77f5b42c 0f800000 00000001 00000000 PEICathBasicsDB!_DllMainCRTStartup+0x71
187ae630 77f56771 0f8ec314 0f800000 00000001 ntdll!LdrpCallInitRoutine+0x14
187ae72c 77f6151e 00000000 00000000 c0150008 ntdll!LdrpRunInitializeRoutines+0x32f
187ae9c0 77f570e0 00000000 001551a8 187aec94 ntdll!LdrpLoadDll+0x372
187aec54 77e7d901 001551a8 187aec94 187aec8c ntdll!LdrLoadDll+0x1c5
187aecbc 771ccd63 187aed30 00000000 00000008 kernel32!LoadLibraryExW+0x18e
187aece0 771ccc89 187aed30 187aed08 187aed0c ole32!CClassCache::CDllPathEntry::LoadDll+0x6f
187aed10 771cc6f0 187aed30 187aefdc 187aef60 ole32!CClassCache::CDllPathEntry::Create_rl+0x35
187aef50 771cc5e0 00000001 187aefdc 00000000 ole32!CClassCache::CClassEntry::CreateDllClassEntry_rl+0xc0
187aef98 771cc543 00000001 001e496c 187aefc0 ole32!CClassCache::GetClassObjectActivator+0x193
187aefc4 771cd72f 187aefdc 772bbc80 187af598 ole32!CClassCache::GetClassObject+0x21
187af02c 771cc097 772bbc7c 00000000 00000001 ole32!CServerContextActivator::CreateInstance+0xef

RESOLUTION

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

Date             Time       Version        Size        File name     
-------------------------------------------------------------------
08-November-2004 13:44:45   7.10.4301.0      89,088    Atl71.dll
08-November-2004 15:01:51   7.10.4301.0   1,060,864    Mfc71.dll
08-November-2004 14:35:14   7.10.4301.0      40,960    Mfc71chs.dll
08-November-2004 14:35:14   7.10.4301.0      45,056    Mfc71cht.dll
08-November-2004 14:28:00   7.10.4301.0   2,187,264    Mfc71d.dll
08-November-2004 14:35:13   7.10.4301.0      65,536    Mfc71deu.dll
08-November-2004 14:35:14   7.10.4301.0      57,344    Mfc71enu.dll
08-November-2004 14:35:14   7.10.4301.0      61,440    Mfc71esp.dll
08-November-2004 14:35:13   7.10.4301.0      61,440    Mfc71fra.dll
08-November-2004 14:35:13   7.10.4301.0      61,440    Mfc71ita.dll
08-November-2004 14:35:13   7.10.4301.0      49,152    Mfc71jpn.dll
08-November-2004 14:35:14   7.10.4301.0      49,152    Mfc71kor.dll
08-November-2004 14:53:45   7.10.4301.0   1,049,088    Mfc71u.dll
08-November-2004 14:29:28   7.10.4301.0   2,180,096    Mfc71ud.dll

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates



Additional query words: Content Maintenance Bug 29632

Keywords: kbbug kbfix kbqfe kbhotfixserver KB889095