Home
%3CLINGO-SUB%20id%3D%22lingo-sub-724275%22%20slang%3D%22en-US%22%3EThe%20Case%20of%20the%20Veeerrry%20Slow%20Logons%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-724275%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%20Jul%2001%2C%202012%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3EThis%20case%20is%20my%20favorite%20kind%20of%20case%2C%20one%20where%20I%20use%20my%20own%20tools%20to%20solve%20a%20problem%20affecting%20me%20personally.%26nbsp%3B%20The%20problem%20at%20the%20root%20of%20it%20is%20also%20one%20you%20might%20run%20into%2C%20especially%20if%20you%20travel%2C%20and%20demonstrates%20the%20use%20of%20some%20Process%20Monitor%20features%20that%20many%20people%20aren%E2%80%99t%20aware%20of%2C%20making%20it%20an%20ideal%20troubleshooting%20example%20to%20document%20and%20share.%3C%2FP%3E%0A%20%20%3CP%3EThe%20story%20unfolds%20the%20week%20before%20last%20when%20I%20made%20a%20trip%20to%20Orlando%20to%20speak%20at%20Microsoft%E2%80%99s%20TechEd%20North%20America%20conference.%20While%20I%20was%20there%20I%20began%20to%20experience%20five%20minute%20black-screen%20delays%20when%20I%20logged%20on%20to%20my%20laptop%E2%80%99s%20Windows%207%20installation%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22218%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%2F1817.image_5F00_thumb.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121399iD2F91A7E39512365%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%22449%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EI%E2%80%99d%20typically%20chalk%20up%20an%20isolated%20delay%20like%20this%20to%20networking%20issues%2C%20common%20at%20conferences%20and%20with%20hotel%20WiFi%2C%20but%20I%20hit%20the%20issue%20consistently%20switching%20between%20the%20laptop%E2%80%99s%20Windows%208%20installation%2C%20where%20I%20was%20doing%20testing%20and%20presentations%2C%20and%20the%20Windows%207%20installation%2C%20where%20I%20have%20my%20development%20tools.%20Being%20locked%20out%20of%20your%20computer%20for%20that%20long%20is%20annoying%20to%20say%20the%20least.%3C%2FP%3E%0A%20%20%3CP%3EThe%20first%20time%20I%20ran%20into%20the%20black%20screen%20I%20forcibly%20rebooted%20the%20system%20after%20a%20couple%20of%20minutes%20because%20I%20thought%20it%20had%20hung%2C%20but%20when%20the%20delay%20happened%20a%20second%20time%20I%20was%20forced%20to%20wait%20it%20out%20and%20face%20the%20disappointing%20reality%20that%20my%20system%20was%20sick.%20When%20I%20logged%20off%20and%20back%20on%20again%20without%20a%20reboot%20in%20between%2C%20though%2C%20I%20didn%E2%80%99t%20hit%20the%20delay.%20It%20only%20occurred%20when%20logging%20on%20after%20a%20reboot%2C%20which%20I%20was%20doing%20as%20I%20switched%20between%20Windows%207%20and%20Windows%208.%20What%20made%20the%20situation%20especially%20frustrating%20was%20that%20whenever%20I%20rebooted%20I%20was%20always%20in%20a%20hurry%20to%20get%20ready%20for%20my%20next%20presentation%2C%20so%20had%20to%20suffer%20with%20the%20inconvenience%20for%20several%20days%20before%20I%20finally%20had%20the%20opportunity%20to%20investigate.%3C%2FP%3E%0A%20%20%3CP%3EOnce%20I%20had%20a%20few%20spare%20moments%2C%20I%20launched%20%3CA%20href%3D%22http%3A%2F%2Ftechnet.microsoft.com%2Fen-us%2Fsysinternals%2Fbb963902.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Sysinternals%20Autoruns%20%3C%2FA%3E%20%2C%20an%20advanced%20auto-start%20management%20utility%2C%20to%20disable%20any%20auto-starting%20images%20that%20were%20located%20on%20network%20shares.%20I%20knew%20from%20previous%20executions%20of%20Autoruns%20on%20the%20laptop%20that%20Microsoft%20IT%20configures%20several%20scheduled%20tasks%20to%20execute%20batch%20files%20that%20reside%20on%20corporate%20network%20shares%2C%20so%20suspected%20that%20timeouts%20trying%20to%20launch%20them%20were%20to%20blame%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%2257%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%2F4135.image_5F00_thumb_5F00_3.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121400i4E757713638A0206%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%0A%20%20%3CP%3EI%20logged%20off%20and%20logged%20back%20on%20with%20fingers%20crossed%2C%20but%20the%20delay%20was%20still%20there.%20Next%2C%20I%20tried%20logging%20into%20a%20local%20account%20to%20see%20if%20this%20was%20a%20machine-wide%20problem%20or%20one%20affecting%20just%20my%20profile.%20No%20delay.%20That%20was%20a%20positive%20sign%20since%20it%20meant%20that%20whatever%20the%20issue%20was%2C%20it%20would%20probably%20be%20relatively%20easy%20to%20fix%20once%20identified.%3C%2FP%3E%0A%20%20%3CP%3EMy%20goal%20now%20was%20to%20determine%20what%20was%20holding%20up%20the%20switch%20to%20the%20desktop.%20I%20had%20to%20somehow%20get%20visibility%20into%20what%20was%20going%20on%20during%20a%20logon%20immediately%20following%20a%20boot.%20The%20way%20that%20immediately%20jumped%20to%20mind%20as%20the%20easiest%20was%20to%20use%20%3CA%20href%3D%22http%3A%2F%2Ftechnet.microsoft.com%2Fen-us%2Fsysinternals%2Fbb896645.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Sysinternals%20Process%20Monitor%20%3C%2FA%3E%20to%20capture%20a%20trace%20of%20the%20boot%20process.%20Process%20Monitor%2C%20a%20tool%20that%20monitors%20system-wide%20file%20system%2C%20registry%2C%20process%2C%20DLL%20and%20network%20operations%2C%20has%20the%20ability%20to%20capture%20activity%20from%20very%20early%20in%20the%20boot%2C%20stopping%20its%20capture%20only%20when%20the%20system%20shuts%20down%20or%20you%20run%20the%20Process%20Monitor%20user%20interface.%20I%20selected%20the%20boot%20logging%20entry%20from%20the%20Options%20and%20opened%20the%20boot%20logging%20dialog%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22SNAGHTML274998d%22%20border%3D%220%22%20height%3D%22213%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%2F3073.SNAGHTML274998d_5F00_thumb.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121401i94D67F97F7303849%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%22SNAGHTML274998d%22%20width%3D%22377%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EThe%20dialog%20lets%20you%20direct%20Process%20Monitor%20to%20collect%20profiling%20events%20while%20it%E2%80%99s%20monitoring%20the%20boot%2C%20which%20are%20periodic%20samples%20of%20thread%20stacks.%20I%20enabled%20one-second%20profiling%2C%20hoping%20that%20even%20if%20I%20didn%E2%80%99t%20spot%20operations%20that%20explained%20the%20delay%2C%20that%20I%20could%20get%20a%20clue%20from%20the%20stacks%20of%20the%20threads%20that%20were%20active%20just%20before%20or%20during%20the%20delay.%3C%2FP%3E%0A%20%20%3CP%3EAfter%20I%20rebooted%2C%20I%20logged%20on%2C%20waited%20for%20five%20minutes%20looking%20at%20a%20black%20screen%2C%20then%20finally%20got%20to%20my%20desktop%2C%20where%20I%20ran%20Process%20Monitor%20again%20and%20saved%20the%20boot%20log.%20Instead%20of%20scanning%20the%20several%20million%20events%20that%20had%20been%20captured%2C%20which%20would%20have%20been%20like%20looking%20for%20a%20needle%20in%20a%20haystack%2C%20I%20used%20this%20Process%20Monitor%20filter%20to%20look%20for%20operations%20that%20took%20more%20than%20one%20second%2C%20and%20hence%20might%20have%20caused%20the%20slow%20down%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22SNAGHTML27bf247%22%20border%3D%220%22%20height%3D%22103%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%2F2068.SNAGHTML27bf247_5F00_thumb.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121402iD08C96BD318DA951%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%22SNAGHTML27bf247%22%20width%3D%22454%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EUnfortunately%2C%20the%20filter%20cleared%20the%20display%2C%20dashing%20my%20hopes%20for%20quickly%20finding%20a%20clue.%3C%2FP%3E%0A%20%20%3CP%3EWondering%20if%20perhaps%20the%20sequence%20of%20processes%20starting%20during%20the%20logon%20might%20reveal%20something%2C%20I%20opened%20the%20Process%20Tree%20dialog%20from%20the%20Tools%20menu.%20The%20dialog%20shows%20the%20parent-child%20relationships%20of%20all%20the%20processes%20active%20during%20a%20capture%2C%20which%20in%20the%20case%20of%20a%20boot%20trace%20means%20all%20the%20processes%20that%20executed%20during%20the%20boot%20and%20logon%20process.%20Focusing%20my%20attention%20on%20Winlogon.exe%2C%20the%20interactive%20logon%20manager%2C%20I%20noticed%20that%20a%20process%20named%20Atbroker.exe%20launched%20around%20the%20time%20I%20entered%20my%20credentials%2C%20and%20then%20Userinit.exe%20executed%20at%20the%20time%20my%20desktop%20finally%20appeared%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22116%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%2F0312.image_5F00_thumb_5F00_16.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121403i238F52914FDBBBE4%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%22444%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EThe%20key%20to%20the%20solving%20the%20mystery%20lay%20in%20the%20long%20pause%20in%20between.%20I%20knew%20that%20Logonui.exe%20simply%20displays%20the%20logon%20user%20interface%20and%20that%20Atbroker.exe%20is%20just%20a%20helper%20for%20transitioning%20from%20the%20logon%20user%20interface%20to%20a%20user%20session%2C%20which%20ruled%20them%20out%2C%20at%20least%20initially.%20The%20black%20screen%20disappeared%20when%20Userinit.exe%20had%20started%2C%20so%20Userinit%E2%80%99s%20parent%20process%2C%20Winlogon.exe%2C%20was%20the%20remaining%20suspect.%20I%20set%20a%20filter%20to%20include%20just%20events%20from%20Winlogon.exe%20and%20added%20the%20Relative%20Time%20column%20to%20easily%20see%20when%20events%20occurred%20relative%20to%20the%20start%20of%20the%20boot.%20When%20I%20looked%20at%20the%20resulting%20items%20I%20could%20easily%20see%20the%20delay%20was%20actually%20about%20six%20minutes%2C%20but%20there%20was%20no%20activity%20in%20that%20time%20period%20to%20point%20me%20at%20a%20cause%3A%3C%2FP%3E%0A%20%20%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%2F5621.image_5F00_thumb_5F00_6.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121404i101AC586EAC90CC8%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%22522%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EProfiling%20events%20are%20excluded%20by%20default%2C%20so%20I%20clicked%20on%20the%20profile%20event%20filter%20button%20in%20the%20toolbar%20to%20include%20them%2C%20hoping%20that%20they%20might%20offer%20some%20insight%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%2261%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%2F1004.image_5F00_thumb_5F00_7.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121405iFD1E873458112999%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%22244%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EIn%20order%20to%20minimize%20log%20file%20sizes%2C%20Process%20Monitor%E2%80%99s%20profiling%20only%20captures%20a%20thread%E2%80%99s%20stack%20if%20the%20thread%20has%20executed%20since%20the%20last%20time%20it%20was%20sampled.%20I%20therefore%20was%20expecting%20to%20have%20to%20look%20at%20the%20thread%20profile%20events%20at%20the%20start%20of%20the%20event%2C%20but%20my%20eye%20was%20drawn%20to%20a%20pattern%20of%20the%20same%20four%20threads%20sampled%20every%20second%20throughout%20the%20entire%20black-screen%20period%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22318%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%2F4544.image_5F00_thumb_5F00_8.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121406iEFE281261DA361D3%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%22254%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EI%20was%20fairly%20certain%20that%20whatever%20thread%20was%20holding%20things%20up%20had%20executed%20some%20function%20at%20the%20beginning%20of%20the%20interval%20and%20was%20dormant%20throughout%2C%20so%20was%20skeptical%20that%20any%20of%20these%20active%20threads%20were%20related%20to%20the%20issue%2C%20but%20it%20was%20worth%20spending%20a%20few%20seconds%20to%20look%20at%20them.%20I%20opened%20the%20event%20properties%20dialog%20for%20one%20of%20the%20samples%20by%20double-clicking%20on%20it%20and%20switched%20to%20its%20Stack%20page%2C%20on%20the%20off%20chance%20that%20the%20names%20of%20the%20functions%20on%20the%20stack%20had%20an%20answer.%3C%2FP%3E%0A%20%20%3CP%3EWhen%20I%20first%20run%20Process%20Monitor%20on%20a%20system%20I%20configure%20it%20to%20pull%20symbols%20for%20Windows%20images%20from%20the%20Microsoft%20public%20symbol%20server%20using%20the%20%3CA%20href%3D%22http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Fwindows%2Fhardware%2Fgg463009.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Debugging%20Tools%20for%20Windows%20%3C%2FA%3E%20debug%20engine%20DLL%2C%20so%20I%20can%20see%20descriptive%20function%20names%20in%20the%20stack%20frames%20of%20Windows%20executables%2C%20rather%20than%20just%20file%20offsets%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22SNAGHTML3eeaff2%22%20border%3D%220%22%20height%3D%22302%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%2F8345.SNAGHTML3eeaff2_5F00_thumb.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121407iC19A053F70921657%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%22SNAGHTML3eeaff2%22%20width%3D%22404%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EThe%20first%20thread%E2%80%99s%20stack%20identified%20the%20thread%20as%20a%20core%20Winlogon%20%E2%80%9Cstate%20machine%E2%80%9D%20thread%20waiting%20for%20some%20unknown%20notification%2C%20yielding%20no%20clues%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22320%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%2F3566.image_5F00_thumb_5F00_9.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121408i4DED504CA751E969%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%22344%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EThe%20next%20thread%E2%80%99s%20stack%20was%20just%20as%20unenlightening%2C%20showing%20the%20thread%20to%20be%20a%20generic%20worker%20thread%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22265%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%2F4628.image_5F00_thumb_5F00_11.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121410iC776FE6FDD2D0EA5%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%22344%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EThe%20stack%20of%20the%20third%20thread%20was%20much%20more%20interesting.%20It%20was%20many%20frames%20deep%2C%20including%20calls%20into%20functions%20of%20the%20Multiple%20UNC%20Provider%20(MUP)%20and%20Distributed%20File%20System%20Client%20(DFSC)%20drivers%2C%20both%20related%20to%20accessing%20file%20servers%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22511%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%2F3566.image_5F00_thumb_5F00_12.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121411iCA42E6603BAA8B72%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%22344%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EI%20scrolled%20down%20to%20see%20the%20frames%20higher%20on%20the%20stack%20and%20the%20name%20of%20one%20of%20the%20functions%2C%20%3CSTRONG%3E%20WLGeneric_ActivationAndNotifyStartShell_Execute%20%3C%2FSTRONG%3E%20%2C%20pretty%20much%20confirmed%20the%20thread%20to%20be%20the%20one%20responsible%20for%20the%20problem%2C%20since%20it%20implied%20that%20it%20was%20supposed%20to%20start%20the%20desktop%20shell%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22202%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%2F2072.image_5F00_thumb_5F00_13.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121412i007302AAB11EDEFF%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%22344%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EThe%20next%20frame%E2%80%99s%20function%2C%20%3CSTRONG%3E%20WNetRestoreAllConnectionsW%20%3C%2FSTRONG%3E%20%2C%20combined%20with%20the%20deeper%20calls%20into%20file%20server%20functions%2C%20led%20me%20to%20conclude%20that%20Winlogon%20was%20trying%20to%20restore%20file%20server%20drive%20letter%20mappings%20before%20proceeding%20to%20launch%20my%20shell%20and%20give%20me%20access%20to%20the%20desktop.%20I%20quickly%20opened%20Explorer%2C%20recalling%20that%20I%20had%20two%20drives%20mapped%20to%20network%20shares%20hosted%20on%20computers%20inside%20the%20Microsoft%20network%2C%20one%20to%20my%20development%20system%20and%20another%20to%20the%20internal%20Sysinternals%20share%20where%20I%20publish%20pre-release%20versions%20of%20the%20tools.%20While%20at%20the%20conference%20I%20was%20not%20on%20the%20intranet%2C%20so%20Winlogon%20was%20unable%20to%20reconnect%20them%20during%20the%20logon%20and%20was%20eventually%20%E2%80%93%20after%20many%20minutes%20%E2%80%93%20giving%20up%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%2290%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%2F5040.image_5F00_thumb_5F00_15.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121413i113CBF980B7AC7F8%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%22454%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EConfident%20I%E2%80%99d%20solved%20the%20mystery%2C%20I%20right-clicked%20on%20each%20share%20and%20disconnected%20it.%20I%20rebooted%20the%20laptop%20to%20verify%20my%20fix%20(workaround%20to%20be%20precise)%2C%20and%20to%20my%20immense%20satisfaction%2C%20the%20logon%20proceeded%20to%20the%20desktop%20within%20a%20few%20seconds.%20The%20case%20was%20closed!%20As%20for%20why%20the%20delays%20were%20unusually%20long%2C%20I%20haven%E2%80%99t%20had%20the%20time%20%E2%80%93%20or%26nbsp%3B%20need%20-%20to%20investigate%20further.%20The%20point%20of%20this%20story%20isn%E2%80%99t%20to%20highlight%20this%20particular%20issue%2C%20but%20illustrate%20the%20use%20of%20the%20Sysinternals%20tools%20and%20troubleshooting%20techniques%20to%20solve%20problems.%3C%2FP%3E%0A%20%20%3CP%3ETechEd%20Europe%2C%20which%20took%20place%20in%20Amsterdam%20last%20week%2C%20gave%20me%20another%20chance%20to%20reprise%20the%20talks%20I%E2%80%99d%20given%20at%20TechEd%20US.%20I%20delivered%20the%20same%20Case%20of%20the%20Unexplained%20troubleshooting%20session%20I%20had%20at%20TechEd%20US%2C%20but%20this%20time%20I%20had%20the%20pleasure%20of%20sharing%20this%20very%20fresh%20and%20personal%20case.%20You%20can%20watch%20it%20and%20my%20other%20TechEd%20sessions%20either%20by%20going%20to%20my%20webcasts%20page%2C%20which%20lists%20all%20of%20my%20major%20sessions%20posted%20online%2C%20or%20follow%20these%20links%20directly%3A%3C%2FP%3E%0A%20%20%3CBLOCKQUOTE%3E%0A%20%20%20%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fchannel9.msdn.com%2FEvents%2FTechEd%2FNorthAmerica%2F2012%2FAZR209%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EWindows%20Azure%20Virtual%20Machines%20and%20Virtual%20Networks%20%3C%2FA%3E%20%3CBR%20%2F%3E%20%3CA%20href%3D%22https%3A%2F%2Fchannel9.msdn.com%2FEvents%2FTechEd%2FEurope%2F2012%2FAZR302%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Windows%20Azure%20Internals%20%3C%2FA%3E%20%3CBR%20%2F%3E%20%3CA%20href%3D%22https%3A%2F%2Fchannel9.msdn.com%2FEvents%2FTechEd%2FEurope%2F2012%2FSIA302%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Malware%20Hunting%20with%20the%20Sysinternals%20Tools%20%3C%2FA%3E%20%3CBR%20%2F%3E%20%3CA%20href%3D%22https%3A%2F%2Fchannel9.msdn.com%2FEvents%2FTechEd%2FNorthAmerica%2F2012%2FWCL301%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Case%20of%20the%20Unexplained%202012%3C%2FA%3E%3C%2FP%3E%0A%20%20%3C%2FBLOCKQUOTE%3E%0A%20%20%3CP%3EAnd%20you%20can%20see%20all%20of%20both%20event%E2%80%99s%20sessions%20online%20at%20their%20webcast%20sites%3A%3C%2FP%3E%0A%20%20%3CBLOCKQUOTE%3E%0A%20%20%20%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fchannel9.msdn.com%2FEvents%2FTechEd%2FNorthAmerica%2F2012%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ETechEd%20North%20America%202012%20On-Demand%20Recordings%20%3C%2FA%3E%20%3CBR%20%2F%3E%20%3CA%20href%3D%22https%3A%2F%2Fchannel9.msdn.com%2FEvents%2FTechEd%2FEurope%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20TechEd%20Europe%202012%20On-Demand%20Recordings%3C%2FA%3E%3C%2FP%3E%0A%20%20%3C%2FBLOCKQUOTE%3E%0A%20%20%3CP%3EI%20hope%20you%20enjoyed%20this%20case!%3C%2FP%3E%0A%20%0A%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-724275%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20TechNet%20on%20Jul%2001%2C%202012%20This%20case%20is%20my%20favorite%20kind%20of%20case%2C%20one%20where%20I%20use%20my%20own%20tools%20to%20solve%20a%20problem%20affecting%20me%20personally.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-724275%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 Jul 01, 2012

