%3CLINGO-SUB%20id%3D%22lingo-sub-1685245%22%20slang%3D%22en-US%22%3EAlternative%20Tools%20for%20Application%20Hangs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1685245%22%20slang%3D%22en-US%22%3E%3CP%3EMy%20name%20is%20Susan%20Buchanan%20and%20today%20I%E2%80%99d%20like%20to%20discuss%20some%20basic%20troubleshooting%20for%20applications%20hangs%20using%20%3CSTRONG%3ETask%20Manager%2C%20Resource%20Monitor%2C%3C%2FSTRONG%3E%20and%20%3CSTRONG%3EWaitingOn%3C%2FSTRONG%3E%20outside%20of%20getting%20an%20application%20dump.%26nbsp%3B%20A%20special%20shout%20out%20to%20Leo%20Fagundes%20for%20writing%20the%20WaitingOn%20application.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3ETroubleshooting%20application%20hangs%20is%20key%20to%20resolution.%20Getting%20an%20application%20dump%20will%20not%20always%20be%20a%20smoking%20gun%20and%20should%20be%20used%20as%20a%20last%20resort%20for%20various%20reasons%20as%20missing%20symbols%20for%203%3CSUP%3Erd%3C%2FSUP%3E%20party%20applications%20or%20waiting%20on%20other%20processes.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ETask%20Manager%20%26amp%3B%20Resource%20Monitor%20%E2%80%93%20Analyze%20Wait%20Chain%3A%3C%2FSTRONG%3E%20Beginning%20with%20Windows%208%2C%20in%202014%20we%20added%20new%20options%20into%20Task%20Manager%20as%20well%20as%20Resource%20Monitor%20was%20the%20%E2%80%9CAnalyze%20Wait%20Chain%E2%80%9D%20option%20when%20you%20right-click%20on%20a%20task%20in%20the%20Details%20view.%20This%20allows%20you%20to%20see%20what%20processes%20are%20waiting%20for%20a%20resource%20that%20is%20being%20used%20by%20another%20process.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EWhat%20this%20means%20is%20that%20if%20you%20have%20an%20application%20hanging%20for%20some%20reason%2C%20you%20can%20analyze%20the%20wait%20chain%20to%20see%20whether%20it%20is%20waiting%20on%20something%20that%20is%20in%20use.%3C%2FLI%3E%0A%3CLI%3EAdditional%20Information%20on%20how%20to%20prevent%20hangs%20in%20windows%20applications%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Fwin7appqual%2Fpreventing-hangs-in-windows-applications%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Fwin7appqual%2Fpreventing-hangs-in-windows-applications%3C%2FA%3E%20and%20a%20Blog%20which%20talks%20about%20the%20%E2%80%9Canalyze%20wait%20chain%E2%80%9D%20feature%3A%20%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fblogs.technet.microsoft.com%2Ftip_of_the_day%2F2014%2F03%2F01%2Ftip-of-the-day-wait-chain-analyzer%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fblogs.technet.microsoft.com%2Ftip_of_the_day%2F2014%2F03%2F01%2Ftip-of-the-day-wait-chain-analyzer%2F%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1232234482%22%20id%3D%22toc-hId-1232234544%22%3E%3CSTRONG%3EWaitingOn.exe%3C%2FSTRONG%3E%20a%20simple%20tool%20that%20helps%20troubleshoot%20hung%20applications%20and%20services.%26nbsp%3B%3C%2FH3%3E%0A%3CP%3EWaitingOn.exe%20is%20available%20at%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fleonardomsft%2FWaitingOn%2Freleases%2Fdownload%2Fv1.1%2FWaitingOn.exe%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fleonardomsft%2FWaitingOn%2Freleases%2Fdownload%2Fv1.1%2FWaitingOn.exe%3C%2FA%3E%2C%20and%20besides%20functional%2C%20it%E2%80%99s%20still%20experimental.%20Use%20it%20with%20caution.%20If%20you%20install%20it%20on%20a%20customer%E2%80%99s%20machine%2C%20please%20remove%20it%20at%20the%20end%20of%20the%20troubleshooting%20session.%3C%2FP%3E%0A%3CP%3EWaitingOn.exe%20displays%20all%20the%20blocked%20threads%20from%20a%20process%20and%20what%20they%20are%20Waiting%20On.%20It%20can%20also%20display%20all%20blocked%20threads%20for%20all%20processes%20in%20the%20system.%3C%2FP%3E%0A%3CP%3EWaitingOn.exe%20leverages%20the%20Wait%20Chain%20Traversal%20(WCT)%20API%20introduced%20in%20Windows%202008%2FVista.%20The%20WCT%20API%20is%20the%20one%20behind%20the%20%22Analyze%20Wait%20Chain%22%20functionality%20in%20Task%20Manager%20and%20Resource%20Monitor.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--575219981%22%20id%3D%22toc-hId--575219919%22%3E%3CSTRONG%3ETask%20Manager%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3EOne%20of%20the%20new%20options%20added%20into%20Task%20Manager%20in%20recent%20versions%20was%20the%20%E2%80%9CAnalyze%20Wait%20Chain%E2%80%9D%20option%20when%20you%20right-click%20on%20a%20task%20in%20the%20Details%20view.%20This%20allows%20you%20to%20see%20what%20processes%20are%20waiting%20for%20a%20resource%20that%20is%20being%20used%20by%20another%20process.%3C%2FP%3E%0A%3CP%3EWhat%20this%20means%20is%20that%20if%20you%20have%20an%20application%20hanging%20for%20some%20reason%2C%20you%20can%20analyze%20the%20wait%20chain%20to%20see%20whether%20it%20is%20waiting%20on%20something%20that%20is%20in%20use.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TeedaN_0-1600442457986.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F219568iD73D3F65AB41DC1B%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22TeedaN_0-1600442457986.png%22%20alt%3D%22TeedaN_0-1600442457986.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20instance%2C%20we%20printed%20from%20Word%2C%20and%20then%20used%20this%20option%20while%20the%20print%20process%20was%20happening%20to%20see%20what%20would%20happen.%20In%20this%20case%2C%20Word%20was%20waiting%20for%20splwow64.exe%2C%20which%20handles%20printing%20from%2032-bit%20applications.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TeedaN_1-1600442457996.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F219570i9A7B47CE509D4D97%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22TeedaN_1-1600442457996.png%22%20alt%3D%22TeedaN_1-1600442457996.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%E2%80%99s%20worth%20noting%20that%20because%20Word%20is%20written%20properly%2C%20the%20GUI%20interface%20doesn%E2%80%99t%20actually%20hang%20while%20it%20is%20waiting%20for%20the%20other%20process.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20case%20the%20process%20is%20working%20correctly%20and%20is%20not%20hung.%3C%2FP%3E%0A%3CP%3EFor%203%3CSUP%3Erd%3C%2FSUP%3E%20party%20applications%2C%20it%20may%20show%20you%20other%20processes%20it%20is%20waiting%20on.%26nbsp%3B%20If%20the%20selected%20process%20is%20waiting%20for%20another%20process%2C%20a%20tree%20organized%20by%20dependency%20on%20other%20processes%20will%20be%20displayed.%20(See%20screenshot%20above).%3CBR%20%2F%3E%3CSTRONG%3ENOTE%3A%3C%2FSTRONG%3E%20%3CEM%3EMany%20system%20processes%20depend%20on%20other%20processes%20and%20services%20for%20normal%20operation.%20Both%20Task%20Manager%20and%20Resource%20Monitor%20will%20display%20%3C%2FEM%3E%3CA%20href%3D%22https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fms681622(VS.85).aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSTRONG%3E%3CEM%3Ewait%20chain%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FA%3E%3CEM%3E%20information%20for%20any%20process.%20%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3E%3CU%3EIn%20a%20second%20scenario%20BadApp.exe%20is%20not%20responding%3C%2FU%3E%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TeedaN_2-1600442458006.png%22%20style%3D%22width%3A%20583px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F219569iC80AA2B3C99DB5BA%2Fimage-dimensions%2F583x107%3Fv%3D1.0%22%20width%3D%22583%22%20height%3D%22107%22%20title%3D%22TeedaN_2-1600442458006.png%22%20alt%3D%22TeedaN_2-1600442458006.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20attempt%20to%20Analyze%20Wait%20Chain%20from%20within%20Task%20Manager%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TeedaN_3-1600442458009.png%22%20style%3D%22width%3A%20288px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F219571i8A9572AA9A7757A2%2Fimage-dimensions%2F288x425%3Fv%3D1.0%22%20width%3D%22288%22%20height%3D%22425%22%20title%3D%22TeedaN_3-1600442458009.png%22%20alt%3D%22TeedaN_3-1600442458009.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20the%20application%20is%20not%20waiting%20on%20anything%2C%20it%20will%20be%20empty%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TeedaN_4-1600442458018.png%22%20style%3D%22width%3A%20482px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F219572i5A8B1F5D86EEAAFE%2Fimage-dimensions%2F482x335%3Fv%3D1.0%22%20width%3D%22482%22%20height%3D%22335%22%20title%3D%22TeedaN_4-1600442458018.png%22%20alt%3D%22TeedaN_4-1600442458018.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20the%20application%20is%20waiting%20on%20something%2C%20it%20will%20show%20the%20process%20it%20is%20waiting%20for%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TeedaN_5-1600442458027.jpeg%22%20style%3D%22width%3A%20479px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F219573i046675FC8E34B49C%2Fimage-dimensions%2F479x371%3Fv%3D1.0%22%20width%3D%22479%22%20height%3D%22371%22%20title%3D%22TeedaN_5-1600442458027.jpeg%22%20alt%3D%22TeedaN_5-1600442458027.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E(In%20this%20example%20you%20can%20see%20that%20Perfmon%20is%20waiting%20on%20a%20svchost).%20We%20will%20dig%20deeper%20into%20this%20in%20a%20few%20moments.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1912292852%22%20id%3D%22toc-hId-1912292914%22%3E%3CSTRONG%3EResource%20Monitor%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3E%3CU%3EUse%20case%20example%3A%20Badapp%3C%2FU%3E%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EStart%20Resource%20Monitor%20by%20either%20typing%20ResMon%20from%20the%20search%20box%20or%20starting%20the%20Resource%20Monitor%20icon%20from%20the%20Start%20Menu.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TeedaN_6-1600442458029.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F219574i2375F5E0C4925D91%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22TeedaN_6-1600442458029.png%22%20alt%3D%22TeedaN_6-1600442458029.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20Resource%20Monitor%20we%20see%20badapp.exe%20is%20not%20responding.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TeedaN_7-1600442458047.png%22%20style%3D%22width%3A%20593px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F219576i289879DA1D009960%2Fimage-dimensions%2F593x242%3Fv%3D1.0%22%20width%3D%22593%22%20height%3D%22242%22%20title%3D%22TeedaN_7-1600442458047.png%22%20alt%3D%22TeedaN_7-1600442458047.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3EIf%20a%20process%20entry%20in%20the%20table%20is%20not%20%3CSTRONG%3Ered%3C%2FSTRONG%3E%2C%20if%20the%20process%20status%20is%20%3CSTRONG%3ERunning%3C%2FSTRONG%3E%2C%20and%20if%20the%20program%20is%20operating%20normally%2C%20then%20no%20action%20should%20be%20required%20by%20you%3C%2FEM%3E.%3CBR%20%2F%3E%3CEM%3EIf%20a%20process%20entry%20in%20the%20table%20is%20%3CSTRONG%3Ered%3C%2FSTRONG%3E%2C%20if%20the%20process%20status%20is%20%3CSTRONG%3Enot%20running%3C%2FSTRONG%3E%2C%20and%20if%20the%20program%20is%26nbsp%3B%20not%20operating%20normally%2C%20then%20you%20can%20try%20killing%20the%20process%20it%20is%20waiting%20on%20starting%20with%20the%20child%20processes%20in%20red%20first%2C%20then%20moving%20to%20the%20parent%20processes.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FEM%3EYou%20can%20start%20a%20%E2%80%9Cwait%20chain%20analysis%E2%80%9D%20from%20Resource%20Monitor%20as%20well%2C%20simply%20do%20a%20right%20click%20on%20the%20process%20you%20want%20to%20investigate.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CU%3E%3CSTRONG%3EUsing%20WaitingOn.exe%20%26amp%3B%20it%E2%80%99s%20Advantages%3C%2FSTRONG%3E%3C%2FU%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EWaitingOn.exe%3C%2FSTRONG%3E%20has%20the%20following%20advantages%20over%20Task%20Manager%20and%20Resource%20Monitor%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EIt%20displays%20what%20type%20of%20object%20is%20blocking%20the%20thread.%3C%2FLI%3E%0A%3CLI%3EIt%20displays%20the%20name%20of%20the%20object%20blocking%20the%20thread.%3C%2FLI%3E%0A%3CLI%3EIt%20can%20be%20scripted.%3C%2FLI%3E%0A%3CLI%3EIt%20can%20be%20run%20against%20a%20computer%20that%20you%20can't%20logon%20(by%20using%20PsExec%20or%20Remote%20Powershell).%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EWaitingOn.exe%20was%20built%20on%20top%20of%20the%20sample%20WCF%20code%20available%20in%20the%20MSDN%20documentation.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3E%3CU%3EUse%20case%20example%3A%20Badapp%3C%2FU%3E%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TeedaN_8-1600442458053.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F219575i60EFA5BD25764827%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22TeedaN_8-1600442458053.png%22%20alt%3D%22TeedaN_8-1600442458053.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAs%20seen%20earlier%2C%20this%20process%20is%20the%20parent%20process%20that%20is%20hung%20and%20is%20not%20waiting%20on%20any%20other%20processes%20thread.%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3E%3CU%3E%3CBR%20%2F%3EUse%20case%20example%20%3A%20Perfmon%3C%2FU%3E%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EIn%20this%20example%2C%20we%20had%20a%20hung%20perfmon.exe%20window%20that%20was%20not%20responding%20to%20mouse%20clicks.%20Attempting%20to%20run%20the%20Analyze%20Wait%20Chain%20command%20from%20Task%20Manager%20produced%20the%20following%20results%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TeedaN_9-1600442458070.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F219579iBC1ACC71BC43C1B0%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22TeedaN_9-1600442458070.jpeg%22%20alt%3D%22TeedaN_9-1600442458070.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20can%20see%20that%20perfmon.exe%20(PID%203292)%20is%20waiting%20on%20an%20svchost%20process%20(PID%201564)%2C%20but%20since%20it%20hosts%20many%20services%2C%20there%20is%20not%20much%20we%20can%20do.%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CBACKGROUND%20information%3D%22%22%3E%3CBR%20%2F%3E%3C%2FBACKGROUND%3E%3C%2FSTRONG%3EIf%20you%20encounter%20a%20service%20host%20with%20multiple%20services%2C%20always%20consider%20isolating%20the%20services.%20In%20Windows%2010%20%2F%20WS%202016%20we%20have%20introduced%20the%20change%20by%20default%20(if%20you%20have%20more%20than%204%20GB%20RAM).%20To%20isolate%20a%20service%2C%20we%20use%20the%20sc.exe%20command%20line%20tool%3A%20%3CBR%20%2F%3Esc%20config%20%3CSERVICENAME%3E%20type%3D%20own%20%3CBR%20%2F%3E%3CEM%3EImportant%3A%20there%20is%20a%20space%20between%20type%3D%20and%20own%20which%20is%20required!%3CBR%20%2F%3E%3C%2FEM%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fde-de%2Fwindows-server%2Fadministration%2Fwindows-commands%2Fsc-config%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fde-de%2Fwindows-server%2Fadministration%2Fwindows-commands%2Fsc-config%3C%2FA%3E%20%3CBR%20%2F%3E%3CSTRONG%3E%3C%2FSTRONG%3E%3C%2FSERVICENAME%3E%3C%2FP%3E%0A%3CP%3ENow%2C%20running%20WaitingOn.exe%20against%20the%20hung%20perfmon.exe%20revealed%20that%20Thread%207352%20was%20blocked%20by%20an%20Alpc%20called%20%E2%80%9C%5CRPC%20Control%5CDNSResolver%E2%80%9D%2C%20which%20was%20found%20in%20the%20svchost.exe%20handle%20list%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TeedaN_10-1600442458072.jpeg%22%20style%3D%22width%3A%20738px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F219577i5D5964C51D19FEBD%2Fimage-dimensions%2F738x94%3Fv%3D1.0%22%20width%3D%22738%22%20height%3D%2294%22%20title%3D%22TeedaN_10-1600442458072.jpeg%22%20alt%3D%22TeedaN_10-1600442458072.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20then%20can%20use%20Process%20Explorer%20to%20further%20investigate%20or%20kill%20that%20object%20(which%20might%20result%20in%20unexpected%20behavior!)%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TeedaN_11-1600442458081.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F219578i904B24E44B83C187%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22TeedaN_11-1600442458081.jpeg%22%20alt%3D%22TeedaN_11-1600442458081.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20case%20we%20decided%20to%20simply%20restart%20the%20associated%20service%20(DNS%20Cache%20service)%20which%20unfroze%20the%20perfmon.exe%20window.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EAdditional%20information%3A%20%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ELinks%20within%20this%20article%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAdditional%20Information%20on%20how%20to%20prevent%20hangs%20in%20windows%20applications%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Fwin7appqual%2Fpreventing-hangs-in-windows-applications%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Fwin7appqual%2Fpreventing-hangs-in-windows-applications%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3Eand%20a%20Blog%20which%20talks%20about%20the%20%E2%80%9Canalyze%20wait%20chain%E2%80%9D%20feature%3A%20%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fblogs.technet.microsoft.com%2Ftip_of_the_day%2F2014%2F03%2F01%2Ftip-of-the-day-wait-chain-analyzer%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fblogs.technet.microsoft.com%2Ftip_of_the_day%2F2014%2F03%2F01%2Ftip-of-the-day-wait-chain-analyzer%2F%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EWaitingOn.exe%20at%20github%3A%20%3CA%20style%3D%22font-family%3A%20inherit%3B%20background-color%3A%20%23ffffff%3B%22%20href%3D%22https%3A%2F%2Fgithub.com%2Fleonardomsft%2FWaitingOn%2Freleases%2Fdownload%2Fv1.1%2FWaitingOn.exe%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fleonardomsft%2FWaitingOn%2Freleases%2Fdownload%2Fv1.1%2FWaitingOn.exe%3C%2FA%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3E%2C%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3EWait%20Chain%20Traversal%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fde-de%2Fwindows%2Fwin32%2Fdebug%2Fwait-chain-traversal%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fde-de%2Fwindows%2Fwin32%2Fdebug%2Fwait-chain-traversal%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3Esc%20command%20line%20options%3A%20%3CBR%20%2F%3E%3CA%20style%3D%22font-family%3A%20inherit%3B%20background-color%3A%20%23ffffff%3B%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fde-de%2Fwindows-server%2Fadministration%2Fwindows-commands%2Fsc-config%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fde-de%2Fwindows-server%2Fadministration%2Fwindows-commands%2Fsc-config%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1685245%22%20slang%3D%22en-US%22%3E%3CP%3ETools%20to%20determine%20the%20cause%20of%20an%20application%20hang%20before%20you%20consider%20getting%20a%20dump%2Fprocdump%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Microsoft

My name is Susan Buchanan and today I’d like to discuss some basic troubleshooting for applications hangs using Task Manager, Resource Monitor, and WaitingOn outside of getting an application dump.  A special shout out to Leo Fagundes for writing the WaitingOn application.


Troubleshooting application hangs is key to resolution. Getting an application dump will not always be a smoking gun and should be used as a last resort for various reasons as missing symbols for 3rd party applications or waiting on other processes.

 

Task Manager & Resource Monitor – Analyze Wait Chain: Beginning with Windows 8, in 2014 we added new options into Task Manager as well as Resource Monitor was the “Analyze Wait Chain” option when you right-click on a task in the Details view. This allows you to see what processes are waiting for a resource that is being used by another process.

 

WaitingOn.exe a simple tool that helps troubleshoot hung applications and services. 

WaitingOn.exe is available at https://github.com/leonardomsft/WaitingOn/releases/download/v1.1/WaitingOn.exe, and besides functional, it’s still experimental. Use it with caution. If you install it on a customer’s machine, please remove it at the end of the troubleshooting session.

WaitingOn.exe displays all the blocked threads from a process and what they are Waiting On. It can also display all blocked threads for all processes in the system.

WaitingOn.exe leverages the Wait Chain Traversal (WCT) API introduced in Windows 2008/Vista. The WCT API is the one behind the "Analyze Wait Chain" functionality in Task Manager and Resource Monitor.

 

