Monday 5 December 2011

Windows 7 "Please Wait" or Welcome Screen hang


Just thought I'd share a hotfix that resolved an issue that has been plaguing our Windows 7 desktop PCs for the past few weeks. Hopefully it will save someone all of the investigating we had to do!

Symptoms
Windows 7 (SP1) hangs for up to 60 minutes either at:

the"Please Wait" screen before logon screen
the "Welcome" screen after logon (Somebody coined this the "Welcome Screen of Death")
or occasionally at log off

You may see events in the Application Log under ID 6006:
The winlogon notification subscriber took xxxx second(s) to handle the notification event (CreateSession) - "Please Wait" hang
The winlogon notification subscriber took xxxx second(s) to handle the notification event (Logon) - "Welcome" screen hang
The winlogon notification subscriber took xxxx second(s) to handle the notification event (Logoff) - log off hang

This event clearly suggests a problem with the GPClient (Group Policy Client)  so we started  moving the PC to an OU with limited GPOs which reduced the problem. However, the problem is apparent when there is a large number of user profiles on the system (we had ranges of 50 to 250) and deleting profiles can appear to alleviate the problem. The more profiles, the longer the delay.

We only spotted the root cause of the issue by removing and re-applying group policies whilst logged onto a problem PC and noticing that RSOP was hanging. Using Process Explorer we spotted that one of the svchost processes was using an entire CPU core. Since this instance of svchost runs both the Winmgmt (WMI) service and the gpsvc (GPClient) service (amongst other key Windows services) so it appears that the GPClient has to wait for WMI to finish, causing the long delay.


Resolution
Install hotfix kb2617858

"This issue occurs because the Windows Management Instrumentation (WMI) component unnecessarily performs a full validation of the WMI repository"

Since each user profile adds to the WMI repository, the more profiles, the longer the delay (although their seems to be a limit of 60 minutes).

See also kb2505348 which references kb2617858