2011-07-22 106 views
1

我在我的asp.net有一個死鎖。我不知道它來自哪裏(什麼函數),而不是談論該函數在哪裏。分析Asp.net死鎖崩潰轉儲

我生成使用ADPlus的(http://support.microsoft.com/?ID=828222)轉儲文件

,然後使用調試診斷& WinDbg中發現問題。 (沒有成功但.. :()

我出出主意的請幫我...

(Windows 2003中,Asp.net 2,32位)

WinDBG的轉儲:

This dump file has a breakpoint exception stored in it. 
The stored exception information can be accessed via .ecxr. 
eax=7ffda000 ebx=00000001 ecx=00000002 edx=00000003 esi=00000004 edi=00000005 
eip=7c81a251 esp=082affcc ebp=082afff4 iopl=0   nv up ei pl zr na pe nc 
cs=001b ss=0023 ds=0023 es=0023 fs=0038 gs=0000    efl=00000246 
ntdll!DbgBreakPoint: 
7c81a251 cc    int  3 
0:032> .loadby sos mscorwks 
Unable to find module 'mscorwks ' 
0:032> .loadby sos mscorwks 
0:032> .load C:\psscor2\x86\psscor2.dll 
0:032> .load C:\psscor2\sosex.dll 

0:032> kL 

ChildEBP RetAddr 
082affc8 7c83fc40 ntdll!DbgBreakPoint 
082afff4 00000000 ntdll!DbgUiRemoteBreakin+0x36 

0:032> !threads 

ThreadCount: 23 
UnstartedThread: 0 
BackgroundThread: 17 
PendingThread: 0 
DeadThread: 6 
Hosted Runtime: no 
             PreEmptive GC Alloc   Lock 
     ID OSID ThreadOBJ State  GC  Context  Domain Count APT Exception 
    12 1 a10 000d3a70 1808220 Enabled 00000000:00000000 000e03f8  0 MTA (Threadpool Worker) 
    14 2 a88 000eccf8  b220 Enabled 00000000:00000000 000e03f8  0 MTA (Finalizer) 
    15 3 bec 00105d58 80a220 Enabled 00000000:00000000 000e03f8  0 MTA (Threadpool Completion Port) 
    16 4 f04 00108cf0  1220 Enabled 00000000:00000000 000e03f8  0 Ukn 
    18 5 dc0 0015c4b0 180b220 Enabled 00000000:00000000 000e03f8  0 MTA (Threadpool Worker) 
    19 6 e24 0013a980 180b220 Enabled 00000000:00000000 000e03f8  0 MTA (Threadpool Worker) 
    20 7 cc8 00178538 180b220 Enabled 00000000:00000000 000e03f8  0 MTA (Threadpool Worker) 
    21 f db0 0017ed58 180b220 Enabled 00000000:00000000 000e03f8  0 MTA (Threadpool Worker) 
    10 11 1704 05a569a8 880a220 Enabled 00000000:00000000 000e03f8  0 MTA (Threadpool Completion Port) 
    6 12 172c 05a5c070  220 Enabled 00000000:00000000 000e03f8  0 Ukn 
    4 13 84 05a5af20  220 Enabled 00000000:00000000 000e03f8  0 Ukn 
    3 14 910 05a5ab50  220 Enabled 00000000:00000000 000e03f8  0 Ukn 
    5 15 1270 05a565d8  220 Enabled 00000000:00000000 000e03f8  0 Ukn 
    22 b 8f8 0017be18 200b220 Enabled 00000000:00000000 001093e0  1 MTA 
    24 20 11cc 08143240 180b220 Enabled 00000000:00000000 000e03f8  0 MTA (Threadpool Worker) 
    25 1b ac4 080b3228 180b220 Enabled 00000000:00000000 000e03f8  0 MTA (Threadpool Worker) 
    26 8 1470 08039b90 180b220 Enabled 00000000:00000000 000e03f8  0 MTA (Threadpool Worker) 
XXXX a 0 0808dc98 1801820 Enabled 00000000:00000000 000e03f8  0 Ukn (Threadpool Worker) 
XXXX 1d 0 081cab88 1801820 Enabled 00000000:00000000 000e03f8  0 Ukn (Threadpool Worker) 
XXXX 10 0 080686a0 1801820 Enabled 00000000:00000000 000e03f8  0 Ukn (Threadpool Worker) 
XXXX 1c 0 08112bf8 1801820 Enabled 00000000:00000000 000e03f8  0 Ukn (Threadpool Worker) 
XXXX 19 0 0af46a38 1801820 Enabled 00000000:00000000 000e03f8  0 Ukn (Threadpool Worker) 
XXXX 1f 0 0b1fa510  9820 Enabled 00000000:00000000 000e03f8  0 Ukn 


0:032> ~22s 

eax=02656ae8 ebx=059ee7e8 ecx=00000005 edx=00000538 esi=059ee7ec edi=7ffda000 
eip=7c82847c esp=059ee79c ebp=059ee844 iopl=0   nv up ei pl zr na pe nc 
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000    efl=00000246 
ntdll!KiFastSystemCallRet: 
7c82847c c3    ret 

0:022> kL 

ChildEBP RetAddr 
059ee798 7c827b89 ntdll!KiFastSystemCallRet 
059ee79c 77e6202c ntdll!NtWaitForMultipleObjects+0xc 
059ee844 79fccf6a kernel32!WaitForMultipleObjectsEx+0x11a 
059ee8ac 79fccb97 mscorwks!WaitForMultipleObjectsEx_SO_TOLERANT+0x6f 
059ee8cc 79fccca0 mscorwks!Thread::DoAppropriateAptStateWait+0x3c 
059ee950 79fccd35 mscorwks!Thread::DoAppropriateWaitWorker+0x13c 
059ee9a0 7a0da8eb mscorwks!Thread::DoAppropriateWait+0x40 
*** WARNING: Unable to verify checksum for mscorlib.ni.dll 
059eeadc 047cb3ff mscorwks!WaitHandleNative::CorWaitMultipleNative+0x1ec 
*** WARNING: Unable to verify checksum for System.ni.dll 
059eeb00 7a55fc89 mscorlib_ni+0x1cb3ff 
059eeb54 04816e46 System_ni+0x11fc89 
059eeb60 04835781 mscorlib_ni+0x216e46 
059eeb70 79e71b4c mscorlib_ni+0x235781 
059eeb80 79e896ce mscorwks!CallDescrWorker+0x33 
059eec00 79e96ea9 mscorwks!CallDescrWorkerWithHandler+0xa3 
059eed44 79e96edc mscorwks!MethodDesc::CallDescr+0x19c 
059eed60 79e96efa mscorwks!MethodDesc::CallTargetWorker+0x1f 
059eed78 79ef2bf9 mscorwks!MethodDescCallSite::CallWithValueTypes+0x1a 
059eef44 79ef2d4e mscorwks!ExecuteCodeWithGuaranteedCleanupHelper+0x9f 
059eeff4 04835677 mscorwks!ReflectionInvocation::ExecuteCodeWithGuaranteedCleanup+0x10f 
059ef010 048202a5 mscorlib_ni+0x235677 

0:022> !clrstack 

OS Thread Id: 0x8f8 (22) 
ESP  EIP  
059eea20 7c82847c [HelperMethodFrame_1OBJ: 059eea20] System.Threading.WaitHandle.WaitMultiple(System.Threading.WaitHandle[], Int32, Boolean, Boolean) 
059eeaec 047cb3ff System.Threading.WaitHandle.WaitAny(System.Threading.WaitHandle[], Int32, Boolean) 
059eeb0c 7a55fc89 System.Net.TimerThread.ThreadProc() 
059eeb5c 04816e46 System.Threading.ThreadHelper.ThreadStart_Context(System.Object) 
059eeb68 04835781 System.Threading.ExecutionContext.runTryCode(System.Object) 
059eef98 79e71b4c [HelperMethodFrame_PROTECTOBJ: 059eef98] System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object) 
059ef000 04835677 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) 
059ef01c 048202a5 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) 
059ef034 04816dc4 System.Threading.ThreadHelper.ThreadStart() 
059ef260 79e71b4c [GCFrame: 059ef260] 
059ef550 79e71b4c [ContextTransitionFrame: 059ef550] 