Task Manager

One of the new options added into Task Manager in recent versions was the “Analyze Wait Chain” option when you right-click on a task in the Details view. This allows you to see what processes are waiting for a resource that is being used by another process.

What this means is that if you have an application hanging for some reason, you can analyze the wait chain to see whether it is waiting on something that is in use.

TeedaN_0-1600442457986.png

 

For instance, we printed from Word, and then used this option while the print process was happening to see what would happen. In this case, Word was waiting for splwow64.exe, which handles printing from 32-bit applications.

TeedaN_1-1600442457996.png

 

It’s worth noting that because Word is written properly, the GUI interface doesn’t actually hang while it is waiting for the other process. 

In this case the process is working correctly and is not hung.

For 3rd party applications, it may show you other processes it is waiting on.  If the selected process is waiting for another process, a tree organized by dependency on other processes will be displayed. (See screenshot above).
NOTE: Many system processes depend on other processes and services for normal operation. Both Task Manager and Resource Monitor will display wait chain information for any process.

 

In a second scenario BadApp.exe is not responding

TeedaN_2-1600442458006.png

 

 

We attempt to Analyze Wait Chain from within Task Manager

TeedaN_3-1600442458009.png

 

If the application is not waiting on anything, it will be empty:

TeedaN_4-1600442458018.png

 

If the application is waiting on something, it will show the process it is waiting for:

TeedaN_5-1600442458027.jpeg

(In this example you can see that Perfmon is waiting on a svchost). We will dig deeper into this in a few moments.

 

Resource Monitor

Use case example: Badapp

Start Resource Monitor by either typing ResMon from the search box or starting the Resource Monitor icon from the Start Menu.

TeedaN_6-1600442458029.png

 

In Resource Monitor we see badapp.exe is not responding.

TeedaN_7-1600442458047.png

 

If a process entry in the table is not red, if the process status is Running, and if the program is operating normally, then no action should be required by you.
If a process entry in the table is red, if the process status is not running, and if the program is  not operating normally, then you can try killing the process it is waiting on starting with the child processes in red first, then moving to the parent processes.

You can start a “wait chain analysis” from Resource Monitor as well, simply do a right click on the process you want to investigate.

 

Using WaitingOn.exe & it’s Advantages

WaitingOn.exe has the following advantages over Task Manager and Resource Monitor:

  1. It displays what type of object is blocking the thread.
  2. It displays the name of the object blocking the thread.
  3. It can be scripted.
  4. It can be run against a computer that you can't logon (by using PsExec or Remote Powershell).

WaitingOn.exe was built on top of the sample WCF code available in the MSDN documentation.

 

Use case example: Badapp

TeedaN_8-1600442458053.png

As seen earlier, this process is the parent process that is hung and is not waiting on any other processes thread.


Use case example : Perfmon

In this example, we had a hung perfmon.exe window that was not responding to mouse clicks. Attempting to run the Analyze Wait Chain command from Task Manager produced the following results:

TeedaN_9-1600442458070.jpeg

 

We can see that perfmon.exe (PID 3292) is waiting on an svchost process (PID 1564), but since it hosts many services, there is not much we can do.

<background information>
If you encounter a service host with multiple services, always consider isolating the services. In Windows 10 / WS 2016 we have introduced the change by default (if you have more than 4 GB RAM). To isolate a service, we use the sc.exe command line tool:
sc config <servicename> type= own
Important: there is a space between type= and own which is required!
https://docs.microsoft.com/de-de/windows-server/administration/windows-commands/sc-config
</background information>

Now, running WaitingOn.exe against the hung perfmon.exe revealed that Thread 7352 was blocked by an Alpc called “\RPC Control\DNSResolver”, which was found in the svchost.exe handle list:

TeedaN_10-1600442458072.jpeg

 

We then can use Process Explorer to further investigate or kill that object (which might result in unexpected behavior!)

TeedaN_11-1600442458081.jpeg

 

In this case we decided to simply restart the associated service (DNS Cache service) which unfroze the perfmon.exe window.

 

Additional information:

Links within this article: