Home
%3CLINGO-SUB%20id%3D%22lingo-sub-723924%22%20slang%3D%22en-US%22%3EThe%20Case%20of%20the%20Random%20IE%20Crash%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-723924%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3E%20First%20published%20on%20TechNet%20on%20Jun%2001%2C%202010%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3EWhile%20I%20long%20for%20the%20day%20when%20I%20no%20longer%20experience%20the%20effects%20of%20buggy%20software%2C%20there%E2%80%99s%20something%20rewarding%20about%20solving%20my%20own%20troubleshooting%20cases.%20In%20the%20process%2C%20I%20often%20come%20up%20with%20new%20techniques%20to%20add%20to%20my%20bag%20of%20tricks%20and%20to%20share%20with%20you%20in%20my%20%E2%80%9C%20%3CSTRONG%3E%20Case%20of%20the%20Unexplained%E2%80%A6%E2%80%9D%20%3C%2FSTRONG%3E%20presentations%20and%20blog%20posts.%20The%20other%20day%20I%20successfully%20closed%20an%20especially%20interesting%20case%20that%20opened%20when%20Internet%20Explorer%20(IE)%20crashed%20as%20I%20was%20reading%20a%20web%20page%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22180%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fcfs-file.ashx%2F__key%2FCommunityServer-Blogs-Components-WeblogFiles%2F00-00-00-52-36-metablogapi%2F5824.image_5F00_thumb.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121226iFD4EB653831639BA%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22355%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EWhenever%20I%20experience%20a%20crash%2C%20whether%20it%E2%80%99s%20the%20system%20or%20an%20application%2C%20I%20always%20take%20a%20look%20at%20it.%20There%E2%80%99s%20no%20guarantee%2C%20but%20many%20times%20after%20spending%20just%20a%20few%20minutes%20I%20find%20clues%20that%20point%20at%20an%20add-on%20as%20the%20cause%20and%20ultimately%20a%20fix%20or%20workaround.%20In%20most%20cases%20when%20it%E2%80%99s%20an%20application%20crash%2C%20the%20faulty%20process%20is%20obvious%20and%20I%20simply%20launch%20Windbg%20(from%20the%20free%20Debugging%20Tools%20for%20Windows%20package%20that%20comes%20with%20the%20Windows%20SDK%20and%20Windows%20DDK)%2C%20attach%20it%20to%20the%20process%2C%20and%20start%20investigating.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ESometimes%20however%2C%20the%20faulting%20process%20isn%E2%80%99t%20obvious%2C%20like%20was%20the%20case%20when%20I%20saw%20the%20IE%20crash%20dialog.%20That%E2%80%99s%20because%20I%20was%20running%20IE8%2C%20which%20has%20a%20multi-process%20model%20where%20different%20tabs%20are%20hosted%20in%20different%20processes%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22105%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fcfs-file.ashx%2F__key%2FCommunityServer-Blogs-Components-WeblogFiles%2F00-00-00-52-36-metablogapi%2F2275.image_5F00_thumb_5F00_2.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121227iA935C25F25ED4B94%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22183%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20had%20multiple%20tabs%20open%20as%20usual%2C%20so%20I%20had%20to%20figure%20out%20which%20IE%20process%20of%20the%20four%20that%20were%20running%20(in%20addition%20to%20the%20parent%20broker%20instance)%20was%20the%20one%20that%20had%20crashed.%20I%20could%20have%20taken%20the%20brute-force%20approach%20of%20attaching%20to%20each%20process%20in%20turn%20and%20searching%20for%20the%20faulting%20thread%2C%20but%20there%E2%80%99s%20fortunately%20a%20simpler%20and%20more%20direct%20way%20to%20identify%20the%20target%20process.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EWhen%20a%20process%20crashes%2C%20the%20Windows%20Error%20Reporting%20(WER)%20service%20launches%20its%20own%20process%2C%20called%20WerFault%2C%20in%20the%20session%20of%20the%20crashed%20process%20to%20display%20the%20error%20dialog%20to%20the%20user%20running%20the%20session%20and%20to%20generate%20a%20crash%20dump%20file.%20So%20that%20WerFault%20knows%20which%20process%20is%20the%20one%20that%20crashed%2C%20the%20WER%20service%20passes%20the%20process%20ID%20(PID)%20of%20the%20target%20on%20WerFault%E2%80%99s%20command%20line.%20You%20can%20easily%20view%20the%20command%20line%20with%20Process%20Explorer.%20Because%20I%20always%20have%20Process%20Explorer%20running%20with%20its%20icon%20visible%20in%20the%20tray%20area%20of%20the%20taskbar%2C%20I%20clicked%20on%20the%20icon%20to%20open%20it%20and%20found%20the%20WER%20process%20in%20the%20process%20tree%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%2281%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fcfs-file.ashx%2F__key%2FCommunityServer-Blogs-Components-WeblogFiles%2F00-00-00-52-36-metablogapi%2F0624.image_5F00_thumb_5F00_1.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121228iEB6918C8C0EFA31D%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22504%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20double-clicked%20on%20it%20to%20open%20the%20process%20properties%20dialog%20and%20the%20command%20line%20revealed%20the%20process%20ID%20of%20the%20problematic%20IE%20process%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22250%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fcfs-file.ashx%2F__key%2FCommunityServer-Blogs-Components-WeblogFiles%2F00-00-00-52-36-metablogapi%2F4331.image_5F00_thumb_5F00_4.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121229iFC0137757EE70923%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22404%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ENow%20that%20I%20knew%20it%20was%20process%204440%20in%20which%20I%20was%20interested%2C%20I%20started%20Windbg%2C%20pressed%20F6%20to%20open%20the%20process%20selection%20dialog%2C%20and%20double-clicked%20on%20Iexplore.exe%20process%204440.%20With%20Windbg%20attached%2C%20my%20next%20step%20was%20to%20locate%20the%20thread%20that%20had%20faulted%20so%20that%20I%20could%20examine%20its%20stack%20for%20signs%20of%20a%20buggy%20add-on.%20In%20some%20cases%2C%20relying%20on%20Windbg%E2%80%99s%20built-in%20crash%20analysis%20heuristics%2C%20which%20you%20can%20trigger%20with%20the%20%3CEM%3E%20!analyze%20%3C%2FEM%3E%20command%2C%20will%20do%20the%20job%20for%20you%2C%20but%20it%20didn%E2%80%99t%20this%20time.%20Finding%20the%20faulting%20thread%20is%20fairly%20straightforward%2C%20though.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EFirst%2C%20go%20to%20Windbg%E2%80%99s%20View%20menu%20and%20open%20both%20the%20Processes%20and%20Threads%20and%20the%20Call%20Stack%20dialogs%2C%20arranging%20them%20side%20by%20side.%20The%20goal%20is%20to%20find%20the%20thread%20that%20has%20functions%20with%20the%20words%20%3CEM%3E%20fault%20%3C%2FEM%3E%20%2C%20%3CEM%3E%20exception%20%3C%2FEM%3E%20%2C%20or%20%3CEM%3E%20unhandled%20%3C%2FEM%3E%20in%20their%20names.%20You%20can%20quickly%20do%20this%20by%20selecting%20each%20thread%20in%20the%20Processes%20and%20Threads%20window%2C%20pressing%20Enter%2C%20and%20then%20scanning%20the%20stack%20that%20appears%20in%20the%20Call%20Stack%20window.%20After%20doing%20this%20for%20the%20first%20few%20threads%2C%20I%20came%20across%20the%20thread%20I%20was%20looking%20for%2C%20revealed%20by%20functions%20all%20over%20its%20stack%20containing%20the%20telltale%20strings%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22284%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fcfs-file.ashx%2F__key%2FCommunityServer-Blogs-Components-WeblogFiles%2F00-00-00-52-36-metablogapi%2F2703.image_5F00_thumb_5F00_7.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121230i6B6E88E4D783BBB9%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22554%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EUnfortunately%2C%20I%20was%20at%20an%20apparent%20dead%20end%20as%20far%20as%20fingering%20an%20add-on%3A%20all%20the%20DLLs%20shown%20in%20the%20call%20stack%20were%20Microsoft%E2%80%99s.%20There%20was%20one%20indicator%20that%20there%20might%20be%20an%20add-on%20hidden%20from%20view%20though%2C%20and%20that%20was%20the%20text%20reporting%20that%20Windbg%20couldn%E2%80%99t%20find%20symbols%20for%20at%20least%20some%20of%20the%20stack%E2%80%99s%20frames%2C%20so%20was%20forced%20to%20make%20guesses%20about%20the%20stack%E2%80%99s%20layout%20and%20was%20showing%20an%20address%20that%20didn%E2%80%99t%20lie%20within%20any%20DLL%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%2283%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fcfs-file.ashx%2F__key%2FCommunityServer-Blogs-Components-WeblogFiles%2F00-00-00-52-36-metablogapi%2F2781.image_5F00_thumb_5F00_3.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121231iE1F26EE92EF2ADCA%22%20style%3D%22border-bottom%3A%200px%3B%20border-left%3A%200px%3B%20display%3A%20inline%3B%20border-top%3A%200px%3B%20border-right%3A%200px%22%20title%3D%22image%22%20width%3D%22454%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThis%20happens%20when%20a%20DLL%20uses%20%3CEM%3E%20frame%20pointer%20omitted%20%3C%2FEM%3E%20(FPO)%20calling%20conventions%2C%20which%20in%20the%20absence%20of%20symbolic%20information%20for%20the%20DLL%20prevents%20the%20debugger%20from%20finding%20stack%20frames%20just%20by%20following%20the%20frame-pointer%20chain.%20The%20return%20addresses%20for%20the%20functions%20the%20thread%20invoked%20must%20be%20on%20the%20stack%20(unless%20they%20were%20overwritten%20by%20the%20bug%20that%20caused%20the%20crash)%2C%20but%20Windbg%E2%80%99s%20heuristics%20couldn%E2%80%99t%20locate%20them.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThere%E2%80%99s%20a%20Windbg%20command%20that%20you%20can%20use%20in%20these%20cases%20to%20hunt%20for%20the%20missing%20frame%20function%20addresses%2C%20the%20Display%20Words%20and%20Symbols%20command.%20If%20you%E2%80%99re%20debugging%20a%2032-bit%20process%2C%20use%20the%20%3CEM%3E%20dds%20%3C%2FEM%3E%20version%20of%20the%20command%20and%20if%20it%E2%80%99s%20a%2064-bit%20process%20use%20%3CEM%3E%20dqs%20%3C%2FEM%3E%20.%20You%20can%20also%20use%20%3CEM%3E%20dps%20%3C%2FEM%3E%20(Display%20Pointer%20Symbols)%2C%20which%20will%20interpret%20the%20function%20addresses%20as%20the%20appropriate%20size%20for%20a%2032-bit%20or%2064-bit%20process.%20The%20address%20to%20give%20to%20the%20command%20as%20the%20starting%20point%20should%20be%20the%20address%20of%20the%20stack%20frame%20immediately%20above%20the%20one%20where%20Windbg%20got%20lost.%20To%20see%20the%20address%2C%20click%20on%20the%20Addrs%20button%20in%26nbsp%3Bthe%20call%20stack%20dialog%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22105%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fcfs-file.ashx%2F__key%2FCommunityServer-Blogs-Components-WeblogFiles%2F00-00-00-52-36-metablogapi%2F3683.image_5F00_thumb_5F00_11.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121232iA8F47F5180064C0C%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22304%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThe%20address%20on%20the%20frame%20in%20question%20was%202cbc5c8%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%2264%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fcfs-file.ashx%2F__key%2FCommunityServer-Blogs-Components-WeblogFiles%2F00-00-00-52-36-metablogapi%2F4341.image_5F00_thumb_5F00_13.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121233i447DB7A4DC10F9F7%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22354%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20passed%20it%20to%20dds%20as%20the%20argument%20and%20pressed%20enter%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22104%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fcfs-file.ashx%2F__key%2FCommunityServer-Blogs-Components-WeblogFiles%2F00-00-00-52-36-metablogapi%2F2781.image_5F00_thumb_5F00_17.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121234i478BE0A52991AE84%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22404%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThe%20first%20page%20of%20results%20didn%E2%80%99t%20list%20any%20functions%20besides%20the%20expected%20one%2C%20KiUserException.%20I%20hit%20the%20enter%20key%20again%20without%20typing%20another%20command%2C%20because%20for%20address-based%20commands%20like%20dds%2C%20that%20tells%20Windbg%20to%20repeat%20the%20last%20the%20last%20command%20at%20the%20address%20where%20it%20left%20off.%20The%20second%20page%20of%20results%20yielded%20something%20more%20interesting%2C%20the%20name%20of%20a%20DLL%20I%20wasn%E2%80%99t%20familiar%20with%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22134%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fcfs-file.ashx%2F__key%2FCommunityServer-Blogs-Components-WeblogFiles%2F00-00-00-52-36-metablogapi%2F0068.image_5F00_thumb_5F00_14.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121235iED0B40E1C56C107D%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22404%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EAn%20easy%20way%20to%20see%20version%20information%20for%20a%20module%20without%20leaving%20Windbg%20is%20to%20use%20the%20%3CEM%3E%20lm%20%3C%2FEM%3E%20(List%20Modules)%20command.%20The%20output%20of%20that%20command%20told%20me%20that%20Yt.dll%20(the%20name%20of%20the%20DLL%20is%20the%20text%20to%20the%20left%20of%20the%20%E2%80%9C!%E2%80%9D)%20was%20part%20of%20the%20Yahoo%20Toolbar%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22266%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fcfs-file.ashx%2F__key%2FCommunityServer-Blogs-Components-WeblogFiles%2F00-00-00-52-36-metablogapi%2F6013.image_5F00_thumb_5F00_15.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121236i7E71EE6811BCFC07%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22404%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThis%20came%20as%20a%20surprise%20because%20the%20system%20on%20which%20the%20crash%20occurred%20was%20my%20home%20gaming%20system%2C%20a%20computer%20that%20I%E2%80%99d%20only%20had%20for%20a%20few%20weeks.%20The%20only%20software%20I%20generally%20install%20on%20my%20gaming%20systems%20are%20Microsoft%20Office%20and%20games.%20I%20don%E2%80%99t%20use%20browser%20toolbars%20and%20if%20I%20did%2C%20would%20obviously%20use%20the%20one%20from%20Bing%2C%20not%20Yahoo%E2%80%99s.%20Further%2C%20the%20date%20on%20the%20DLL%20showed%20that%20it%20was%20almost%20two%20years%20old.%20I%E2%80%99m%20pretty%20diligent%20about%20looking%20for%20opt-out%20checkboxes%20on%20software%20installers%2C%20so%20the%20likely%20explanation%20was%20that%20the%20toolbar%20had%20come%20onto%20my%20system%20piggybacking%20on%20the%20installation%20of%20one%20of%20the%20several%20video-card%20stress%20testing%20and%20temperature%20profiling%20tools%20I%20used%20while%20overclocking%20the%20system.%20I%20find%20the%20practice%20of%20forcing%20users%20to%20opt-out%20annoying%20and%20not%20giving%20them%20a%20choice%20even%20more%20so%2C%20so%20was%20pretty%20annoyed%20at%20this%20point.%20A%20quick%20trip%20to%20the%20Control%20Panel%20and%20a%20few%20minutes%20later%20and%20my%20system%20was%20free%20from%20the%20undesired%20and%20out-of-date%20toolbar.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EUsing%20a%20couple%20of%20handy%20troubleshooting%20techniques%2C%20within%20less%20than%20five%20minutes%20I%20had%20identified%20the%20probable%20cause%20of%20the%20crash%20I%20experienced%2C%20made%20my%20system%20more%20reliable%2C%20and%20probably%20even%20improved%20its%20performance.%20Case%20closed.%3C%2FP%3E%0A%20%0A%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-723924%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20TechNet%20on%20Jun%2001%2C%202010%20While%20I%20long%20for%20the%20day%20when%20I%20no%20longer%20experience%20the%20effects%20of%20buggy%20software%2C%20there%E2%80%99s%20something%20rewarding%20about%20solving%20my%20own%20troubleshooting%20cases.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-723924%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMark%20Russinovich%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft
First published on TechNet on Jun 01, 2010

While I long for the day when I no longer experience the effects of buggy software, there’s something rewarding about solving my own troubleshooting cases. In the process, I often come up with new techniques to add to my bag of tricks and to share with you in my “ Case of the Unexplained…” presentations and blog posts. The other day I successfully closed an especially interesting case that opened when Internet Explorer (IE) crashed as I was reading a web page:


image


Whenever I experience a crash, whether it’s the system or an application, I always take a look at it. There’s no guarantee, but many times after spending just a few minutes I find clues that point at an add-on as the cause and ultimately a fix or workaround. In most cases when it’s an application crash, the faulty process is obvious and I simply launch Windbg (from the free Debugging Tools for Windows package that comes with the Windows SDK and Windows DDK), attach it to the process, and start investigating.


Sometimes however, the faulting process isn’t obvious, like was the case when I saw the IE crash dialog. That’s because I was running IE8, which has a multi-process model where different tabs are hosted in different processes:


image


I had multiple tabs open as usual, so I had to figure out which IE process of the four that were running (in addition to the parent broker instance) was the one that had crashed. I could have taken the brute-force approach of attaching to each process in turn and searching for the faulting thread, but there’s fortunately a simpler and more direct way to identify the target process.


When a process crashes, the Windows Error Reporting (WER) service launches its own process, called WerFault, in the session of the crashed process to display the error dialog to the user running the session and to generate a crash dump file. So that WerFault knows which process is the one that crashed, the WER service passes the process ID (PID) of the target on WerFault’s command line. You can easily view the command line with Process Explorer. Because I always have Process Explorer running with its icon visible in the tray area of the taskbar, I clicked on the icon to open it and found the WER process in the process tree:


image


I double-clicked on it to open the process properties dialog and the command line revealed the process ID of the problematic IE process:


image


Now that I knew it was process 4440 in which I was interested, I started Windbg, pressed F6 to open the process selection dialog, and double-clicked on Iexplore.exe process 4440. With Windbg attached, my next step was to locate the thread that had faulted so that I could examine its stack for signs of a buggy add-on. In some cases, relying on Windbg’s built-in crash analysis heuristics, which you can trigger with the !analyze command, will do the job for you, but it didn’t this time. Finding the faulting thread is fairly straightforward, though.


First, go to Windbg’s View menu and open both the Processes and Threads and the Call Stack dialogs, arranging them side by side. The goal is to find the thread that has functions with the words fault , exception , or unhandled in their names. You can quickly do this by selecting each thread in the Processes and Threads window, pressing Enter, and then scanning the stack that appears in the Call Stack window. After doing this for the first few threads, I came across the thread I was looking for, revealed by functions all over its stack containing the telltale strings:


image


Unfortunately, I was at an apparent dead end as far as fingering an add-on: all the DLLs shown in the call stack were Microsoft’s. There was one indicator that there might be an add-on hidden from view though, and that was the text reporting that Windbg couldn’t find symbols for at least some of the stack’s frames, so was forced to make guesses about the stack’s layout and was showing an address that didn’t lie within any DLL:


image


This happens when a DLL uses frame pointer omitted (FPO) calling conventions, which in the absence of symbolic information for the DLL prevents the debugger from finding stack frames just by following the frame-pointer chain. The return addresses for the functions the thread invoked must be on the stack (unless they were overwritten by the bug that caused the crash), but Windbg’s heuristics couldn’t locate them.


There’s a Windbg command that you can use in these cases to hunt for the missing frame function addresses, the Display Words and Symbols command. If you’re debugging a 32-bit process, use the dds version of the command and if it’s a 64-bit process use dqs . You can also use dps (Display Pointer Symbols), which will interpret the function addresses as the appropriate size for a 32-bit or 64-bit process. The address to give to the command as the starting point should be the address of the stack frame immediately above the one where Windbg got lost. To see the address, click on the Addrs button in the call stack dialog:


image


The address on the frame in question was 2cbc5c8:


image


I passed it to dds as the argument and pressed enter:


image


The first page of results didn’t list any functions besides the expected one, KiUserException. I hit the enter key again without typing another command, because for address-based commands like dds, that tells Windbg to repeat the last the last command at the address where it left off. The second page of results yielded something more interesting, the name of a DLL I wasn’t familiar with:


image


An easy way to see version information for a module without leaving Windbg is to use the lm (List Modules) command. The output of that command told me that Yt.dll (the name of the DLL is the text to the left of the “!”) was part of the Yahoo Toolbar:


image


This came as a surprise because the system on which the crash occurred was my home gaming system, a computer that I’d only had for a few weeks. The only software I generally install on my gaming systems are Microsoft Office and games. I don’t use browser toolbars and if I did, would obviously use the one from Bing, not Yahoo’s. Further, the date on the DLL showed that it was almost two years old. I’m pretty diligent about looking for opt-out checkboxes on software installers, so the likely explanation was that the toolbar had come onto my system piggybacking on the installation of one of the several video-card stress testing and temperature profiling tools I used while overclocking the system. I find the practice of forcing users to opt-out annoying and not giving them a choice even more so, so was pretty annoyed at this point. A quick trip to the Control Panel and a few minutes later and my system was free from the undesired and out-of-date toolbar.


Using a couple of handy troubleshooting techniques, within less than five minutes I had identified the probable cause of the crash I experienced, made my system more reliable, and probably even improved its performance. Case closed.