0:022> !mk 

Thread 22: 
    ESP  EIP 
00:U 059ee79c 7c82847c ntdll!KiFastSystemCallRet 
01:U 059ee7a0 7c827b89 ntdll!NtWaitForMultipleObjects+0xc 
02:U 059ee7a4 77e6202c kernel32!WaitForMultipleObjectsEx+0x11a 
03:U 059ee84c 79fccf6a mscorwks!WaitForMultipleObjectsEx_SO_TOLERANT+0x6f 
04:U 059ee8b4 79fccb97 mscorwks!Thread::DoAppropriateAptStateWait+0x3c 
05:U 059ee8d4 79fccca0 mscorwks!Thread::DoAppropriateWaitWorker+0x13c 
06:U 059ee958 79fccd35 mscorwks!Thread::DoAppropriateWait+0x40 
07:U 059ee9a8 7a0da8eb mscorwks!WaitHandleNative::CorWaitMultipleNative+0x1ec 
08:M 059eeae4 047cb3ff System.Threading.WaitHandle.WaitAny(System.Threading.WaitHandle[], Int32, Boolean)(+0x88 IL)(+0x8f Native) 
09:M 059eeb08 7a55fc89 System.Net.TimerThread.ThreadProc()(+0x14d IL)(+0x2f9 Native) 
0a:M 059eeb5c 04816e46 System.Threading.ThreadHelper.ThreadStart_Context(System.Object)(+0xfffffffd IL)(+0x66 Native) 
0b:M 059eeb68 04835781 System.Threading.ExecutionContext.runTryCode(System.Object)(+0x0 IL)(+0x51 Native) 
0c:U 059eeb78 79e71b4c mscorwks!CallDescrWorker+0x33 
0d:U 059eeb88 79e896ce mscorwks!CallDescrWorkerWithHandler+0xa3 
0e:U 059eec08 79e96ea9 mscorwks!MethodDesc::CallDescr+0x19c 
0f:U 059eed4c 79e96edc mscorwks!MethodDesc::CallTargetWorker+0x1f 
10:U 059eed68 79e96efa mscorwks!MethodDescCallSite::CallWithValueTypes+0x1a 
11:U 059eed80 79ef2bf9 mscorwks!ExecuteCodeWithGuaranteedCleanupHelper+0x9f 
12:U 059eef4c 79ef2d4e mscorwks!ReflectionInvocation::ExecuteCodeWithGuaranteedCleanup+0x10f 
13:M 059eeffc 04835677 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)(+0xfffffffd IL)(+0x67 Native) 
14:M 059ef018 048202a5 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)(+0xfffffffd IL)(+0x45 Native) 
15:M 059ef030 04816dc4 System.Threading.ThreadHelper.ThreadStart()(+0xfffffffd IL)(+0x44 Native) 
16:U 059ef048 79e71b4c mscorwks!CallDescrWorker+0x33 
17:U 059ef058 79e896ce mscorwks!CallDescrWorkerWithHandler+0xa3 
18:U 059ef0d8 79e96ea9 mscorwks!MethodDesc::CallDescr+0x19c 
19:U 059ef214 79e96edc mscorwks!MethodDesc::CallTargetWorker+0x1f 
1a:U 059ef230 79e96efa mscorwks!MethodDescCallSite::CallWithValueTypes+0x1a 
1b:U 059ef248 79f88357 mscorwks!ThreadNative::KickOffThread_Worker+0x192 
1c:U 059ef430 79e9cc8f mscorwks!Thread::DoADCallBack+0x32a 
1d:U 059ef444 79e9cc2b mscorwks!Thread::ShouldChangeAbortToUnload+0xe3 
1e:U 059ef4d8 79e9cb51 mscorwks!Thread::ShouldChangeAbortToUnload+0x30a 
1f:U 059ef514 79eb392a mscorwks!Thread::RaiseCrossContextException+0x434 
20:U 059ef524 79eb48b9 mscorwks!Thread::DoADCallBack+0xda 
21:U 059ef5d4 79eb394b mscorwks!Thread::DoADCallBack+0x310 
22:U 059ef5f0 79e9cc2b mscorwks!Thread::ShouldChangeAbortToUnload+0xe3 
23:U 059ef684 79e9cb51 mscorwks!Thread::ShouldChangeAbortToUnload+0x30a 
24:U 059ef6c0 79e9ccdd mscorwks!Thread::ShouldChangeAbortToUnload+0x33e 
25:U 059ef6e8 79f88128 mscorwks!ManagedThreadBase::KickOff+0x13 
26:U 059ef700 79f88202 mscorwks!ThreadNative::KickOffThread+0x269 
27:U 059ef79c 79f0e255 mscorwks!Thread::intermediateThreadProc+0x49 
28:U 059effc0 77e6482f kernel32!BaseThreadStart+0x34 
+0

在代碼中使用MUTEX嗎? – Aristos

+0

@Aristos,no ... – Shay

回答

0

搜索你的死循環代碼想重定向到同一頁面。

Responce.Redirect("samepage.aspx"); 

Server.Transfer到同一頁面,或者類似的東西

protected override void OnLoad(EventArgs e) 
{ 
    // call by mistake the OnInit and make close loop 
    base.OnInit(e); 
} 

或者,也許這樣的事情是叫他自己和崩潰。或者對相同頁面進行屏幕掃描。

+0

我沒有使用server.transfer或asp.net頁面。只需ashx頁面。我的猜測是,這個問題發生在我創建的某個線程的某個地方,但我真的不知道 – Shay

+0

@Shay搜索,因爲我說你對上面的想法之一。看看你的代碼,看看是否有任何一點,同一頁面再次調用他們的自我。 – Aristos

0

您是否已通過所有託管線程並通過CLRStack分析所有託管調用堆棧?你必須找出爲什麼每個線程都在等待,然後找到罪魁禍首。

如果您仍然無法找到原因,那麼您可以通過http://support.microsoft.com打開支持案例,並與支持人員共享轉儲。他們有專業知識來找出可能的原因。