星期二, 九月 04, 2007

ASP.NET Hang scenario: Kernel Debugging for Dummies

 
 

Sent to you by Hudong via Google Reader:

 
 

via MSDN Blogs by Tess on Aug 27, 2007

A local radio show has started giving out cookie points to their interviewees for personal development, and the other day my coworker decided to give me one for debugging a perf issue in kernel-mode... YAY!!!

Having debugging as a profession, you might have thought that I would have done a lot of kernel debugging, but since I deal mostly with ASP.NET and .NET development most of our issues are in usermode so there is rarely a need to debug the kernel (drivers etc.). In fact, I have only debugged a few crashes in kernel mode and that is very different from debugging a kernel mode performance issue since debugging crashes usually only involves running !analyze -v to get the crashing stack.

Problem description:

The problem in this case was very simiar to the post I just made on ASP.NET hanging on startup because of antivirus software blocking/delaying I/O operations, and my first suggestion was for them to test the startup on a quarantined machine without the antivirus software, but that didn't do the trick this time.

In this case the ASP.NET process stalls about 5 minutes after a restart of the process or an application domain.

Debugging the issue (user mode):

The usermode dumps we had of the process "hanging" showed a few interesting types of stacks...

The first type of stack, which appeared a lot, was a wait for a compilation mutex


0:109> !clrstack Loaded Son of Strike data table version 5 from "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorsvr.dll" Thread 109 ESP EIP 0x06f5f328 0x7c82ed54 [FRAME: NDirectMethodFrameStandalone] [DEFAULT] I4 System.Web.UnsafeNativeMethods.InstrumentedMutexGetLock(ValueClass System.Runtime.InteropServices.HandleRef,I4) 0x06f5f338 0x025f332b [DEFAULT] [hasThis] Void System.Web.Compilation.CompilationMutex.WaitOne() 0x06f5f620 0x103e08dc [FRAME: ContextTransitionFrame] 0x06f5f700 0x103e08dc [FRAME: ComMethodFrame] 109 Id: 13a8.2028 Suspend: 1 Teb: 7ff0b000 Unfrozen ChildEBP RetAddr Args to Child 06f5f26c 7c822124 77e6bad8 000003dc 00000000 ntdll!KiFastSystemCallRet 06f5f270 77e6bad8 000003dc 00000000 00000000 ntdll!NtWaitForSingleObject+0xc 06f5f2e0 79e769a3 000003dc ffffffff 00000000 kernel32!WaitForSingleObjectEx+0xac 06f5f2f4 79e76ba5 ffffffff 06f5f328 01c1bbd9 aspnet_isapi!InstrumentedMutex::GetLock+0x10 06f5f300 01c1bbd9 01943a10 ffffffff 00000043 aspnet_isapi!InstrumentedMutexGetLock+0x12 WARNING: Frame IP not in any known module. Following frames may be wrong. 06f5f42c 799b8dad 00000000 08c9b1dc 06f5f4a0 0x1c1bbd9 06f5f4cc 799a67a2 103e44f8 103e47fc 799b4168 mscorlib_79990000+0x28dad 00000000 00000000 00000000 00000000 00000000 mscorlib_79990000+0x167a2

This basically means that we are in the middle of compiling the site and we are waiting for compilation to finish. Sometimes something happens during compilation such that we get stuck here indefinitely, and this something is usually some kind of exception or blocking caused by doing too many concurrent compilations. For example lots of site changes under heavy load. Looking at this I asked them about their appdomain recycling details, i.e. things that would make the application domain recycle very often, and there were a few things like frequent updates of aspx pages, but nevertheless they got these blockings at startup even during regular recycles with only one user on the site.

If you do see this type of blocking though, you should consider looking at this post about application recycling to make sure that you are not doing any unneccesary recycles during heavy load. Reducing these will resolve this type of blocking in 90% of the cases... but again, in this case the blocking occurred even if they just did a single recycle without being under heavy load, so let's look at the next stack...

The next set of stacks are also related to compilation. Here we are processing an ASP.NET request who's domain is not yet fully set up so we are blocking trying to get a reference to the domain...


0:081> kb ChildEBP RetAddr Args to Child 286cf5f8 7c822114 77e67143 00000001 286cf648 ntdll!KiFastSystemCallRet 286cf5fc 77e67143 00000001 286cf648 00000000 ntdll!NtWaitForMultipleObjects+0xc 286cf6a4 791e0b3b 00000001 0aaabd34 00000001 kernel32!WaitForMultipleObjectsEx+0x11a 286cf6d4 791e0bdd 00000001 0aaabd34 00000001 mscorsvr!Thread::DoAppropriateWaitWorker+0xc1 286cf728 791fccfe 00000001 0aaabd34 00000001 mscorsvr!Thread::DoAppropriateWait+0x46 286cf7ac 791fcc17 0a91a118 ffffffff 00000000 mscorsvr!AwareLock::EnterEpilog+0x9d 286cf7c8 791fd43e 1887a8f0 27567600 18879508 mscorsvr!AwareLock::Enter+0x78 286cf85c 025459f2 18879508 1887aa04 1887abdc mscorsvr!JITutil_MonContention+0x124 WARNING: Frame IP not in any known module. Following frames may be wrong. 286cf8e0 79217188 00000000 02b89fe8 1085a520 0x25459f2 286cf8c4 02146468 187e4c04 1887a638 02142fe5 mscorsvr!ComCallMLStubCache::CompileMLStub+0x429 286cf954 7923c206 02142f80 286cfa5c 06d0b3d8 0x2146468 286cf994 791cc3c8 286cfa04 791b3d64 286cfa80 mscorsvr!ComCallMLStubCache::CompileMLStub+0x1af 286cf9dc 7923c1c3 06d0b3d8 7923c1ce 286cfa04 mscorsvr!Thread::DoADCallBack+0x5c 286cfa44 01bda0bd 0a91a118 286cfa80 286cffdc mscorsvr!ComCallMLStubCache::CompileMLStub+0x2ba 286cfb48 77e660fe 00000000 020238d8 00000001 0x1bda0bd 286cfb8c 75da1408 00000000 00000000 286cfbdc kernel32!FlsSetValue+0xc7 75da1401 8375da10 89ff044e 40c03306 c25d5e5f sxs!_CRT_INIT+0x185 75da1401 00000000 89ff044e 40c03306 c25d5e5f 0x8375da10

0:081> !clrstack Thread 81 ESP EIP 0x286cf754 0x7c82ed54 [FRAME: GCFrame] 0x286cf810 0x7c82ed54 [FRAME: HelperMethodFrame] 0x286cf864 0x025459f2 [DEFAULT] Class System.Web.IHttpHandler System.Web.HttpApplicationFactory.GetApplicationInstance(Class System.Web.HttpContext) 0x286cf890 0x0214686f [DEFAULT] [hasThis] Void System.Web.HttpRuntime.ProcessRequestInternal(Class System.Web.HttpWorkerRequest) 0x286cf8cc 0x02146468 [DEFAULT] Void System.Web.HttpRuntime.ProcessRequest(Class System.Web.HttpWorkerRequest) 0x286cf8d8 0x02142fe5 [DEFAULT] [hasThis] I4 System.Web.Hosting.ISAPIRuntime.ProcessRequest(I,I4) 0x286cf9a0 0x79217188 [FRAME: ContextTransitionFrame] 0x286cfa80 0x79217188 [FRAME: ComMethodFrame]

If you remember my post on locks and critical sections you will probbly recall that the call to AwareLock::Enter above means that we are waiting on a thread holding a lock or a montor and that we can find out who is holding the lock by running !syncblk...


0:081> !syncblk Index SyncBlock MonitorHeld Recursion Thread ThreadID Object Waiting 6840 0x0aaabd20 145 1 0xaa4fed8 0x360 39 0x1c316400 System.Web.HttpApplicationFactory Waiting threads: 21 22 23 24 25 38 40 42 43 44 45 46 47 48 49 50 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 ----------------------------- Total 6941 ComCallWrapper 3 ComPlusWrapper 0 ComClassFactory 0 Free 1329

So we have 72 ((145-1) / 2) threads waiting for a lock on the type HttpApplicationFactory held by thread 39.


0:081> ~39s eax=791b6a40 ebx=06da8fd0 ecx=0e8cf360 edx=024002b0 esi=242edcd8 edi=00000000 eip=7c82ed54 esp=0e8cf25c ebp=0e8cf2d8 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: 7c82ed54 c3 ret 0:039> kb ChildEBP RetAddr Args to Child 0e8cf258 7c821904 77e612df 000014ac 00000000 ntdll!KiFastSystemCallRet 0e8cf25c 77e612df 000014ac 00000000 00000000 ntdll!ZwQueryDirectoryFile+0xc 0e8cf2d8 01bda78a 242edcd8 0aaf4540 00000004 kernel32!FindNextFileW+0xaa WARNING: Frame IP not in any known module. Following frames may be wrong. 0e8cf3d0 02548e0b 1c94d790 1086eae8 1086eae8 0x1bda78a 0e8cf418 02548cfa 1c316734 1086eae8 1030fe20 0x2548e0b 0e8cf43c 02548c1e 0e8cf46c 1c94d790 1086eae8 0x2548cfa 0e8cf440 0e8cf46c 1c94d790 1086eae8 1c316668 0x2548c1e 0e8cf444 1c94d790 1086eae8 1c316668 025489ac 0xe8cf46c 0e8cf544 791b8bc6 108686f8 791b8bcf 00000000 0x1c94d790 0e8cf5e0 79217188 00000000 00e41000 10861d1c mscorsvr!COMString::EqualsString+0x3f 0e8cf654 7923c206 02142f80 0e8cf75c 06d0b3d8 mscorsvr!ComCallMLStubCache::CompileMLStub+0x429 0e8cf694 791cc3c8 0e8cf704 791b3d64 0e8cf780 mscorsvr!ComCallMLStubCache::CompileMLStub+0x1af 0e8cf6dc 7923c1c3 06d0b3d8 7923c1ce 0e8cf704 mscorsvr!Thread::DoADCallBack+0x5c 0e8cf744 01bda0bd 0aa4fed8 0e8cf780 0e8cffdc mscorsvr!ComCallMLStubCache::CompileMLStub+0x2ba 0e8cf828 791cc195 791cc1d4 0aa4fed8 0aa4fed8 0x1bda0bd 0e8cf854 791cc1f5 000d9948 000d9948 0e8cf870 mscorsvr!EEHashTable,0>::FindItem+0x1b 0e8cf864 791cc204 000d9948 0e8cf890 791cc243 mscorsvr!EEHashTable,0>::FindItem+0xe 0e8cf870 791cc243 000d9948 0e8cf88c 0aa4fed8 mscorsvr!EEHashTable,0>::GetValue+0xb 0e8cf890 791cc310 000d9948 00000000 791cc32b mscorsvr!Thread::SetStaticData+0x5c 0e8cf8f0 0e8cf918 791cc122 791cc131 0ad15d54 mscorsvr!Thread::SafeSetStaticData+0x63



0:039> !clrstack Thread 39 ESP EIP 0x0e8cf360 0x7c82ed54 [FRAME: NDirectMethodFrameSlim] [DEFAULT] Boolean System.Web.UnsafeNativeMethods.FindNextFile(I,ByRef ValueClass WIN32_FIND_DATA) 0x0e8cf370 0x02549395 [DEFAULT] Void System.Web.Compilation.PreservedAssemblyEntry.RemoveOldTempFiles() 0x0e8cf3d8 0x02548e0b [DEFAULT] Void System.Web.Compilation.PreservedAssemblyEntry.DoFirstTimeInit(Class System.Web.HttpContext) 0x0e8cf420 0x02548cfa [DEFAULT] Void System.Web.Compilation.PreservedAssemblyEntry.EnsureFirstTimeInit(Class System.Web.HttpContext) 0x0e8cf444 0x02548c1e [DEFAULT] Class System.Web.Compilation.PreservedAssemblyEntry System.Web.Compilation.PreservedAssemblyEntry.GetPreservedAssemblyEntry(Class System.Web.HttpContext,String,Boolean) 0x0e8cf45c 0x025489ac [DEFAULT] [hasThis] Class System.Web.UI.ParserCacheItem System.Web.UI.TemplateParser.GetParserCacheItemFromPreservedCompilation() 0x0e8cf474 0x025474c3 [DEFAULT] [hasThis] Class System.Web.UI.ParserCacheItem System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean) 0x0e8cf49c 0x025488fe [DEFAULT] [hasThis] Class System.Web.UI.ParserCacheItem System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath() 0x0e8cf4cc 0x02547394 [DEFAULT] [hasThis] Class System.Web.UI.ParserCacheItem System.Web.UI.TemplateParser.GetParserCacheItem() 0x0e8cf4fc 0x02545e3c [DEFAULT] Class System.Type System.Web.UI.ApplicationFileParser.GetCompiledApplicationType(String,Class System.Web.HttpContext,ByRef Class System.Web.UI.ApplicationFileParser) 0x0e8cf514 0x02545cfc [DEFAULT] [hasThis] Void System.Web.HttpApplicationFactory.CompileApplication(Class System.Web.HttpContext) 0x0e8cf524 0x02545c07 [DEFAULT] [hasThis] Void System.Web.HttpApplicationFactory.Init(Class System.Web.HttpContext) 0x0e8cf564 0x02545a0b [DEFAULT] Class System.Web.IHttpHandler System.Web.HttpApplicationFactory.GetApplicationInstance(Class System.Web.HttpContext) 0x0e8cf590 0x0214686f [DEFAULT] [hasThis] Void System.Web.HttpRuntime.ProcessRequestInternal(Class System.Web.HttpWorkerRequest) 0x0e8cf5cc 0x02146468 [DEFAULT] Void System.Web.HttpRuntime.ProcessRequest(Class System.Web.HttpWorkerRequest) 0x0e8cf5d8 0x02142fe5 [DEFAULT] [hasThis] I4 System.Web.Hosting.ISAPIRuntime.ProcessRequest(I,I4) 0x0e8cf6a0 0x79217188 [FRAME: ContextTransitionFrame] 0x0e8cf780 0x79217188 [FRAME: ComMethodFrame]

Thread 39 is processing an ASP.NET request. As part of doing so, since this is the first request, it has to compile the app, and remove the old temporary asp.net files in the C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files folder.

This is where it gets interesting, because looking at the timestamp of the request it has been working on this for several minutes...

To see exactly how long the request has been running we can run the following commands...


0:039> !dso Thread 39 ESP/REG Object Name ... 0xe8cf5a4 0x1030886c System.Web.Hosting.ISAPIWorkerRequestInProcForIIS6 0xe8cf5a8 0x1030b6cc System.Web.HttpRuntime 0xe8cf6b4 0x10308850 System.Runtime.Remoting.Messaging.LogicalCallContext 0:039> !do 0x1030886c Name: System.Web.Hosting.ISAPIWorkerRequestInProcForIIS6 MethodTable 0x02401fdc EEClass 0x02177fd0 Size 200(0xc8) bytes GC Generation: 2 mdToken: 0x02000115 (c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll) FieldDesc*: 0x02401e68 MT Field Offset Type Attr Value Name 0x01c08a78 0x4000798 0x4 VALUETYPE instance start at 10308870 _startTime ... 0:039> !convertvtdatetodate 10308870 As a TimeSpan: 732847.09:25:40.5338928 As a DateTime: 06/21/2007 09:25:40

So the request started at 09:25:40 GMT, and the dump was taken at 09:28:51 GMT (11:28:51 GMT+2)...


0:039> .time Debug session time: Thu Jun 21 11:28:51.000 2007 (GMT+2) System Uptime: 8 days 15:51:05.015 Process Uptime: 0 days 5:28:36.000 Kernel time: 0 days 0:15:54.000 User time: 0 days 0:02:23.000

...meaning that the request has been executing for ~3 minutes

The obvious question is, why is it taking so long...

Going back to the native callstack we had the following at the top


0e8cf25c 77e612df 000014ac 00000000 00000000 ntdll!ZwQueryDirectoryFile+0xc
0e8cf2d8 01bda78a 242edcd8 0aaf4540 00000004 kernel32!FindNextFileW+0xaa ...

The fact that ntdll!ZwQueryDirectoryFile is on top of the stack means that we are now operating in kernel mode, trying to get some kind of information about a file (which in this case is one of the files in the temporary asp.net files based on the .net callstack).

This is usually a super quick operation so it would rarely be caught in a dump unless something is delaying it and making it slow, for example a driver for antivirus scanning, backup software or some other type of low level software that intercepts file access for monitoring.

Since the usual suspects (antivirus scanners) were discarded, the next step was to debug at the kernel level.

Before I continue here I want to say that I would recommend checking the usual suspects first since it is a bit of a hassle to set up kernel debugging, but if all else fails, here we go...

Kernel debugging

The first and probably most difficult step is to get the server configured, and I had the customer follow this kb article to set the server up to take kernel dumps on a specific key combination.

I was thoroughly impressed at the speed that this was done, being that it was a production server, and when I got the dump, the fun began since I had to scavange the help files to figure out what commands to use in a kernel dump. It is a completely different experience than debugging a usermode dump.

First things first, I still opened the dump in windbg with File/Open Crash Dump

A regular kernel dump, unlike a usermode dump is a dump of all processes on the system, but only the kernel space. I am sure that there are ways to get everything, in fact I know this, but all we needed here was the kernel mode space.

Since we know or assume that we are blocking we can run !locks

0: kd> !locks **** DUMP OF ALL RESOURCE OBJECTS **** KD: Scanning for held locks.................................................................................................................................................................................  Resource @ 0x88e9a518    Shared 1 owning threads     Contention Count = 1      Threads: 88e889a0-01<*>  KD: Scanning for held locks............................ 6541 total locks, 1 locks currently held 

This tells us that there is a lock currently held by thread 88e889a0...

