This document is based upon troubleshooting done when upgrade of 8.1 RU4 to RU7 hangs.
There can be multiple situations :
1. Upgrading Rollups of ITMS
2. Upgrading from one version to another of ITMS
3. Trying to restart W3SVC service for some other purpose and it got stuck.
Upgrade log error :
Failed while stopping service: W3SVC
Time out has expired and the operation has not been completed.
[System.ServiceProcess.TimeoutException @ System.ServiceProcess]
at System.ServiceProcess.ServiceController.WaitForStatus(ServiceControllerStatus desiredStatus, TimeSpan timeout)
at Symantec.Installation.NSConfiguration.ServicesManager.StopService(String service, Int32 retryCount)
at Symantec.Installation.NSConfiguration.ServicesManager.StopServices(Service services)
WIndows Server 2012 R2
IIS on 2012 R2 server has been causing such issues of w3svc getting stuck after updates from July 2018.
Issue is discussed in the below mentioned IIS forum :
Uninstalling KB4338815 & KB4338824 helped get W3SVC services to stop and start successfully.