This case is my favorite kind of case, one where I use my own tools to solve a problem affecting me personally.  The problem at the root of it is also one you might run into, especially if you travel, and demonstrates the use of some Process Monitor features that many people aren’t aware of, making it an ideal troubleshooting example to document and share.

The story unfolds the week before last when I made a trip to Orlando to speak at Microsoft’s TechEd North America conference. While I was there I began to experience five minute black-screen delays when I logged on to my laptop’s Windows 7 installation:

image

I’d typically chalk up an isolated delay like this to networking issues, common at conferences and with hotel WiFi, but I hit the issue consistently switching between the laptop’s Windows 8 installation, where I was doing testing and presentations, and the Windows 7 installation, where I have my development tools. Being locked out of your computer for that long is annoying to say the least.

The first time I ran into the black screen I forcibly rebooted the system after a couple of minutes because I thought it had hung, but when the delay happened a second time I was forced to wait it out and face the disappointing reality that my system was sick. When I logged off and back on again without a reboot in between, though, I didn’t hit the delay. It only occurred when logging on after a reboot, which I was doing as I switched between Windows 7 and Windows 8. What made the situation especially frustrating was that whenever I rebooted I was always in a hurry to get ready for my next presentation, so had to suffer with the inconvenience for several days before I finally had the opportunity to investigate.