0: kd> !thread 88e889a0 THREAD 88e889a0  Cid 0d6c.06d4  Teb: 7ffaa000 Win32Thread: 00000000 WAIT: (Unknown) KernelMode Non-Alertable     b954f1ec  NotificationEvent IRP List:     89e73b18: (0006,01d8) Flags: 00000000  Mdl: 00000000     88d4d008: (0006,01d8) Flags: 00000000  Mdl: 00000000     89055008: (0006,01d8) Flags: 00000000  Mdl: 00000000     88f1d6d8: (0006,01d8) Flags: 00000000  Mdl: 00000000     8a6aac38: (0006,01d8) Flags: 00000000  Mdl: 00000000     88f77e20: (0006,01d8) Flags: 00000000  Mdl: 00000000     8a5f5880: (0006,01d8) Flags: 00000000  Mdl: 00000000     8a63ce20: (0006,01d8) Flags: 00000000  Mdl: 00000000     88d4ac40: (0006,01d8) Flags: 00000000  Mdl: 00000000     88f41988: (0006,01d8) Flags: 00000000  Mdl: 00000000     88eecb80: (0006,01d8) Flags: 00000000  Mdl: 00000000     88f1e008: (0006,01d8) Flags: 00000000  Mdl: 00000000 Not impersonating DeviceMap                 e1b905a0 Owning Process            88d538d0       Image:         w3wp.exe Wait Start TickCount      22980          Ticks: 1 (0:00:00:00.015) Context Switch Count      12683              UserTime                  00:00:01.656 KernelTime                00:00:00.656 Win32 Start Address 0x791fda8b Start Address 0x77e6b5f3 Stack Init b9550000 Current b954ef48 Base b9550000 Limit b954d000 Call 0 Priority 8 BasePriority 8 PriorityDecrement 0 ChildEBP RetAddr  Args to Child               b954ef60 8083e6a0 88e88a18 88e889a0 88e88a48 nt!KiSwapContext+0x26 (FPO: [Uses EBP] [0,0,4]) b954ef8c 8083f154 89051e28 b954f2b0 89fe7d90 nt!KiSwapThread+0x284 (FPO: [Non-Fpo]) b954efd4 f7253fa3 b954f1ec 00000000 00000000 nt!KeWaitForSingleObject+0x346 (FPO: [Non-Fpo]) b954eff4 f7253712 b954f2b0 00001000 89fe7d90 Ntfs!NtfsWaitSync+0x1c (FPO: [Non-Fpo]) b954f1b0 f725175e b954f2b0 89051e28 89fe7d90 Ntfs!NtfsNonCachedIo+0x2f3 (FPO: [Non-Fpo]) b954f29c f72548de b954f2b0 89051e28 00000001 Ntfs!NtfsCommonRead+0xaf5 (FPO: [Non-Fpo]) b954f448 8083f9c0 89fe3248 89051e28 8a696910 Ntfs!NtfsFsdRead+0x113 (FPO: [Non-Fpo]) b954f45c f7323c53 8a696910 89eff9e8 b954f41c nt!IofCallDriver+0x45 (FPO: [Non-Fpo]) b954f484 8083f9c0 8a562708 89051e28 89051fdc fltmgr!FltpDispatch+0x6f (FPO: [Non-Fpo]) b954f498 f7730da7 89eff9e8 89051fdc 89051e28 nt!IofCallDriver+0x45 (FPO: [Non-Fpo]) WARNING: Stack unwind information not available. Following frames may be wrong. b954f4c8 f773181e 89eff9e8 89051e28 00000ae4 SomeFiltr!OsrFilterDeregister+0x85 b954f528 8083f9c0 89eff930 89051e28 89051e28 SomeFiltr!OsrFilterDeregister+0xafc b954f53c 8082f0d7 8a7387a8 88e889a0 8a738798 nt!IofCallDriver+0x45 (FPO: [Non-Fpo]) b954f554 8082f175 89fe8a0a 8a7387d0 8a7387b0 nt!IoPageRead+0x109 (FPO: [Non-Fpo]) b954f5d8 80849cd5 00000001 cce52000 c0333948 nt!MiDispatchFault+0xd2a (FPO: [Non-Fpo]) b954f634 80837d0a 00000000 cce52000 00000000 nt!MmAccessFault+0x64a (FPO: [Non-Fpo]) b954f634 8093837b 00000000 cce52000 00000000 nt!KiTrap0E+0xdc (FPO: [0,0] TrapFrame @ b954f64c) b954f6fc f72880ac 89fe8a20 b954f72c 00000400 nt!CcMapData+0x8c (FPO: [Non-Fpo]) b954f71c f72886e6 b954fab0 89fe7d90 6fbd2000 Ntfs!NtfsMapStream+0x4b (FPO: [Non-Fpo]) b954f790 f729edd1 b954fab0 89fe3328 e2c47540 Ntfs!NtfsReadMftRecord+0x86 (FPO: [Non-Fpo]) b954f840 f728702b b954fab0 e22e5530 e14690d0 Ntfs!NtfsRetrieveOtherFileName+0xcf (FPO: [Non-Fpo]) b954fa60 f7286180 b954fab0 88d33008 89fe3328 Ntfs!NtfsQueryDirectory+0x90d (FPO: [Non-Fpo]) b954fa94 f7286452 b954fab0 e14690d0 8a562708 Ntfs!NtfsCommonDirectoryControl+0xbc (FPO: [Non-Fpo]) b954fc04 8083f9c0 89fe3248 88d33008 8a696910 Ntfs!NtfsFsdDirectoryControl+0xad (FPO: [Non-Fpo]) b954fc18 f7323c53 8a696910 89eff9e8 000007ff nt!IofCallDriver+0x45 (FPO: [Non-Fpo]) b954fc40 8083f9c0 8a562708 88d33008 88d331bc fltmgr!FltpDispatch+0x6f (FPO: [Non-Fpo]) b954fc54 f7730da7 89eff9e8 88d331bc 88d33008 nt!IofCallDriver+0x45 (FPO: [Non-Fpo]) b954fc84 f773181e 89eff9e8 88d33008 00000ae4 SomeFiltr!OsrFilterDeregister+0x85 b954fce4 8083f9c0 89eff930 88d33008 01b0f710 SomeFiltr!OsrFilterDeregister+0xafc b954fcf8 8092d3b8 b954fd64 01b0f710 80921a14 nt!IofCallDriver+0x45 (FPO: [Non-Fpo]) b954fd0c 80921a71 89eff930 88d33008 88dba440 nt!IopSynchronousServiceTail+0x10b (FPO: [Non-Fpo]) b954fd30 80834d3f 0000048c 00000000 00000000 nt!NtQueryDirectoryFile+0x5d (FPO: [Non-Fpo]) b954fd30 7c82ed54 0000048c 00000000 00000000 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ b954fd64) 01b0f758 00000000 00000000 00000000 00000000 0x7c82ed54  

And this is exactly what we have been looking for... If we start from the top we can see that this thread is indeed a part of w3wp.exe so that is a good start. Then if we look at the bottom of the stack we see that the entrypoint into kernel mode is nt!NtQueryDirectoryFile which jives extremely well with what we saw in usermode.

From this point we go directly into some filter called SomeFiltr.sys (in reality it is called something else, but since it doesn't really make a difference for this discussion what it is called I have changed the name to protect the innocent), and from there it is going into to some reading and other things and finally it sits in a wait again, but this time in kernelmode. I am glancing over the details here a bit since I don't know much about drivers.

At this point it is pretty much out of my hands and into the hands of the person who owns the filter in order to figure out what was causing it to be slow. I looked the filtername up on the internet and it happened to belong to some backup/recovery software, and because of this and because we are blocking on trying to delete files from the temporary ASP.NET files which have no reason being backed up anyways, a reasonable suggestion would be to exclude this directory from backup.

Some other good commands I found in relation to kernel debugging were "!process 0 0" which lists all the processes, and "!process <process addr> f" which lists all the threads in a given process.

I feel like I should add a caveat here and say that there are probably other ways to get to this conclusion and more data that can be gotten from this, but I just wanted to share my first kernel debugging experience and hopefully someone out there can get some benefit from it:)

Laters y'all,

Tess






 
 

Things you can do from here:

 
 

Analyzing Web 2.0 Applications with Ajax View

 
 

Sent to you by Hudong via Google Reader:

 
 

via MSDN Blogs by ieblog on Aug 24, 2007

Hi everyone,

In June I posted information about a number of developer tools, one of which was Ajax View. Ajax View, developed by Microsoft Research, can help improve a developer's visibility into their web application's performance and behavior. Recently, the researchers building Ajax View - Emre K c man and Ben Livshits - released a public version of the tool (licensed for academic or other non-commercial use) so I want to share a link and provide a little more information about it.

What can I do with it?

As shown in the demo from MIX07 and described in detail here, you can use Ajax View to profile a site's JavaScript from your dev machine. Ajax View includes a few default instrumentation policies for basic profiling (timing based on before and after a function call in the caller, timing based on before and after a function call in the callee, etc.) but you can create a plug-in to track the JavaScript you're interested in.

How does it work?

Ajax View is an HTTP proxy that instruments JavaScript as it's served to the client based on a set of rules defined by plug-ins. The download includes a plug-in that contains a commented sample instrumentation policy. This design has a couple important effects:

  • You can customize Ajax View to monitor exactly the JavaScript behavior you're looking for, whether it's about performance, or how people navigate through your site.
  • Using Ajax View does not require modification of either the page source or the browser.

Where do I download it and send feedback?

Visit the Ajax View project site to download the latest prototype and try it for yourself.

We'd love to get your feedback on the kind of instrumentation you'd find useful. Let us know what data about your web application's behavior would help you detect or debug problems. You can send feedback directly to the project team, or, as usual, comment on this post.

Thanks!

John Hrvatin
Program Manager
Internet Explorer


 
 

Things you can do from here:

 
 

Sharing enums across C# and C++

 
 

Sent to you by Hudong via Google Reader:

 
 

