HighTechTalks DotNet Forums  

Any help understanding windbg/sos dump of hung app

Dotnet Framework (CLR) microsoft.public.dotnet.framework.clr


Discuss Any help understanding windbg/sos dump of hung app in the Dotnet Framework (CLR) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
John Aldrin
 
Posts: n/a

Default Any help understanding windbg/sos dump of hung app - 08-10-2006 , 05:41 PM






Hi,

Wondering if anyone can make better sense of this app dump than I.

Working on app that perioldiclly hangs, with maxed out cpu. The app is
reading data from hearing aids ( 1 or 2) connected via a serial port to an
external device that interfaces w/hearing aid. App is a win forms app
written in C#, Dot Net 1.1.

Using Windbg I determined that the apps main ui thread is using all the cpu.
used adplus to capture app state.

Best I can tell is that our main ui thread is in the garbage collecting
state and it is acting like it is in a infinite loop.

** Thread Info **

ThreadCount: 6
UnstartedThread: 0
BackgroundThread: 2
PendingThread: 0
DeadThread: 2
PreEmptive GC Alloc
Lock
ID ThreadOBJ State GC Context Domain
Count APT Exception
0 0x1194 0x0015edd0 0x6020 Disabled 0x00000000:0x00000000 0x00159dd0
1 STA (GC)
2 0x1388 0x001676f0 0xb220 Enabled 0x00000000:0x00000000 0x00159dd0
0 MTA (Finalizer)
XXX 0 0x00223918 0x5820 Enabled 0x00000000:0x00000000 0x00159dd0
0 STA
XXX 0 0x04e00f80 0x1820 Enabled 0x00000000:0x00000000 0x00159dd0
0 Ukn
11 0x1400 0x04e02c80 0x7022 Enabled 0x00000000:0x00000000 0x00159dd0
0 STA
12 0x1060 0x04e02e38 0x2001220 Enabled 0x00000000:0x00000000 0x00159dd0
0 Ukn


0 - is main ui thread
11 - is background thread to do i/o w/external device
12- is background thread that toggles the priority of the i/o background
thread(11).


A little confused about thread state values, seems to be more data than
ThreadState enum supports,
My quess is
0 is WaitSleepJoin
11 is WaitSleepJoin and SuspendRequested
12 is WaitSleepJoin

States for 11 and 12 seem funny to me because their call stack seems to show
they waiting for gargage collection 2 finish. ( following call
WaitUntilGCComplete in call stack)

Looking at call stack for main ui thread it appears that it had to allocate
more memory and
a garbage collection was started and it never finished.


dump stacks for threads follow

Thread 0 - sorry quite big