Once I had a few spare moments, I launched Sysinternals Autoruns , an advanced auto-start management utility, to disable any auto-starting images that were located on network shares. I knew from previous executions of Autoruns on the laptop that Microsoft IT configures several scheduled tasks to execute batch files that reside on corporate network shares, so suspected that timeouts trying to launch them were to blame:

image

I logged off and logged back on with fingers crossed, but the delay was still there. Next, I tried logging into a local account to see if this was a machine-wide problem or one affecting just my profile. No delay. That was a positive sign since it meant that whatever the issue was, it would probably be relatively easy to fix once identified.

My goal now was to determine what was holding up the switch to the desktop. I had to somehow get visibility into what was going on during a logon immediately following a boot. The way that immediately jumped to mind as the easiest was to use Sysinternals Process Monitor to capture a trace of the boot process. Process Monitor, a tool that monitors system-wide file system, registry, process, DLL and network operations, has the ability to capture activity from very early in the boot, stopping its capture only when the system shuts down or you run the Process Monitor user interface. I selected the boot logging entry from the Options and opened the boot logging dialog:

SNAGHTML274998d

The dialog lets you direct Process Monitor to collect profiling events while it’s monitoring the boot, which are periodic samples of thread stacks. I enabled one-second profiling, hoping that even if I didn’t spot operations that explained the delay, that I could get a clue from the stacks of the threads that were active just before or during the delay.

After I rebooted, I logged on, waited for five minutes looking at a black screen, then finally got to my desktop, where I ran Process Monitor again and saved the boot log. Instead of scanning the several million events that had been captured, which would have been like looking for a needle in a haystack, I used this Process Monitor filter to look for operations that took more than one second, and hence might have caused the slow down:

SNAGHTML27bf247

Unfortunately, the filter cleared the display, dashing my hopes for quickly finding a clue.

Wondering if perhaps the sequence of processes starting during the logon might reveal something, I opened the Process Tree dialog from the Tools menu. The dialog shows the parent-child relationships of all the processes active during a capture, which in the case of a boot trace means all the processes that executed during the boot and logon process. Focusing my attention on Winlogon.exe, the interactive logon manager, I noticed that a process named Atbroker.exe launched around the time I entered my credentials, and then Userinit.exe executed at the time my desktop finally appeared:

image

The key to the solving the mystery lay in the long pause in between. I knew that Logonui.exe simply displays the logon user interface and that Atbroker.exe is just a helper for transitioning from the logon user interface to a user session, which ruled them out, at least initially. The black screen disappeared when Userinit.exe had started, so Userinit’s parent process, Winlogon.exe, was the remaining suspect. I set a filter to include just events from Winlogon.exe and added the Relative Time column to easily see when events occurred relative to the start of the boot. When I looked at the resulting items I could easily see the delay was actually about six minutes, but there was no activity in that time period to point me at a cause:

image

Profiling events are excluded by default, so I clicked on the profile event filter button in the toolbar to include them, hoping that they might offer some insight:

image

In order to minimize log file sizes, Process Monitor’s profiling only captures a thread’s stack if the thread has executed since the last time it was sampled. I therefore was expecting to have to look at the thread profile events at the start of the event, but my eye was drawn to a pattern of the same four threads sampled every second throughout the entire black-screen period:

image

I was fairly certain that whatever thread was holding things up had executed some function at the beginning of the interval and was dormant throughout, so was skeptical that any of these active threads were related to the issue, but it was worth spending a few seconds to look at them. I opened the event properties dialog for one of the samples by double-clicking on it and switched to its Stack page, on the off chance that the names of the functions on the stack had an answer.

When I first run Process Monitor on a system I configure it to pull symbols for Windows images from the Microsoft public symbol server using the Debugging Tools for Windows debug engine DLL, so I can see descriptive function names in the stack frames of Windows executables, rather than just file offsets:

SNAGHTML3eeaff2

The first thread’s stack identified the thread as a core Winlogon “state machine” thread waiting for some unknown notification, yielding no clues:

image

The next thread’s stack was just as unenlightening, showing the thread to be a generic worker thread:

image

The stack of the third thread was much more interesting. It was many frames deep, including calls into functions of the Multiple UNC Provider (MUP) and Distributed File System Client (DFSC) drivers, both related to accessing file servers:

image

I scrolled down to see the frames higher on the stack and the name of one of the functions, WLGeneric_ActivationAndNotifyStartShell_Execute , pretty much confirmed the thread to be the one responsible for the problem, since it implied that it was supposed to start the desktop shell:

image

The next frame’s function, WNetRestoreAllConnectionsW , combined with the deeper calls into file server functions, led me to conclude that Winlogon was trying to restore file server drive letter mappings before proceeding to launch my shell and give me access to the desktop. I quickly opened Explorer, recalling that I had two drives mapped to network shares hosted on computers inside the Microsoft network, one to my development system and another to the internal Sysinternals share where I publish pre-release versions of the tools. While at the conference I was not on the intranet, so Winlogon was unable to reconnect them during the logon and was eventually – after many minutes – giving up:

image

Confident I’d solved the mystery, I right-clicked on each share and disconnected it. I rebooted the laptop to verify my fix (workaround to be precise), and to my immense satisfaction, the logon proceeded to the desktop within a few seconds. The case was closed! As for why the delays were unusually long, I haven’t had the time – or  need - to investigate further. The point of this story isn’t to highlight this particular issue, but illustrate the use of the Sysinternals tools and troubleshooting techniques to solve problems.

TechEd Europe, which took place in Amsterdam last week, gave me another chance to reprise the talks I’d given at TechEd US. I delivered the same Case of the Unexplained troubleshooting session I had at TechEd US, but this time I had the pleasure of sharing this very fresh and personal case. You can watch it and my other TechEd sessions either by going to my webcasts page, which lists all of my major sessions posted online, or follow these links directly:

Windows Azure Virtual Machines and Virtual Networks
Windows Azure Internals
Malware Hunting with the Sysinternals Tools
Case of the Unexplained 2012

And you can see all of both event’s sessions online at their webcast sites:

TechEd North America 2012 On-Demand Recordings
TechEd Europe 2012 On-Demand Recordings

I hope you enjoyed this case!