via MSDN Blogs by abhinaba on Aug 27, 2007

On an internal DL someone asked a question about how folks share enums between C++ and C# code when required (e.g. common error codes for a large project that use both native code and C#).

There was a very interesting answer given by one person. He simply asked why don't you define it in a .cs file and #include that file in your C++ code. I initially thought what the hell is he talking about and then it struck me that C++ and C# is not just similar but in some context they are exactly the same. Consider the following enum definition in a .cs files

// File Enum.cs
namespace
EnumShare { enum MyEnum { a = 1, b = 2, c = 3, }; }

This can be simply included in a C# project to be built normally. However, it can also be pulled into C++ code as follows

#include "..\EnumShare\Enum.cs"  using namespace EnumShare;  int Foo()
{ cout << a << endl;

}

Note that I could directly pull in the C# code because the syntax matches that of C++ :)

I thought that this was a rather interesting usage.


 
 

Things you can do from here:

 
 

Justifying the need for Composite Applications

 
 

Sent to you by Hudong via Google Reader:

 
 

via MSDN Blogs by mikewalker on Aug 27, 2007

I recently saw a post from Brandon Satrom as he was asking for feedback on his interpretation of composite applications and the value proposition to his organization. He is definitely on the right track, and not because he is using the guidance that I have been working on at Microsoft :). I will address the content of his post directly here with my opinions.

Brandon articulates the value of composite applications into five factors:

  1. The Cost of Building Applications
  2. The Problem with Processes
  3. The "Consumerization of IT"
  4. The Need for Agility
  5. The Desire for a Single User Experience

Assuming that these are not in order but rather a un-prioritized list of factors to consider going down the composite application route then I roughly agree with most of these.

But let's take a step back for a moment. Like all other complex subject matters there are varying opinions and definitions from smart people in the industry. I have been talking about this subject for about three or so years while at Microsoft and before. I have seen this definition grow and morph into a much more compressive and more importantly actionable concept.

So what are composite applications? Here are some definitions from the industry:

Gartner

Composite applications leverage the business application functionality that is exposed as Web services. The composite application is an abstraction layer on top of a service repository, which orchestrates a new business process and has its own user interface. A composite application may be a process template or a 'service'.

BEA Definition

Applications that are built by reusing logic from two or more existing applications to form a new application without having to start from scratch. A composite application consists of functionality drawn from several different sources within an SOA. The components may be individual Web services, selected functions from within other applications, or entire systems whose outputs have been packaged as Web services (often legacy systems).

IBM Definition

To be considered as a composite application, an application needs to comply with a certain architectural design, which is defined by a set of features. Even if it is not an exhaustive list, the following shows the main desirable features of a composite application:

  • Homogeneity to behave as a unique application to different heterogeneous applications or components
  • Flexibility to use service-oriented architecture (SOA) principles such as loosely-coupling and reusability
  • Intercommunication between components
  • Richer user experience to aggregate a variety of application types into a single client view
  • Security such as authentication, roles and data confidentiality
  • Transactional applications, which get the information from multiple sources
  • Reuse computing assets
  • A uniform and consistent graphical user interface
  • Composition of parts or components
  • Aggregates a variety of application types into a single client view
  • Provides anytime/anywhere access in a semi-connected environment. This is not a composite application feature but Lotus Expeditor enhances these capabilities

From a Microsoft perspective we have defined composite applications mostly at a micro level with the great work performed by my team on defining this more with OBA. From a macro level Chris Keyser wrote a great composite applications primer on this subject in the Architecture Journal a few issues back.

My opinion on Composite Applications is similar to IBM's and Gartner's combined. I think Gartner defines the concepts nicely but implies implementation details when they should be left out. What I like about IBM's definition is that they tell you the capabilities of a composite application.

I break a composite application down to the following four core requirements:

  1. Contain an autonomous business process. The goal of composite applications are to have a plug-able black-box applications. To do so, they must have explicit business process or functional boundaries.
  2. Must fit into a heterogeneous environment. Applications that can be implemented in various different ways, this should span multiple implementation types of the same technology and work within environments where the technology is diverse.
  3. Must have Built-In Interoperability. These applications should not have proprietary integration methods but rather have industry standard ways of interoperating with other systems.
  4. Compose in many different ways. Composite applications are self contained applications that can interact with other applications in the same environment similarly to web mash-ups (great article by Ray Ozzie) which are consumer composite applications are a great example of how composite applications have flexible and extensible UI functionality.

Below is a slide from my presentation from TechEd in Australia.

From a micro level I agree with Don Box's tenets of service oriented architectures. When you read these, they are not exclusive to Composite Applications but rather SOA as a whole. The key here is that composite applications provide a way to implement Service Oriented Architectures. It is important not to confuse the two. SOA provides the principles for building a service oriented <insert what you will here>. It could be at many various levels such as at the application, system, or enterprise level.

  1. Boundaries are explicit. Services must interact across service boundaries, but crossing service boundaries might be costly. Therefore, it is important to know your boundaries. Keep service surface areas small, avoid RPC interfaces, and avoid leaking implementation details outside a service boundary.
  2. Services are autonomous. Ideally, services should be stable, but business needs change frequently. The space between services changes more frequently than the service boundaries themselves. Avoid assumptions on the environment into which the services are deployed. Design, deploy, and manage services independently from one another. Communicate only through contract-driven messages and policies.
  3. Services share schema and contract, not class. Service consumers will rely upon a service's contract to invoke and interact with a service, and will insist that the contract remain stable over time. However, changing business needs will force change upon a service. Therefore, service interaction should be based solely upon a service's policies, schema, and contract-based behaviors. Ensure stability of services (public data, message-exchange patterns, policies). Form explicit contracts that are designed for extensibility. Version services when change occurs. Avoid blurring the line between public and private data representations.
  4. Service compatibility is determined based on policy. Services must be compatible with each other--not just structural compatibility (public data, message-exchange patterns), but also compatible with other semantic capabilities that are expressed through configurable capabilities and service levels. Operational requirements for service providers should be manifested in the form of machine-readable policy expressions.

Microsoft has taken Composite Applications to the next level with the re-usable building blocks and reference architectures released by many of the groups out there. Patterns and Practices on the Composite Application Block (CAB) then the Smart Client Factory and now Acropolis. This isn't to say that there isn't any thought leadership or examples of composite applications by other vendors. I get my paycheck from Uncle Bill so I will mention our technologies.

Taking my opinions on Composite Applications and contrasting them to Brandon's there are similarities.

The Need for Agility this is the top priority for IT organizations to stay relevant to the business. All the benefits the Brandon mentioned are spot on but I would expand them a bit. All of the reasons listed though were reacting to business needs. Agility is also about future strategy by allowing our architectures to proactively address future business challenges and drivers as well as reacting to current trends.

Agility often defined as the ability of a firm to sense and respond to business opportunities in order to stay innovative and competitive in a turbulent and quickly changing business environment. An agile firm (one that demonstrates agility) has the capabilities and processes to respond to unexpected environmental changes.

- Wikipedia