0:000> !dumpstack
Thread 0
Current frame: ntdll!KiFastSystemCallRet
ChildEBP RetAddr Caller,Callee
0012e5a8 7c90e9ab ntdll!ZwWaitForMultipleObjects+0xc
0012e5ac 7c8094f2 kernel32!WaitForMultipleObjectsEx+0x12c, calling
ntdll!ZwWaitForMultipleObjects
0012e638 7c8399f3 kernel32!_except_handler3
0012e648 7c809c86 kernel32!WaitForMultipleObjects+0x18, calling
kernel32!WaitForMultipleObjectsEx
0012e664 79247d67 mscorwks!Thread::SysSuspendForGC+0x248, calling
kernel32!WaitForMultipleObjects
0012e6bc 791efdaf mscorwks!Int32ToDecStr+0xf4, calling
mscorwks!__security_check_cookie
0012e6dc 791b452d mscorwks!gc_heap::allocate_more_space+0x3f0, calling
mscorwks!gc_heap::adjust_limit_clr
0012e71c 791b452d mscorwks!gc_heap::allocate_more_space+0x3f0, calling
mscorwks!gc_heap::adjust_limit_clr
0012e758 792d176b mscorwks!GCHeap::Alloc+0x77, calling
mscorwks!gc_heap::allocate_more_space
0012e764 792d17bd mscorwks!GCHeap::Alloc+0xc9, calling
mscorwks!__security_check_cookie
0012e774 791db30c mscorwks!FastAllocatePrimitiveArray+0x45, calling
mscorwks!Alloc
0012e794 791db8a5 mscorwks!JIT_NewArr1+0xbb, calling
mscorwks!FastAllocatePrimitiveArray
0012e79c 791db8b2 mscorwks!JIT_NewArr1+0xc8, calling mscorwks!Frame::Pop
0012e7a0 791db8ba mscorwks!JIT_NewArr1+0xd0, calling
mscorwks!HelperMethodFrame::RestoreState
0012e7b4 792d17bd mscorwks!GCHeap::Alloc+0xc9, calling
mscorwks!__security_check_cookie
0012e7c4 793c22d0 mscorwks!COMNlsInfo::GetCaseInsHash+0xcc, calling
mscorwks!HashiStringKnownLower80
0012e7c8 791f175b mscorwks!JITutil_IsInstanceOfBizarre+0x15d, calling 00971e90
0012e7dc 791db847 mscorwks!JIT_NewArr1+0x15, calling
mscorwks!LazyMachState::captureState
0012e7f0 7923135c mscorwks!COMString::EqualsObject+0x45, calling
mscorwks!WcharCompareHelper
0012e7f8 79231365 mscorwks!COMString::EqualsObject+0x4e, calling 00971e90
0012e804 799a44fd (MethodDesc 0x79ba9b70 +0x35
System.Collections.Hashtable.KeyEquals)
0012e80c 7999c0e8 (MethodDesc 0x79ba9ad0 +0xc8
System.Collections.Hashtable.get_Item)
0012e840 791f11dc mscorwks!COMString::EqualsString+0x3f, calling
mscorwks!WcharCompareHelper
0012e854 791b452d mscorwks!gc_heap::allocate_more_space+0x3f0, calling
mscorwks!gc_heap::adjust_limit_clr
0012e870 791b3271 mscorwks!BaseCrst::Enter+0x3e, calling
ntdll!RtlTryEnterCriticalSection
0012e880 791b3284 mscorwks!BaseCrst::IncThreadLockCount+0x6, calling 00971e90
0012e89c 792116aa mscorwks!GCHeap::SuspendEE+0xcf, calling
mscorwks!Thread::SysSuspendForGC
0012e8b4 79213c1f mscorwks!GCHeap::GarbageCollectGeneration+0x103, calling
mscorwks!GCHeap::SuspendEE
0012e8d0 79214e83 mscorwks!gc_heap::allocate_more_space+0x13a, calling
mscorwks!GCHeap::GarbageCollectGeneration
0012e900 792d176b mscorwks!GCHeap::Alloc+0x77, calling
mscorwks!gc_heap::allocate_more_space
0012e91c 792d17bd mscorwks!GCHeap::Alloc+0xc9, calling
mscorwks!__security_check_cookie
0012e93c 792d17bd mscorwks!GCHeap::Alloc+0xc9, calling
mscorwks!__security_check_cookie
0012e960 0f97366c (MethodDesc 0xf7f8600 +0xcc4
System.Data.XmlDataLoader.InferSchema), calling mscorwks!JIT_IsInstanceOf
0012e97c 791b3af0 mscorwks!Alloc+0x3a, calling mscorwks!GCHeap::Alloc
0012e98c 791db30c mscorwks!FastAllocatePrimitiveArray+0x45, calling
mscorwks!Alloc
0012e9ac 791db8a5 mscorwks!JIT_NewArr1+0xbb, calling
mscorwks!FastAllocatePrimitiveArray
0012e9b4 791db8b2 mscorwks!JIT_NewArr1+0xc8, calling mscorwks!Frame::Pop
0012e9b8 791db8ba mscorwks!JIT_NewArr1+0xd0, calling
mscorwks!HelperMethodFrame::RestoreState
0012e9e0 791f175b mscorwks!JITutil_IsInstanceOfBizarre+0x15d, calling 00971e90
0012e9f4 791db847 mscorwks!JIT_NewArr1+0x15, calling
mscorwks!LazyMachState::captureState
0012ea08 7923135c mscorwks!COMString::EqualsObject+0x45, calling
mscorwks!WcharCompareHelper
0012ea10 79231365 mscorwks!COMString::EqualsObject+0x4e, calling 00971e90
0012ea1c 799a44fd (MethodDesc 0x79ba9b70 +0x35
System.Collections.Hashtable.KeyEquals)
0012ea24 7999c0e8 (MethodDesc 0x79ba9ad0 +0xc8
System.Collections.Hashtable.get_Item)
0012ea58 791f11dc mscorwks!COMString::EqualsString+0x3f, calling
mscorwks!WcharCompareHelper
0012ea6c 0f97366c (MethodDesc 0xf7f8600 +0xcc4
System.Data.XmlDataLoader.InferSchema), calling mscorwks!JIT_IsInstanceOf
0012ea88 791b3af0 mscorwks!Alloc+0x3a, calling mscorwks!GCHeap::Alloc
0012ea98 791db30c mscorwks!FastAllocatePrimitiveArray+0x45, calling
mscorwks!Alloc
0012eab4 791b3af0 mscorwks!Alloc+0x3a, calling mscorwks!GCHeap::Alloc
0012eac4 791bdfaa mscorwks!AllocateArrayEx+0x161, calling mscorwks!Alloc
0012ead4 791b3af0 mscorwks!Alloc+0x3a, calling mscorwks!GCHeap::Alloc
0012eae4 791bdfaa mscorwks!AllocateArrayEx+0x161, calling mscorwks!Alloc
0012eb04 791bdfaa mscorwks!AllocateArrayEx+0x161, calling mscorwks!Alloc
0012eb18 791d60b3 mscorwks!HelperMethodFrame::LazyInit+0x18, calling 00971e90
0012eb24 791b3af0 mscorwks!Alloc+0x3a, calling mscorwks!GCHeap::Alloc
0012eb34 791d6280 mscorwks!FastAllocateObject+0x25, calling mscorwks!Alloc
0012eb54 791d62ce mscorwks!JIT_NewFast+0x2c, calling
mscorwks!FastAllocateObject
0012eb64 791f175b mscorwks!JITutil_IsInstanceOfBizarre+0x15d, calling 00971e90
0012eb80 0f97ce73 (MethodDesc 0xf7fd160 +0x33
System.Data.Common.Int32Storage.Set), calling (MethodDesc 0x79bfd340
System.Collections.BitArray.Set)
0012eb94 791d62b4 mscorwks!JIT_NewFast+0x12, calling
mscorwks!LazyMachState::captureState
0012ebc0 0f9758e3 (MethodDesc 0xf7f8640 +0x33
System.Data.XmlDataLoader.LoadRowData), calling 00a02018
0012ebd0 791f19ce mscorwks!ObjectNative::GetHashCode+0x1c, calling
mscorwks!ObjHeader::PassiveGetSyncBlock
0012ebdc 7999c1b0 (MethodDesc 0x79ba9b30 +0x20
System.Collections.Hashtable.GetHash)
0012ebe0 7999c449 (MethodDesc 0x79ba9ba0 +0x159
System.Collections.Hashtable.Insert), calling
mscorwks!JIT_UP_CheckedWriteBarrierEAX
0012ec0c 0f97cf3c (MethodDesc 0xf7f85a0 +0x24
System.Data.XmlDataLoader.FColumnElement), calling (MethodDesc 0xf7f8870
System.Data.XmlToDatasetMap.GetColumnSchema)
0012ec1c 0f974dfe (MethodDesc 0xf7f8650 +0x19e
System.Data.XmlDataLoader.LoadRows), calling (MethodDesc 0xf7f8640
System.Data.XmlDataLoader.LoadRowData)
0012ec3c 0f974e09 (MethodDesc 0xf7f8650 +0x1a9
System.Data.XmlDataLoader.LoadRows), calling (MethodDesc 0xf7f8650
System.Data.XmlDataLoader.LoadRows)
0012ec5c 0f974e09 (MethodDesc 0xf7f8650 +0x1a9
System.Data.XmlDataLoader.LoadRows), calling (MethodDesc 0xf7f8650
System.Data.XmlDataLoader.LoadRows)
0012ec7c 0f974e09 (MethodDesc 0xf7f8650 +0x1a9
System.Data.XmlDataLoader.LoadRows), calling (MethodDesc 0xf7f8650
System.Data.XmlDataLoader.LoadRows)
0012ec9c 0f97461f (MethodDesc 0xf7f8630 +0x17f
System.Data.XmlDataLoader.LoadData), calling (MethodDesc 0xf7f8650
System.Data.XmlDataLoader.LoadRows)
0012ecc0 0f978dea (MethodDesc 0xf7f3b20 +0x5b2 System.Data.DataSet.ReadXml),
calling (MethodDesc 0xf7f85f0 System.Data.XmlDataLoader.InferSchema)
0012ecc4 0f978dfe (MethodDesc 0xf7f3b20 +0x5c6 System.Data.DataSet.ReadXml),
calling (MethodDesc 0xf7f8630 System.Data.XmlDataLoader.LoadData)
0012ed0c 0f80ecc1 (MethodDesc 0xf7f3b90 +0x51 System.Data.DataSet.ReadXml),
calling (MethodDesc 0xf7f3b20 System.Data.DataSet.ReadXml)
0012ed38 7bd65f2a (MethodDesc 0x7bec7260 +0x7a
System.Xml.XmlTextReader..ctor), calling 00973048
0012ed48 7bd65e8e (MethodDesc 0x7bec7250 +0x46
System.Xml.XmlTextReader..ctor), calling (MethodDesc 0x7bec7260
System.Xml.XmlTextReader..ctor)
0012ed54 0f9787f0 (MethodDesc 0xf7f3bc0 +0x80 System.Data.DataSet.ReadXml),
calling (MethodDesc 0xf7f3b90 System.Data.DataSet.ReadXml)
0012ed78 791f62bb mscorwks!GCInterface::FCSuppressFinalize+0x1e, calling
mscorwks!GCHeap::SetFinalizationRun
0012ed80 0f80e950 (MethodDesc 0xf7f3650 +0x128 System.Data.DataSet..ctor),
calling (MethodDesc 0xf7f3790 System.Data.DataSet.set_Locale)
0012ed88 0f9782c5 (MethodDesc 0xf7fedd8 +0x1d5
Starkey.Core.DataServer.Internal.Request..ctor), calling (MethodDesc
0xf7f3bc0 System.Data.DataSet.ReadXml)
0012edf4 799fce76 (MethodDesc 0x79bc33d8 +0x26 System.DateTime.get_Now),
calling (MethodDesc 0x79bc3168 System.DateTime..ctor)
0012ee04 0f977f5b (MethodDesc 0xf7f33e8 +0xdb
Starkey.Core.DataServer.Client.Request), calling (MethodDesc 0xf7fedd8
Starkey.Core.DataServer.Internal.Request..ctor)
0012ee7c 79999db2 (MethodDesc 0x79ba1938 +0x22
System.Collections.ArrayList/ArrayListEnumeratorSimple..ctor), calling
0097313e
0012ee8c 0f80e7d7 (MethodDesc 0xf7f3418 +0x287
Starkey.Core.DataServer.Client.Request), calling (MethodDesc 0xf7f33e8
Starkey.Core.DataServer.Client.Request)
0012eed8 799a0136 (MethodDesc 0x79b93138 +0x9e System.String.Concat),
calling mscorwks!COMString::FillStringChecked
0012eeec 0f80e05c (MethodDesc 0x353bfb0 +0x8c
Starkey.Core.HIACircuit.GetMasterProductLineFromPr oductLine), calling
(MethodDesc 0xf7f3418 Starkey.Core.DataServer.Client.Request)
0012ef0c 07f84706 (MethodDesc 0x7d63e20 +0x36
Starkey.Framework.IO.BitMaskField.get_ValueAsUInt) , calling (MethodDesc
0x7d63fe0 Starkey.Framework.BitUtil.GetUInt32FromBigEndianBi ts)
0012ef2c 0f80df5f (MethodDesc 0x353c030 +0x27
Starkey.Core.HIACircuit.GetDescription), calling (MethodDesc 0x353bfb0
Starkey.Core.HIACircuit.GetMasterProductLineFromPr oductLine)
0012ef54 0f80d928 (MethodDesc 0x353bc70 +0x118
Starkey.Core.HIACircuit..ctor), calling (MethodDesc 0x353c030
Starkey.Core.HIACircuit.GetDescription)
0012ef6c 7b1d8567 (MethodDesc 0x7b30c8b8 +0xa7
System.Configuration.ConfigurationRecord.GetConfig )
0012ef80 799db551 (MethodDesc 0x79bd08a0 +0x61
System.Collections.CaseInsensitiveHashCodeProvider .GetHashCode), calling
(MethodDesc 0x79bce800
System.Globalization.TextInfo.GetCaseInsensitiveHa shCode)
0012ef90 7999c1a8 (MethodDesc 0x79ba9b30 +0x18
System.Collections.Hashtable.GetHash)
0012ef94 7999c05f (MethodDesc 0x79ba9ad0 +0x3f
System.Collections.Hashtable.get_Item)
0012f000 0f80d3d5 (MethodDesc 0xf7f1548 +0x8d
Starkey.Core.HIACircuitBuilderByInstrument.Build), calling (MethodDesc
0x353bc70 Starkey.Core.HIACircuit..ctor)
0012f070 0f80d036 (MethodDesc 0x3534c88 +0x5e
Starkey.Core.HearingInstrumentFactory.NewCircuit)
0012f094 02e97ec8 (MethodDesc 0x35383a0 +0x2f8
Starkey.HearingInstrumentServices.HIAProgrammerSer vice.Read), calling
(MethodDesc 0x3534c88 Starkey.Core.HearingInstrumentFactory.NewCircuit)
0012f0a8 792a49dc mscorwks!BaseDomain::IsStringInterned+0x21, calling
mscorwks!AppDomainStringLiteralMap::GetInternedStr ing
0012f0e8 791b1b3a mscorwks!JIT_MonExit+0xf, calling 00971e90
0012f0f0 02e97bbb (MethodDesc 0x35382e0 +0x43
Starkey.HearingInstrumentServices.HIAProgrammerSer vice.add_WrongSideDetectedOnRead), calling mscorwks!JIT_MonExit
0012f104 02e97621 (MethodDesc 0x35347f8 +0x2a9
Starkey.HearingInstrumentServices.ProgrammerServic e.InternalCircuitRead)
0012f124 035c27af 035c27af
0012f184 791f630d mscorwks!TableFreeSingleHandleToCache+0x4d, calling
mscorwks!DecrementUP
0012f19c 02e97265 (MethodDesc 0x35347d8 +0x4d
Starkey.HearingInstrumentServices.ProgrammerServic e.InternalHearingInstrumentRead),
calling (MethodDesc 0x35347f8
Starkey.HearingInstrumentServices.ProgrammerServic e.InternalCircuitRead)
0012f1bc 7923d6ef mscorwks!COMPlusEndCatch+0x52, calling
mscorwks!Thread::SetLastThrownObject
0012f1d8 02e97203 (MethodDesc 0x35347c8 +0x23
Starkey.HearingInstrumentServices.ProgrammerServic e.InternalHearingInstrumentRead),
calling (MethodDesc 0x35347d8
Starkey.HearingInstrumentServices.ProgrammerServic e.InternalHearingInstrumentRead)
0012f200 02e971c0 (MethodDesc 0x3534748 +0x20
Starkey.HearingInstrumentServices.ProgrammerServic e.Read), calling
(MethodDesc 0x35347c8
Starkey.HearingInstrumentServices.ProgrammerServic e.InternalHearingInstrumentRead)
0012f224 02e96fa4 (MethodDesc 0xa15440 +0xd4
RecreateSuiteHangs.FrmMain.DoRead), calling (MethodDesc 0x3534748
Starkey.HearingInstrumentServices.ProgrammerServic e.Read)
0012f270 02e96e51 (MethodDesc 0xa15430 +0x39
RecreateSuiteHangs.FrmMain.DoRepeatedRead), calling 00a1543b (MethodDesc
0xa15440 RecreateSuiteHangs.FrmMain.DoRead)
0012f288 79bb9620 (stub for System.Number.ParseInt32), calling 00a3af04
0012f28c 79a0ca70 (MethodDesc 0x79bbd6e8 +0x30 System.Convert.ToInt32),
calling 79bb961b (MethodDesc 0x79bb9620 System.Number.ParseInt32)
0012f29c 02e96dfc (MethodDesc 0xa15420 +0x34
RecreateSuiteHangs.FrmMain.btnRead_Click), calling 00a1542b (MethodDesc
0xa15430 RecreateSuiteHangs.FrmMain.DoRepeatedRead)
0012f2b0 7b8176ee (MethodDesc 0x7b9e3ed8 +0x16
System.Windows.Forms.Control.get_IsActiveX), calling (MethodDesc 0x7b9ee320
System.Windows.Forms.PropertyStore.GetObject)
0012f2b8 7b8823f4 (MethodDesc 0x7b9e3048 +0x54
System.Windows.Forms.Control.OnClick)
0012f2c8 7b8a6a79 (MethodDesc 0x7b9e9a18 +0x49
System.Windows.Forms.Button.OnClick)
0012f2d4 7b8a6b66 (MethodDesc 0x7b9e9a28 +0xd6
System.Windows.Forms.Button.OnMouseUp)
0012f2fc 7b8852e3 (MethodDesc 0x7b9e2548 +0x1c3
System.Windows.Forms.Control.WmMouseUp)
0012f30c 77d4eb3e user32!CallNextHookEx+0x46, calling user32!PhkNextValid
0012f324 74730e6c msctf!SysGetMsgProc+0x79, calling user32!CallNextHookEx
0012f338 7b823370 (MethodDesc 0x7b9e2658 +0x468
System.Windows.Forms.Control.WndProc), calling 7b9e2543 (MethodDesc
0x7b9e2548 System.Windows.Forms.Control.WmMouseUp)
0012f368 77d4eaf2 user32!DispatchHookW+0x31
0012f394 77d4eaad user32!CallHookWithSEH+0x44, calling user32!_SEH_epilog
0012f398 7b9e8e00 (stub for System.Windows.Forms.ButtonBase.get_FlatStyle),
calling 00a1a7d8
0012f3a0 7b828273 (MethodDesc 0x7b9e8d70 +0xdb
System.Windows.Forms.ButtonBase.WndProc)
0012f3bc 77d4eaad user32!CallHookWithSEH+0x44, calling user32!_SEH_epilog
0012f3c0 77d4ebf3 user32!__fnHkINLPMSG+0x25, calling user32!CallHookWithSEH
0012f3d8 7b828185 (MethodDesc 0x7b9e9a68 +0x5d
System.Windows.Forms.Button.WndProc)
0012f3e0 7b82291b (MethodDesc 0x7b9f1f28 +0xb
System.Windows.Forms.Control/ControlNativeWindow.OnMessage)
0012f3e4 7b8228fc (MethodDesc 0x7b9f1f58 +0xbc
System.Windows.Forms.Control/ControlNativeWindow.WndProc)
0012f3f4 7b8227a0 (MethodDesc 0x7b9f1af0 +0x30
System.Windows.Forms.NativeWindow.Callback)
0012f420 77d6e185 user32!NtUserCallNextHookEx+0xc
0012f430 00974aca 00974aca
0012f450 77d48734 user32!InternalCallWinProc+0x28
0012f47c 77d48816 user32!UserCallWinProcCheckWow+0x150, calling
user32!InternalCallWinProc
0012f4b8 77d4eaad user32!CallHookWithSEH+0x44, calling user32!_SEH_epilog
0012f4e4 77d489cd user32!DispatchMessageWorker+0x306, calling
user32!UserCallWinProcCheckWow
0012f51c 77d491be user32!NtUserGetMessage+0xc
0012f544 77d48a10 user32!DispatchMessageW+0xf, calling
user32!DispatchMessageWorker
0012f554 035c0462 035c0462
0012f57c 7b9f5878 (stub for
System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW), calling 035c0430
0012f580 7b82df3a (MethodDesc 0x7b9feb50 +0x382
System.Windows.Forms.Application/ComponentManager.System.Windows.Forms.UnsafeNative Methods+IMsoComponentManager.FPushMessageLoop),
calling 7b9f5873 (MethodDesc 0x7b9f5878
System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW)
0012f5a4 7b9f2cf8 (stub for
System.Windows.Forms.UnsafeNativeMethods.WaitMessa ge), calling 035c0e80
0012f5ac 7b82e0f6 (MethodDesc 0x7b9feb50 +0x53e
System.Windows.Forms.Application/ComponentManager.System.Windows.Forms.UnsafeNative Methods+IMsoComponentManager.FPushMessageLoop),
calling user32!NtUserWaitMessage
0012f610 7b82daa7 (MethodDesc 0x7b9fc888 +0x15f
System.Windows.Forms.Application/ThreadContext.RunMessageLoopInner)
0012f650 7b82d7c5 (MethodDesc 0x7b9fc878 +0x45
System.Windows.Forms.Application/ThreadContext.RunMessageLoop), calling
(MethodDesc 0x7b9fc888
System.Windows.Forms.Application/ThreadContext.RunMessageLoopInner)
0012f67c 7b851864 (MethodDesc 0x7b9e8300 +0x34
System.Windows.Forms.Application.Run), calling (MethodDesc 0x7b9fc878
System.Windows.Forms.Application/ThreadContext.RunMessageLoop)
0012f690 02e90078 (MethodDesc 0xa15400 +0x20
RecreateSuiteHangs.FrmMain.Main), calling (MethodDesc 0x7b9e8300
System.Windows.Forms.Application.Run)


