FIX: A COM+ application that uses the global interface table (GIT) may deadlock (298014)
The information in this article applies to:
- Microsoft COM+ 1.0, when used with:
- Microsoft Windows 2000 Professional SP1
- Microsoft Windows 2000 Server SP1
- Microsoft Windows 2000 Advanced Server SP1
- Microsoft Windows 2000 Professional SP2
- Microsoft Windows 2000 Server SP2
- Microsoft Windows 2000 Advanced Server SP2
- Microsoft Windows XP Home Edition
- Microsoft Windows XP Professional
- Microsoft COM+ 1.5, when used with:
- Microsoft Windows 2000 Professional SP1
- Microsoft Windows 2000 Server SP1
- Microsoft Windows 2000 Advanced Server SP1
- Microsoft Windows 2000 Professional SP2
- Microsoft Windows 2000 Server SP2
- Microsoft Windows 2000 Advanced Server SP2
- Microsoft Windows XP Home Edition
- Microsoft Windows XP Professional
This article was previously published under Q298014 Important This article contains information about how to modify the
registry. Make sure to back up the registry before you modify it. Make sure
that you know how to restore the registry if a problem occurs. For more
information about how to back up, restore, and modify the registry, click the
following article number to view the article in the Microsoft Knowledge Base: 256986 Description of the Microsoft Windows registry SYMPTOMS A COM+ process may appear to stop responding (hang). This
specific issue is rare. You must debug the application to fully diagnose the
issue. If you experience this issue, multiple threads in the process show call
stacks that involve access to the global interface table (GIT).
You
do not have to access the GIT explicitly in your code to experience this issue.
Some other component that you use can access the GIT.CAUSEThis issue may occur if one of the following conditions is
true:
- You use COM+ synchronized activities and the JScript
components.
- You use JScript explicitly. For example, you use Windows
Script Components (WSC) in a COM+ application.
- You use JScript indirectly. For example, the Microsoft XML
(MSXML) parser uses JScript to perform an XSL transform.
- You use COM+ components that are written by using managed
code, such as Visual C# or Visual Basic .NET. Also, you do not explicitly call
the Dispose method on these objects in versions of Microsoft Windows earlier
than Microsoft Windows Server 2003.
RESOLUTIONNote- COM+ applications that use Microsoft .NET System.EnterpriseServices.ServicedComponent objects are also known as managed COM+ applications.
- COM+ applications that do not use Microsoft .NET System.EnterpriseServices.ServicedComponent objects are also known as unmanaged COM+ applications.
If you experience this issue in COM+ applications that use
Microsoft .NET System.EnterpriseServices.ServicedComponent objects, make sure that the client code calls the Dispose method on every ServicedComponent instance. The correct approach is the systematic use of the Dispose method by the client of the ServicedComponent objects to enable deterministic cleanup. All client
applications are required to call the Dispose method on all ServicedComponent instances, even unmanaged COM client applications. For
more information about Microsoft .NET Enterprise Services, visit the following
Microsoft Web site: If you experience this problem in COM+ applications that do not
use Microsoft .NET System.EnterpriseServices.ServicedComponent objects, you can use a registry value that is named
GipActivityBypass to resolve the problem. To use this registry value on
Microsoft Windows 2000, you must first either install Windows 2000 Service Pack
3 or obtain Microsoft COM+ Hotfix Rollup 18.1. For more information, click the following article
number to view the article in the Microsoft Knowledge Base: 313582
Availability of Windows 2000 Post-Service Pack 2 COM+ Hotfix Rollup Package 18.1
To resolve this problem, obtain the latest
service pack for Windows 2000. For more information, click the following
article number to view the article in the Microsoft Knowledge Base: 260910 How to obtain the latest Windows 2000 service pack
Warning Serious problems might occur if you modify the registry
incorrectly by using Registry Editor or by using another method. These problems
might require that you reinstall your operating system. Microsoft cannot
guarantee that these problems can be solved. Modify the registry at your own
risk. To enable the fix on Windows 2000 or on Windows XP, you
must create this additional registry value: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\COM3\GipActivityBypass To do this, follow these steps:
- Start Registry Editor.
- Locate and then click the following key in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\COM3 - On the Edit menu, point to
New, and then click DWORD Value.
- Type GipActivityBypass, and then
press ENTER.
- On the Edit menu, click
Modify.
- Type 1, and then click
OK.
If this registry value is not present, the assumed value is
zero (False). Therefore, the GIT code must wait to enter the COM+ activity.
This behavior could cause a deadlock condition. A non-zero value (True) as
shown enables the new behavior, and then avoids the deadlock condition.
Note This registry value will enable calls to the GetInterfaceFromGlobal method to pass through the activity lock. If an unmanaged COM+
application experiences deadlocks when it calls the RevokeInterfaceFromGlobal method or the RegisterInterfaceInGlobal method, contact Microsoft Support. WORKAROUNDIf you experience this problem in managed COM+ applications,
you can apply the hotfix that is described in the following Microsoft Knowledge
Base article as a temporary workaround: 875503 FIX: Slow performance, deadlocks, and memory leaks may occur when applications do not call the Dispose method on all instances of the ServicedComponent class in the .NET Framework
Alternatively, as a temporary workaround, you can
use a registry value that is named DisableAsyncFinalization. Note You should only use the DisableAsyncFinalization registry value
as a temporary workaround while you are implementing the solution that is
mentioned in the "Resolution" section. If you rely on the DisableAsyncFinalization registry value and you do not use the Dispose method, you will experience increased memory usage, decreased
performance, and possible failure of the application. To create the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\COM3\System.EnterpriseServices\DisableAsyncFinalization
registry value on Windows XP or on Windows 2000, follow these steps:
- Start Registry Editor.
- Locate and then click the following key in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\COM3\System.EnterpriseServices Note If you do not find the System.EnterpriseServices key under
COM3, create the registry key. To do this, follow these steps:
- On the Edit menu, point to
New, and then click Key.
- Type System.EnterpriseServices,
and then press ENTER.
- On the Edit menu, point to
New, and then click DWORD Value.
- Type DisableAsyncFinalization, and
then press ENTER.
- On the Edit menu, click
Modify.
- Type 1 in the Value
data box, and then click OK.
STATUSMicrosoft
has confirmed that this is a problem in the Microsoft products that are listed
in the "Applies to" section. This problem was first corrected in Windows
2000 Service Pack 3.
Modification Type: | Minor | Last Reviewed: | 5/12/2006 |
---|
Keywords: | kbbug kbfix kbQFE kbWin2000PreSP3Fix kbWin2000sp3fix KB298014 kbAudDeveloper |
---|
|