I really like the Wikipedia definition of agility. The definition clearly shows us the forward and current state thinking aspects of agility. I talk a bit about the future state in my sessions about composite applications. When we architect our solutions the technology, process and ultimate implementation of that solution will inevitability change. Composite application architectures allow us to build solutions with this needed flexibility.

The Desire for a Single an improved User Experience (UX), this one is an important one. Understanding that we are not talking about creating one reusable interface but rather an improved experience for the actual users of the solution. This coincides with creating agile architectures and not trying to prescribe to the business what we feel is a good interface but rather letting them. New trends both consumer (Web 2.0) and enterprise (Portal or Smart Clients) come and go. There are very few that have stand the test of time. So with that knowledge are architectures must adapt to change.

The "Consumerization of IT" is one of the possible results of User Experience aspects. The consumer technology solutions definitely have potential plays in the enterprise, especially the collaboration technologies which span consumer and enterprise.

The Problem with Processes. I think Brandon is on the right track here and I agree with what he talks about here. I would a few comments to further refine. Composite applications are able to leverage various types of workflows. Composite applications themselves do not improve the process directly. Workflow definition still involves a set of architecture decisions in a workflow engine. However, composite applications make a great choice for surfacing these workflows due to their service oriented nature.

Below is a slide I use often to describe the various levels of process. As you can see the technology choices to implement change. As architects we should pick technologies for their strengths. For example, we wouldn't want to use BizTalk for instant messaging and collaboration.

I wrote an article on MSDN called Architecting Enterprise Loan Workflows and Orchestrations in this article I talk about these concepts in detail using the Loan Origination RAP as a working example.

The Cost of Building Applications is a big challenge for IT. I would make this a bit more generic because it's not just about the cost of building but also the cost to:

  • Maintain - We are seeing from analysts such as Gartner that maintenance is accounting for 70% of the total IT time in enterprises. This is a staggering number when you contrast this to the 40% of new development in integration. So would it be safe to say that 17% of the time is really spent on new development?
  • Integrate and Interop - I would add interoperability here. Composite applications foster the notion of interoperability.
  • Enhance - The composite nature allows for easy additions to solutions when proprietary implementations inhibit this behavior.

With these factors we need to make sure the technology choices we make doesn't hamper IT or the business to create the right new applications instead. We want to build our solutions that it ensures future flexibility rather worrying about the legacy applications. Ideally this shouldn't be our primary concern.

The underling goal here is to Reduce the Cost of Technology Investments.

Overall Brandon did a great job justifying the need for composite applications. I hope this had helped and I would encourage you to provide feedback on my explanations as I didn't go into great detail on some of the topics. Additionally, refer back to the four basic requirements of a composite application as they show some clear benefits as well.

Tags:


 
 

Things you can do from here:

 
 

China - interesting opportunities!

 
 

Sent to you by Hudong via Google Reader:

 
 

via MSDN Blogs by Somasegar on Aug 27, 2007

Ni Hao!

I was in China a couple of weeks ago (Shanghai specifically) and had the opportunity to spend a day with our team there. It was very exciting to see the team coming into shape from scratch in just over a year and working on a breadth of initiatives and technologies for the products that we are working on in Developer Division.

I had a chance to see demos of some of the work that the team is doing - C++ support for the class designer, a set of VB controls, enhancements to our architect tools, etc. I also saw some of the early adopters that had built games, rich media advertisements and HD Video players using Express Blend, Visual Studio, Silverlight and Windows Presentation Foundation. This was the result of some good collaboration between our team, the Developer Platform Evangelism Team at Microsoft and our partners.

The other thing that was fascinating for me is the rapid increase in the number of developers in China - some estimates peg this increase at 13% annually. There are more than 300,000 EE/CS majors graduating in China per year and that is going to ensure a healthy increase in the developer community in China for the foreseeable future. With 162M internet users across China, it is second only to the US (211M internet users) and is becoming a huge adopter of technology. The opportunities are incredible in China - as a consumer market, as a potential customer base, as a large developer base, as a strong partner ecosystem and as a large talent pool.

My team in China has kindly volunteered to translate my blog in Chinese. As that starts happening, I will provide a link for those of you who want to read the Chinese version of my blog.

Namaste!


 
 

Things you can do from here:

 
 

The One About The Amazing Auto Woman

 
 

Sent to you by Hudong via Google Reader:

 
 

via MSDN Blogs by frankarr on Aug 27, 2007

So, I am going to post some stories about my US adventures.

The first story is a doozy.

As you know, I have relocated to Seattle for a new role with Microsoft.

I sold my beloved Audi A4 to a dealer before leaving Australia (it's on the market still)

I am a sucker for a convertible - been driving them for the past 10 years.

So, naturally I wanted a convertible as my next car. There's lots of options

Since I am the pacific northwest, I thought I should go with a hard top convertible. This narrows it to a few certain cars.

My wife is a Volvo driver and said I should look at the Volvo C70

Hmmm - looks nice.

clip_image001

So, we went to a local dealer for a test drive and find out some more information.

I liked the car and decided that was the car for me. I asked the dealer to give me a quote.

Now a friend of mine told me about an auto broker he had used to help find a good deal on his car.

Her name is Heidi Hough, and she is known as The Amazing Auto Woman

Her website has all the info including the instructions

PLEASE NOTE: If you want to obtain pricing from the local dealers, please do this first. When you believe you have obtained your "best" price, Heidi will advise you if she can do better.

Cool!

So I dropped her an email and Moira gave her a call, because she needed a car as well.

Fast forward a few days (seriously) and Heidi has tracked down both the cars - an XC90 for Moira and the C70 for me - and at a much lower price than the one quoted by the local dealer.

Done!

I get an email from Heidi with all the details and we arrange a rendezvous at my house.

Too Easy!

I head home to wait for Heidi, who brings me my car to the door. I sign some papers, hand over the cheque and the car is mine.

img380

Like Amazon!

And they said buying a car in the US was hard.


 
 

Things you can do from here:

 
 

Ed Bott on Windows Vista Media Center

 
 

Sent to you by Hudong via Google Reader:

 
 

via MSDN Blogs by gduthie on Aug 27, 2007

This looks cool:

In June, I recounted my out-of-the-box experience with a new Dell PC running Windows Vista, starting with a failed BIOS upgrade, undergoing a successful repair, and establishing that the basic hardware and software setup was rock-solid.

Vista Media Center from 10 feet

The reason I bought this PC in the first place was to use it as the hub of a home theater system, integrated with a 5.1 surround sound setup and a 50-inch Sony HDTV with Vista Media Center as the front end. So, at the beginning of July, I took the plunge and moved this system out of the office and into the living room. It took about two weeks to assemble all the pieces I needed and get everything working together correctly, but today I am thoroughly pleased with everything about this system. If you've considered doing the same thing, I have some advice in this post, and I've documented the whole thing with an image gallery so you can see what it looks like.

...

The bottom line: It works. Spectacularly well, in fact. I originally approached this as a proof-of-concept experiment, and I was half expecting to run into at least one roadblock that would cause me to give up and go back to my old setup. Surprisingly, the only obstacles were minor ones.

I must confess to a bit of envy...I've long wanted to add a Windows Media Center PC to my living room setup. But since I've already got the Vista Media Center running on my home-office PC, it would be tough to justify buying a whole new PC dedicated to the entertainment center.

That said, even my current setup is pretty cool. As noted, I've got Vista Ultimate (which, like Vista Home Premium, includes the Media Center bits) running on my desktop PC, which is a several year-old Dell PowerEdge 400SC, with a hyperthreaded P4 proc, 2GB RAM, and a 256MB Radeon X1300 video card, giving me a respectable 4.0 Windows Experience Index. And I use my XBOX 360 as a Media Center Extender, which gives me most of the Media Center experience.

The upside of my setup is low-cost. I added a hand-me-down TV tuner to my desktop machine, and that allows me to record standard-def TV channels (I have a Verizon HD DVR for HD) on my PC, thus saving precious DVR storage space for the high-def stuff only), and it's pretty easy to convert DVR-MS content to WMV for viewing on my Zune when I travel (and if I'm looking for a larger screen, I can just sync my Zune as a guest on my laptop, and watch the video there, as I did last week with the "so bad it's good" Jet Li movie Black Mask.