Thread 11
Current frame: ntdll!KiFastSystemCallRet
ChildEBP RetAddr Caller,Callee
031cf3a0 7c90e9c0 ntdll!ZwWaitForSingleObject+0xc
031cf3a4 7c8025db kernel32!WaitForSingleObjectEx+0xa8, calling
ntdll!NtWaitForSingleObject
031cf3f8 7c8399f3 kernel32!_except_handler3
031cf408 7c802542 kernel32!WaitForSingleObject+0x12, calling
kernel32!WaitForSingleObjectEx
031cf41c 791ff49a mscorwks!GCHeap::WaitUntilGCComplete+0x4f, calling
kernel32!WaitForSingleObject
031cf428 791ff4eb mscorwks!Thread::RareDisablePreemptiveGC+0xb5, calling
mscorwks!GCHeap::WaitUntilGCComplete
031cf438 79299c98 mscorwks!OnStubScalarTripThread+0x10, calling
mscorwks!CommonTripThread
031cf448 03011cef 03011cef, calling mscorwks!OnStubScalarTripThread
031cf470 79b960f0 (stub for
System.Threading.ManualResetEvent.SetManualResetEv entNative), calling 03011cac
031cf474 799ea78a (MethodDesc 0x79b96138 +0x42
System.Threading.ManualResetEvent.Set), calling 79b960eb (MethodDesc
0x79b960f0 System.Threading.ManualResetEvent.SetManualResetEv entNative)
031cf4a8 02e9d802 (MethodDesc 0x353db50 +0x252
Starkey.Hia.Audiology.Communications.Communication Agent/Task.Execute),
calling 79b96133 (MethodDesc 0x79b96138 System.Threading.ManualResetEvent.Set)
031cf4ec 79335be8 mscorwks!COMDateTime::FCGetSystemFileTime+0x1a, calling
kernel32!FileTimeToLocalFileTime
031cf4fc 02e9d597 (MethodDesc 0x353db10 +0x17
Starkey.Hia.Audiology.Communications.Communication Agent/Task.Execute),
calling (MethodDesc 0x353db50
Starkey.Hia.Audiology.Communications.Communication Agent/Task.Execute)
031cf518 02e9c79a (MethodDesc 0x353d7c8 +0x472
Starkey.Hia.Audiology.Communications.TaskExecutive /TaskList.ExecuteNextWaitingTask)
031cf7a8 79a283e5 (MethodDesc 0x79b95da0 +0x4d
System.Threading.WaitHandle.WaitAny), calling (MethodDesc 0x79b95d90
System.Threading.WaitHandle.WaitAny)
031cf7bc 02e9b718 (MethodDesc 0x353d600 +0x190
Starkey.Hia.Audiology.Communications.TaskExecutive .CommunicationsThreadProc),
calling (MethodDesc 0x79b95da0 System.Threading.WaitHandle.WaitAny)
031cf7c4 02e9b63d (MethodDesc 0x353d600 +0xb5
Starkey.Hia.Audiology.Communications.TaskExecutive .CommunicationsThreadProc),
calling (MethodDesc 0x353d7c8
Starkey.Hia.Audiology.Communications.TaskExecutive /TaskList.ExecuteNextWaitingTask)
031cf820 791daddf mscorwks!ArgIterator::ArgIterator+0x55, calling
mscorwks!IsArgumentInRegister
031cf834 791d94bc mscorwks!CallDescrWorker+0x30
031cf83c 791ed194 mscorwks!MethodDesc::CallDescr+0x1b8, calling
mscorwks!CallDescrWorker
031cf86c 791d7b2f mscorwks!MetaSig::SizeOfActualFixedArgStack+0x14, calling
mscorwks!MetaSig::ForceSigWalk
0


Thread 12
Current frame: ntdll!KiFastSystemCallRet
ChildEBP RetAddr Caller,Callee
0517f660 7c90e9c0 ntdll!ZwWaitForSingleObject+0xc
0517f664 7c8025db kernel32!WaitForSingleObjectEx+0xa8, calling
ntdll!NtWaitForSingleObject
0517f698 7c80243c kernel32!SleepEx+0x97, calling
ntdll!RtlDeactivateActivationContextUnsafeFast
0517f6b8 7c8399f3 kernel32!_except_handler3
0517f6c8 7c802542 kernel32!WaitForSingleObject+0x12, calling
kernel32!WaitForSingleObjectEx
0517f6dc 791ff49a mscorwks!GCHeap::WaitUntilGCComplete+0x4f, calling
kernel32!WaitForSingleObject
0517f6e8 791ff4eb mscorwks!Thread::RareDisablePreemptiveGC+0xb5, calling
mscorwks!GCHeap::WaitUntilGCComplete
0517f6f8 79233c92 mscorwks!Thread::UserSleep+0xcc, calling
mscorwks!Thread:isablePreemptiveGC
0517f710 79233cec mscorwks!ThreadNative::Sleep+0x30, calling
mscorwks!Thread::UserSleep
0517f720 030115fe 030115fe
0517f74c 79bb8b08 (stub for System.Threading.Thread.Sleep), calling 030115d4
0517f750 02e9c30e (MethodDesc 0x353e1e8 +0x4e
Starkey.Hia.Audiology.Communications.TaskExecutive /ThreadPrioritizer/PriorityState.Execute),
calling 79bb8b03 (MethodDesc 0x79bb8b08 System.Threading.Thread.Sleep)
0517f76c 02e9c223 (MethodDesc 0x353e0d0 +0x83
Starkey.Hia.Audiology.Communications.TaskExecutive /ThreadPrioritizer.Manage),
calling (MethodDesc 0x353e1e8
Starkey.Hia.Audiology.Communications.TaskExecutive /ThreadPrioritizer/PriorityState.Execute)
0517f784 7c820eb0 kernel32!TermsrvSyncUserIniFile+0x4a8, calling
kernel32!__security_check_cookie
0517f7a0 791daddf mscorwks!ArgIterator::ArgIterator+0x55, calling
mscorwks!IsArgumentInRegister
0517f7b4 791d94bc mscorwks!CallDescrWorker+0x30
0517f7bc 791ed194 mscorwks!MethodDesc::CallDescr+0x1b8, calling
mscorwks!CallDescrWorker
0517f7ec 791d7b2f mscorwks!MetaSig::SizeOfActualFixedArgStack+0x14, calling
mscorwks!MetaSig::ForceSigWalk
0517f7fc 791ed086 mscorwks!MethodDesc::CallDescr+0x79, calling
mscorwks!MetaSig::SizeOfActualFixedArgStack
0517f800 791ed096 mscorwks!MethodDesc::CallDescr+0x89, calling
mscorwks!_alloca_probe
0517f898 7c91056d ntdll!RtlFreeHeap+0x647, calling ntdll!_SEH_epilog
0517f8a4 791b5f0c mscorwks!EEClass::GetFixedUpSlot+0x1d, calling
mscorwks!Module::IsJumpTargetTableEntry
0517f8cc 791ed54b mscorwks!MethodDesc::CallDescr+0x4f, calling
mscorwks!MethodDesc::CallDescr
0517f8e8 79bc82f8 (stub for System.Threading.ThreadStart.Invoke), calling
035c1354
0517f8f0 79bc82f8 (stub for System.Threading.ThreadStart.Invoke), calling
035c1354
0517f954 7c91056d ntdll!RtlFreeHeap+0x647, calling ntdll!_SEH_epilog
0517f960 791b5f0c mscorwks!EEClass::GetFixedUpSlot+0x1d, calling
mscorwks!Module::IsJumpTargetTableEntry
0517f988 791ed5b9 mscorwks!MethodDesc::Call+0x97, calling
mscorwks!MethodDesc::CallDescr
0517f9b0 792e87b7 mscorwks!ThreadNative::KickOffThread_Worker+0x9d, calling
mscorwks!MethodDesc::Call
0517f9fc 792e8886 mscorwks!ThreadNative::KickOffThread+0xc2, calling
mscorwks!ThreadNative::KickOffThread_Worker
0517fa20 7c919aeb ntdll!LdrpGetProcedureAddress+0xa6, calling
ntdll!_SEH_epilog





Reply With Quote
  #2  
Old   
Jeffrey Tan[MSFT]
 
Posts: n/a

Default RE: Any help understanding windbg/sos dump of hung app - 08-11-2006 , 05:44 AM






Hi Jrax,

Based on your post, it seems that your application is experiencing a high
CPU hang. Can you tell me how do you identify that your main GUI thread is
causing the high CPU? Based on the call stack information, it seems that
the main GUI thread is hanging in kernel32!WaitForMultipleObjectsEx, which
should not cost any CPU time. Can you give it recheck?

The simplest way to identify if a thread is costing high CPU time is using
Process Explorer's "Threads" tab in your application's property dialog. You
may monitor "CPU" column in this tabpage, it will tell you if the main GUI
thread is costing CPU now.

Also, it is a good idea to obtain more than 1 dumps from your application
and view the main thread call stack, then you can identify if the main GUI
thread is really hanging in the mscorwks!Thread::SysSuspendForGC for a long
period.

Finally, if you require urgent help of analyzing the .Net dump file, I
recommend you try to contact Microsoft PSS, they will help you to look into
the dump file and perform code review.

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


Reply With Quote
  #3  
Old   
Barry Kelly
 
Posts: n/a

Default Re: Any help understanding windbg/sos dump of hung app - 08-11-2006 , 05:52 AM



John Aldrin <Jrax (AT) newsgroups (DOT) nospam> wrote:

Quote:
Wondering if anyone can make better sense of this app dump than I.

Working on app that perioldiclly hangs, with maxed out cpu. The app is
reading data from hearing aids ( 1 or 2) connected via a serial port to an
external device that interfaces w/hearing aid. App is a win forms app
written in C#, Dot Net 1.1.

Using Windbg I determined that the apps main ui thread is using all the cpu.
used adplus to capture app state.

Best I can tell is that our main ui thread is in the garbage collecting
state and it is acting like it is in a infinite loop.
Yes, it looks like you caught the code doing a GC. Thing is, if your own
code has a busy loop hang and its allocating loads of objects in that
busy loop, chances are that when broken into, it'll be performing a GC.

Quote:
Looking at call stack for main ui thread it appears that it had to allocate
more memory and
a garbage collection was started and it never finished.
Are you sure about that - and not that it's just that each time you
break into it, it happens to be performing a GC?

Quote:
0012ed54 0f9787f0 (MethodDesc 0xf7f3bc0 +0x80 System.Data.DataSet.ReadXml),
calling (MethodDesc 0xf7f3b90 System.Data.DataSet.ReadXml)

0012ed88 0f9782c5 (MethodDesc 0xf7fedd8 +0x1d5
Starkey.Core.DataServer.Internal.Request..ctor), calling (MethodDesc
0xf7f3bc0 System.Data.DataSet.ReadXml)
Are you certain that Starkey.Core.DataServer.Internal.Request() (i.e.
the constructor) calls DataSet.ReadXml and never returns?

-- Barry

--
http://barrkel.blogspot.com/


Reply With Quote
  #4  
Old   
John Aldrin
 
Posts: n/a

Default RE: Any help understanding windbg/sos dump of hung app - 08-11-2006 , 11:35 AM





""Jeffrey Tan[MSFT]"" wrote:

Quote:
Hi Jrax,

Based on your post, it seems that your application is experiencing a high
CPU hang. Can you tell me how do you identify that your main GUI thread is
causing the high CPU? Based on the call stack information, it seems that
the main GUI thread is hanging in kernel32!WaitForMultipleObjectsEx, which
should not cost any CPU time. Can you give it recheck?

I verified that the main ui thread was maxing out the cpu using windbg
!runaway 3 cmd.

Following is output showing that thread 0 (main ui thread) is only thread
getting cpu time

0:014> !runaway 3
User Mode Time
Thread Time
0:804 0 days 9:51:35.968
2:d8c 0 days 0:00:00.921
12:9dc 0 days 0:00:00.671
7:bc0 0 days 0:00:00.046
9:990 0 days 0:00:00.031
11:704 0 days 0:00:00.015
10:f70 0 days 0:00:00.015
8:c08 0 days 0:00:00.015
14:e8c 0 days 0:00:00.000
13:308 0 days 0:00:00.000
6:878 0 days 0:00:00.000
5:1f8 0 days 0:00:00.000
4:b28 0 days 0:00:00.000
3:fa0 0 days 0:00:00.000
1:ffc 0 days 0:00:00.000
Kernel Mode Time
Thread Time
0:804 0 days 6:31:42.500
12:9dc 0 days 0:00:06.140
2:d8c 0 days 0:00:00.296
7:bc0 0 days 0:00:00.046
5:1f8 0 days 0:00:00.046
9:990 0 days 0:00:00.031
14:e8c 0 days 0:00:00.000
13:308 0 days 0:00:00.000
11:704 0 days 0:00:00.000
10:f70 0 days 0:00:00.000
8:c08 0 days 0:00:00.000
6:878 0 days 0:00:00.000
4:b28 0 days 0:00:00.000
3:fa0 0 days 0:00:00.000
1:ffc 0 days 0:00:00.000
0:014> g
(2dc.dbc): Break instruction exception - code 80000003 (first chance)
eax=7ffd9000 ebx=00000001 ecx=00000002 edx=00000003 esi=00000004 edi=00000005
eip=7c901230 esp=02b4ffcc ebp=02b4fff4 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:
7c901230 cc int 3
0:014> !runaway 3
User Mode Time
Thread Time
0:804 0 days 9:51:43.000
2:d8c 0 days 0:00:00.921
12:9dc 0 days 0:00:00.671
7:bc0 0 days 0:00:00.046
9:990 0 days 0:00:00.031
11:704 0 days 0:00:00.015
10:f70 0 days 0:00:00.015
8:c08 0 days 0:00:00.015
14:dbc 0 days 0:00:00.000
13:308 0 days 0:00:00.000
6:878 0 days 0:00:00.000
5:1f8 0 days 0:00:00.000
4:b28 0 days 0:00:00.000
3:fa0 0 days 0:00:00.000
1:ffc 0 days 0:00:00.000
Kernel Mode Time
Thread Time
0:804 0 days 6:31:46.781
12:9dc 0 days 0:00:06.140
2:d8c 0 days 0:00:00.296
7:bc0 0 days 0:00:00.046
5:1f8 0 days 0:00:00.046
9:990 0 days 0:00:00.031
14:dbc 0 days 0:00:00.000
13:308 0 days 0:00:00.000
11:704 0 days 0:00:00.000
10:f70 0 days 0:00:00.000
8:c08 0 days 0:00:00.000
6:878 0 days 0:00:00.000
4:b28 0 days 0:00:00.000
3:fa0 0 days 0:00:00.000
1:ffc 0 days 0:00:00.000





Quote:
The simplest way to identify if a thread is costing high CPU time is using
Process Explorer's "Threads" tab in your application's property dialog. You
may monitor "CPU" column in this tabpage, it will tell you if the main GUI
thread is costing CPU now.

Also, it is a good idea to obtain more than 1 dumps from your application
and view the main thread call stack, then you can identify if the main GUI
thread is really hanging in the mscorwks!Thread::SysSuspendForGC for a long
period.

I'm able to recreate the problem - each time I see the same thing. The main
ui thread is not frozen and I can view disassmbly and step thru code.
Following is some of the method names I see.

KERNEL32!_SEH_prolog:
ntdll!RtlActivateActivationContextUnsafeFast:
KERNEL32!BaseFormatTimeOut:
ntdll!ZwWaitForMultipleObjects:
KERNEL32!BaseSetLastNTError:
ntdll!RtlNtStatusToDosError:

sequence of method calls seem to repeat as I continue to step w/debugger.

Method call sequence leads me to believe that some runtime error is occuring
( _SEH and LastNTError method names ). Anyone know of a register/method
combo I can look at to see what error is occurring.

Also, confused that debugger is not breaking if an error is occuring. Could
there some event filter I need to change?

Quote:
Finally, if you require urgent help of analyzing the .Net dump file, I
recommend you try to contact Microsoft PSS, they will help you to look into
the dump file and perform code review.

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



Reply With Quote
  #5  
Old   
John Aldrin
 
Posts: n/a

Default Re: Any help understanding windbg/sos dump of hung app - 08-11-2006 , 11:45 AM





"Barry Kelly" wrote:

Quote:
John Aldrin <Jrax (AT) newsgroups (DOT) nospam> wrote:

Wondering if anyone can make better sense of this app dump than I.

Working on app that perioldiclly hangs, with maxed out cpu. The app is
reading data from hearing aids ( 1 or 2) connected via a serial port to an
external device that interfaces w/hearing aid. App is a win forms app
written in C#, Dot Net 1.1.

Using Windbg I determined that the apps main ui thread is using all the cpu.
used adplus to capture app state.

Best I can tell is that our main ui thread is in the garbage collecting
state and it is acting like it is in a infinite loop.

Yes, it looks like you caught the code doing a GC. Thing is, if your own
code has a busy loop hang and its allocating loads of objects in that
busy loop, chances are that when broken into, it'll be performing a GC.

U are correct. I've written a test app to try to recreate the problem and it
is repeatedly reading data.

Quote:
Looking at call stack for main ui thread it appears that it had to allocate
more memory and
a garbage collection was started and it never finished.

Are you sure about that - and not that it's just that each time you
break into it, it happens to be performing a GC?

I can recreate the problem. I used windbg !runaway 3 to verify that main ui
thread is only thread getting cpu.

I can view disassembly and step thru code, following is some of the methods
I see getting called.

KERNEL32!_SEH_prolog:
ntdll!RtlActivateActivationContextUnsafeFast:
KERNEL32!BaseFormatTimeOut:
ntdll!ZwWaitForMultipleObjects:
KERNEL32!BaseSetLastNTError:
ntdll!RtlNtStatusToDosError:

Above is not a comprehensive list, but as I keep steping the method names
seem to repeat.

Method call sequence leads me to believe that some runtime error is occuring
( _SEH and LastNTError method names ). Anyone know of a register/method
combo I can look at to see what error is occurring.

Also, confused that debugger is not breaking if an error is occuring. Could
there some event filter I need to change?

Quote:
0012ed54 0f9787f0 (MethodDesc 0xf7f3bc0 +0x80 System.Data.DataSet.ReadXml),
calling (MethodDesc 0xf7f3b90 System.Data.DataSet.ReadXml)

0012ed88 0f9782c5 (MethodDesc 0xf7fedd8 +0x1d5
Starkey.Core.DataServer.Internal.Request..ctor), calling (MethodDesc
0xf7f3bc0 System.Data.DataSet.ReadXml)

Are you certain that Starkey.Core.DataServer.Internal.Request() (i.e.
the constructor) calls DataSet.ReadXml and never returns?

I will try to verify.

Quote:
-- Barry

--
http://barrkel.blogspot.com/


Reply With Quote
  #6  
Old   
Loy
 
Posts: n/a

Default Re: Any help understanding windbg/sos dump of hung app - 08-13-2006 , 03:04 AM



A shot in the dark:

We had such experience (infinite loop in the message-loop) and we found
out that we were calling UI calls out of the GUI thread. - since the
app was defined as STA the state was unpredictable

If you have large "% time in GC" (perfmon counter)
--> Check the "# of pinned objects" as it might point to fragmanted
heap

(againg - this is a shot in the dark)

Loy


John Aldrin wrote:
Quote:
"Barry Kelly" wrote:

John Aldrin <Jrax (AT) newsgroups (DOT) nospam> wrote:

Wondering if anyone can make better sense of this app dump than I.

Working on app that perioldiclly hangs, with maxed out cpu. The app is
reading data from hearing aids ( 1 or 2) connected via a serial port to an
external device that interfaces w/hearing aid. App is a win forms app
written in C#, Dot Net 1.1.

Using Windbg I determined that the apps main ui thread is using all the cpu.
used adplus to capture app state.

Best I can tell is that our main ui thread is in the garbage collecting
state and it is acting like it is in a infinite loop.

Yes, it looks like you caught the code doing a GC. Thing is, if your own
code has a busy loop hang and its allocating loads of objects in that
busy loop, chances are that when broken into, it'll be performing a GC.


U are correct. I've written a test app to try to recreate the problem and it
is repeatedly reading data.

Looking at call stack for main ui thread it appears that it had to allocate
more memory and
a garbage collection was started and it never finished.

Are you sure about that - and not that it's just that each time you
break into it, it happens to be performing a GC?


I can recreate the problem. I used windbg !runaway 3 to verify that main ui
thread is only thread getting cpu.

I can view disassembly and step thru code, following is some of the methods
I see getting called.

KERNEL32!_SEH_prolog:
ntdll!RtlActivateActivationContextUnsafeFast:
KERNEL32!BaseFormatTimeOut:
ntdll!ZwWaitForMultipleObjects:
KERNEL32!BaseSetLastNTError:
ntdll!RtlNtStatusToDosError:

Above is not a comprehensive list, but as I keep steping the method names
seem to repeat.

Method call sequence leads me to believe that some runtime error is occuring
( _SEH and LastNTError method names ). Anyone know of a register/method
combo I can look at to see what error is occurring.

Also, confused that debugger is not breaking if an error is occuring. Could
there some event filter I need to change?

0012ed54 0f9787f0 (MethodDesc 0xf7f3bc0 +0x80 System.Data.DataSet.ReadXml),
calling (MethodDesc 0xf7f3b90 System.Data.DataSet.ReadXml)

0012ed88 0f9782c5 (MethodDesc 0xf7fedd8 +0x1d5
Starkey.Core.DataServer.Internal.Request..ctor), calling (MethodDesc
0xf7f3bc0 System.Data.DataSet.ReadXml)

Are you certain that Starkey.Core.DataServer.Internal.Request() (i.e.
the constructor) calls DataSet.ReadXml and never returns?


I will try to verify.

-- Barry

--
http://barrkel.blogspot.com/



Reply With Quote
  #7  
Old   
Jeffrey Tan[MSFT]
 
Posts: n/a

Default RE: Any help understanding windbg/sos dump of hung app - 08-14-2006 , 05:45 AM



Hi Jrax,

Thanks for your feedback!

Yes, by using !runaway and based on the result, I agree with you that 0:804
thread is causing the high CPU hang and I assume 0:804 is the main GUI
thread.

Since you confirmed "each time I see the same thing", I assume you mean
that all the call stacks you obtained are hanging in
Thread::SysSuspendForGC and kernel32!WaitForMultipleObjectsEx.

This looks very strange to me. Since high CPU hang is normally caused by
CPU running at a full speed, which means that the high CPU thread is
executing the code as much as possible. Normally, this is caused when the
thread is trapped in a poorly written loop or the thread has a lot of code
to execute. Since the ntdll!ZwWaitForMultipleObjects will interrupt to
kernel mode, I do not think it will use any user-mode time. Based on my
knowledge, the kernel mode code for ZwWaitForMultipleObjects will just
implement the kernel-mode synchronization primitive also will not cost much
CPU time. So it is really strange that this thread is always costing CPU
time.

I highly recommend you to try to use Process Explorer to view this main GUI
thread in "Threads" tabpage. Once you selected your thread in the ListBox,
the below will display all kinds of thread information dynamically, such as
"Kernel Time", "User Time" the same as !runaway. However, since it will
change these 2 values dynamically, it will be easy to see if your thread is
costing any CPU time lively.

I am not sure the relation of your new posted function list with the
original call stack, I can not find them in your original stack list. Based
on my review, these methods are setting Win32 error in TEB for certain
failing Win32 API call. Win32 API error setting will not throw exception
during execution, so the debugger will not break. It is our code's
responsibility to check the Win32 API return value and error code for
failure.

Finally, since you have a little test application to reproduce this issue,
is it possible for you to provide this little sample project to me? I will
take a look on it. Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


Reply With Quote
  #8  
Old   
Jeffrey Tan[MSFT]
 
Posts: n/a

Default RE: Any help understanding windbg/sos dump of hung app - 08-16-2006 , 02:29 AM



Hi Jrax,

Have you reviewed my last reply? Does it make sense to you? Please feel
free to feedback, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.