CAUSE
When the .NET application appears to stop responding, this non-responsive condition is a result of a deadlock condition that involves all the following:
- The .NET Framework
- The garbage collector
- The Microsoft Windows NT Loader Lock
When the Microsoft .NET Framework Execution Engine has to perform garbage collection (GC), the .NET Framework Execution Engine must first suspend all managed threads. In most circumstances, a managed thread must set itself so that it can be suspended before leaving its managed state to run unmanaged code. This thread state is named
GC PreEmptable. The
GC PreEmptable thread state must be entered by the managed thread before leaving the managed state.
In this particular deadlock condition, three different threads are involved as follows:
- Thread 1: This is a managed thread that is not setting itself to the GC PreEmptable thread state before executing the unmanaged code. This thread is waiting for the Windows NT Loader Lock to complete its task.
- Thread 2: This thread is the owner of the Windows NT Loader Lock. This thread has been suspended by the garbage collection thread. This thread will not release the Windows NT Loader Lock until this thread is restarted by the .NET Framework Execution Engine after the garbage collection is completed. In this case, because the garbage collection is not going to complete, this thread will never release the NT Loader Lock.
- Thread 3: This is the garbage collection thread that is trying to complete garbage collection. To complete the garbage collection, the garbage collection thread has to suspend managed Thread 1 that is waiting for the Windows NT Loader Lock. Because Thread 1 cannot be suspended, the garbage collection is never completed.
This combination of thread conditions leads to a classic deadlock scenario that causes the application to stop responding.
RESOLUTION
Software update information
A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft .NET Framework 1.1 service pack that contains this hotfix.
To resolve this problem immediately, 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.
Prerequisites
The .NET Framework version 1.1
Restart requirement
You do not have to restart your computer after you apply this software update
Software update replacement information
This software update does not replace any other software updates.
File information
The English version of this software update has the file attributes (or later) 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
--------------------------------------------------------------
17-Apr-2004 01:32 1.1.4322.1031 77,824 Corperfmonext.dll
17-Apr-2004 01:29 1.1.4322.1031 282,624 Fusion.dll
17-Apr-2004 01:29 1.1.4322.1031 311,296 Mscorjit.dll
17-Apr-2004 01:32 1.1.4322.1031 102,400 Mscorld.dll
19-Apr-2004 05:23 1.1.4322.1031 2,093,056 Mscorlib.dll
17-Apr-2004 01:22 10,756 Mscorlib.ldo
17-Apr-2004 01:30 1.1.4322.1031 2,502,656 Mscorsvr.dll
17-Apr-2004 01:31 1.1.4322.1031 2,490,368 Mscorwks.dll