All that said, I think Bott has it right when he says:

Bringing the PC into the living room simplifies the equipment lineup, reduces the cost, and potentially offers better performance because it's not bound by network speeds.

True, the cost bit is lower for me because I'm not buying a separate Media Center PC, but I still may have to consider making the leap to a dedicated Media Center PC in the living room, as that would open up some cool side benefits, like being able to manage the family calendar without running into the office, and be able to easily sync that with what's going on with work (we currently keep the family calendar on paper on the fridge, which means I'm often fielding questions about what's going on at work, upcoming travel and/or events, etc., and having to run into the office, look stuff up, write it down on the paper calendar...not very efficient). There would also be the benefit of being able to run full-blown apps in the living room, which is not really possible on the 360 acting as an extender.

The cool thing is that while not dirt cheap, Bott's setup also wasn't outrageously expensive either, coming in at just under $700.

Last, but not least, I can heartily agree with Bott's enthusiasm for Logitech's Harmony series of remotes. I have the Harmony 880, and it's really excellent. You install the Harmony software on your PC, then hook up your remote via mini-usb, go to their website, select your components and the activities you use them for, and the web-based wizard sets the remote up for one-button operation of the activities you specify. So when I want to play a game on my XBOX 360, I press the button labeled "Play XBOX 360," and the remote turns on the TV, receiver, and console, and switches the TV and receiver to the appropriate inputs. You can also customize to add steps such as turning the volume up or down when you start or power down from a given activity.

Overall, my take on Vista Media Center mirrors Bott's:

This will drive the Vista-haters crazy, but it has to be said anyway: When people see this system in operation, they actually say "Wow."

My wife and mother-in-law both really love being able to see pictures of the kids on the large screen of the living room TV, rather than all having to crowd around a PC in the office. And having all our digital music available at the touch of a button has likewise been a boon.

>> Vista Media Center takes over the living room | Ed Bott's Microsoft Report | ZDNet.com


 
 

Things you can do from here:

 
 

MSMQ Addressing

 
 

Sent to you by Hudong via Google Reader:

 
 

via MSDN Blogs by Nicholas Allen on Aug 28, 2007

Here's a quick guide to how an address that uses the net.msmq scheme in WCF gets turned into an actual MSMQ address. There are three transfer protocols used with MSMQ: native, SRMP (SOAP Reliable Messaging Protocol), and SRMPS (SOAP Reliable Messaging Protocol Secure). Each of the transfer protocols translates addresses slightly differently.

For a given net.msmq address, we'll first check the transfer protocol. If the transfer protocol is SRMP or SRMPS, then the MSMQ address is going to be a direct address. The only difference between SRMP and SRMPS is that SRMP uses the http scheme while SRMPS uses the https scheme. The MSMQ address produced from net.msmq://hostname:port/queuename is DIRECT=http://hostname:port/msmq/queuename. Having a port is optional, and this part of the address is omitted if no port is specified. A private queue name is written as private/queuename in net.msmq but translates to private$/queuename in the MSMQ address. It's illegal to include the dollar sign in a net.msmq address.

If the transfer protocol is native, then the MSMQ address is either going to be a GUID address or a direct address. A GUID address is created if the binding has been configured with UseActiveDirectory set to true. The GUID uniquely identifies the queue. Otherwise, the MSMQ address produced from net.msmq://hostname/queuename is DIRECT=OS:hostname\queuename. Unlike SRMP, a port is never specified with the native transfer protocol. Again, a private queue name is written as private/queuename in net.msmq but translates to private$\queuename in the MSMQ address. Finally, if the hostname is an IP address, then the resulting MSMQ address instead is DIRECT=TCP:hostname\queuename.

Next time: Attribute Driven Transactions


 
 

Things you can do from here:

 
 

Life Cycle Models: Introduction to Software Engineering part 2/10

 
 

Sent to you by Hudong via Google Reader:

 
 

via MSDN Blogs by SoCal Sam on Aug 28, 2007

Life Cycle Models

The typical development life cycle involves Envisioning planning, developing, stabilizing and deploying. The Capability Maturity Model Integration (CMMI) is based on the thought that process holds the people and technology together. Quality, Product/project cost and schedule are dependent on people, technology and processes[i].

For many students software engineering and what it does is an unknown. At this time it is important for the students to have a comprehensive experience. The learning examples in this module explain the CMMI Microsoft Solution Framework and how to apply Life Cycle to actual software processes, and how they apply to the Software Engineering.

Learning videos and examples:

CMMI templates are available on line:

Topics for discussion and investigations:

  • After working with the TFS 2008 overview, how does the tool utilize software engineering concepts?
  • Envision a simple project, for example, the creation of a morning meal, note down the sequence of events to create the meal.
  • Review the documents contained in the templates, determine which documents would be used to set-up the lifecycle and process for the envisioning projects.


 
 

Things you can do from here:

 
 

BB 10% or 12% off coupon best buy 8/29 - 9/5 in store

 
 

Sent to you by Hudong via Google Reader:

 
 

via Fatwallet.com Hot Deals on Aug 29, 2007

Rating: 13 Posted By: trainaholic
Views: 5662 Replies: 23

Coupon


Sign up, shop, and get paid with FatWallet Cash Back!


 
 

Things you can do from here:

 
 

Download LINQPad - a free LINQ query expression tool

 
 

Sent to you by Hudong via Google Reader:

 
 

via MSDN Blogs by llangit on Sep 04, 2007

In keeping with my current theme of "free and cool" stuff. Here's something else - LINQPad.

linqpad

Download LINQPad


 
 

Things you can do from here:

 
 

Troubleshooting W3WP Crash -StackOverFlow Exception

 
 

Sent to you by Hudong via Google Reader:

 
 

via MSDN Blogs by anismenon on Aug 30, 2007

Hello,

This time let us learn some tit bits on debugging. There are some great blogs out there which gives a lot of in-depth information on debugging. My main aim with this blog is to give an introduction to those who are very much new to debugging. .

In this blog I will try to explain how well we can troubleshoot Worker process Crash issues due to Stack Over flow exceptions.

Stack is usually allocated around 1 MB of space and if there is any recursive function or an infinite loop, it will eat up most of the stack ultimately causing stack over flow exceptions.

Setting up Windows Debugger

=========================

Go ahead and download windows Debugger from the site.

http://www.microsoft.com/whdc/devtools/debugging/default.mspx

By default it gets installed in C:\Program Files\Debugging Tools for Windows. Open Windbg à File àset the symbol file path as srv*C:\Symbols\Pub*http://msdl.microsoft.com/download/symbols.

Create a folder Symbols and a subfolder Pub under C:\, press ok and Save the work space. This folder is to store the publicly available symbols from Microsoft (http://msdl.microsoft.com/download/symbols)

Setting up Debug Diag to Capture Crash dumps

==========================================

Install the latest version of DebugDiag http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en

Configure DebugDiag to capture the memory dump when the ExitProcess or TerminateProcess command is called. This will ensure that we capture the memory dump when the faulting thread is terminating the process.

1. Open DebugDiag

2. On the Rules tab, click Add Rule

3. Select Crash and click Next

4. Select "All IIS Processes" and click Next

5. Under Advanced Settings, click Breakpoints

6. Click Add Breakpoint...

7. Select KERNEL32!ExitProcess and Kernel32!TerminateProcess .Change Action Type to Full UserDump

8. Click OK

9. Click Save and Close

10. Click Next through the rest of the wizard

Now whenever the crash occurs DebugDiag will capture the dump. By default it will be under C:\Program Files\DebugDiag\Logs\Crash rule for all IIS_COM+ related processes .

Make sure that you disable all the health monitoring settings in IIS Application pool to prevent the dumps getting generated due to a normal application pool recycle.

Once you have the dump load the same in Windbg. File -->Open Crash dump.

Type in the following command in the debugger to get the symbols files for all the loaded modules from the symbol file path

.reload /f --> reloading the modules (F is for forcing reload)

Once the debugger finishes downloading the symbols, open up C:\Symbols\Pub folder and you can see the Public symbols that got downloaded. From next time onwards debugger will be getting symbols from this cached location.

In order to run the commands and look through the dumps we need the SOS.dll which comes along with .Net Framework. Copy SOS.dl from C:\WINNT\Microsoft.NET\Framework\<Respective Version>\ and put it under C:\Program Files\Debugging Tools for Windows folder.

For getting help on the commands available in SOS.dll type !help on the debugger window . You will be able to see the list of commands available. If you need further help on any command type in !help <Command Name> Eg :- !help eeheap

Now to look at the threads type in !threads.

image

We can see that thread 14 is the one which has caused the stack over flow exception.

We are thread 0 now. To move to thread 14 type ~14s . To see the native call stack type kpn

image

You can see that the dump got generated due to Kernel32!Terminate Process.

To see the Managed stack type !clrstack

image

We can see that a function UserLogin() is getting called recursively which us causing the stack to overflow. Now let us try getting more details on the function such as the module and assembly name from which this function gets called.

Select a Code adress (Second column) from the above stack and type in !ip2md 02575e3a

image

We can see the module name(02207a80), type in !dumpmodule to dump out the module information

image

You can see that the UserLogin() function is getting called from the assembly App_Web_itzw09g-.dll

You can dump out the module information using lmvm command

image

Save the assembly to local disc using the command !savemodule App_Web_itzw09g_ c:\Assembly.dll and use reflector to get the function details.

Download Reflector

http://www.aisto.com/Roeder/Frontier/Default.aspx?PermaLink=53

Pass your comments to know whether this blog was helpful.....

So till next time..Bye bye...

Ref:- http://support.microsoft.com/kb/892277


 
 

Things you can do from here:

 
 

Free Full Version Games: Command And Conquer Gold Edition, Tom Clancy Ghost Recon, Far Cry, Prince Of Persia SandsofTime

 
 

Sent to you by Hudong via Google Reader:

 
 

via Fatwallet.com Hot Deals on Sep 01, 2007

Rating: 79 Posted By: Deal2Deal
Views: 18394 Replies: 91

from SD...

Thread Rating: Votes: 60 Score: 60

Free Command and Conquer Gold Edition PC Download

Thanks largely to the efforts of our loyal fans whom continue to sustain and grow the Command & Conquer community, Command & Conquer has become a legendary franchise and its time to celebrate its birth once again.

In order to give back to the fans for over 12 years of devotion we are putting together a 12th Anniversary celebration during the month of September. However, as any Command & Conquer fan knows, the true party starts today, August 31st, which marks 12 years since Command & Conquer Gold launched way back in 1995.

To kick the celebration off, today we have a special surprise which we are certain new and old Command & Conquer fans will enjoy. We are providing the original Command & Conquer Gold as a free download, compatible for Windows XP! This is the same version included with the collectors pack Command & Conquer: The First Decade, and is now available for you to download for free!

We are providing the ISO image of C&C GOLD for both the GDI and Nod discs. In order for C&C GOLD to run on Windows XP, you will need to burn the ISO image onto a CD with a CD Burner and any "CD Burning Software" such as Nero, Alcohol, etc. There are also a few extra steps in order to make C&C GOLD run on Windows XP after you burn it to CD. Please click the link below for the exact instructions after you download both files!

Link to download page

Note that there may be more freebies to come at this link as EA says:

"Continuing on in the month of September, be sure to keep your eyes right here on our official site at www.commandandconquer.com each week as we plan to celebrate and remember 12 years of Command & Conquer in a number of different ways."

also from SD...

Fileplanet is offering a few full version games for a free download as well. These games, unlike C&C are ad-sponsored. Thanks Libertarian [Discuss]
Available titles:

* Tom Clancy's Ghost Recon
* Prince of Persia: Sands of Time
* Far Cry
* Rayman Raving Rabbids

Alternate download links no registration, no waiting

Far Cry - ad sponsored

Far Cry

Prince of Persia: Sands of Time - ad sponsored

Prince of Persia

Rayman Raving Rabbids - ad sponsored

Rayman Raving Rabbids

Tom Clancy's Ghost Recon - ad sponsored

Ghost Recon


-You can install the virtual clone drive (http://www.slysoft.com/en/virtual...drive.html) and mount the ISO files directly to it, this way you won't have to burn them on CD.

-- or you can use Alcohol 120% to run the iso as a clone drive (http://www.alcohol-soft.com/) great program.

- Or use Daemon Tools to mount the .iso to a virtual drive.

- Freeware program ISO Recorder makes it easy to burn, copy, and create disc images (CD or DVD) in Windows. - http://isorecorder.alexfeinman.co...corder.htm - 360KB size

Edit by Moderator: Thank you for your participation. Please note that there is also discussion about this topic Here.


Sign up, shop, and get paid with FatWallet Cash Back!


 
 

Things you can do from here: