Component Based Servicing (CBS) affects shutdown duration in Windows Server 2016

V

Vlad Yumashev

I tested UPS shutdown in case of power failure on Windows Server 2016 + APC Smart UPS + NUT.

In some moment NUT has sent shutdown command to Windows. But instead of real shutdown I observed screen with "Getting ready your server" or something like it, I do not remember exactly. Screen looked like it were some updates installing during shutdown process. But I have configured server for manual updates. I also have checked and installed all updates 3-4 hours before this.

It took 20-25 minutes for shutdown process to complete. Fortunately UPS did not turn off the power (due to some config errors). But in real situation with correct configs UPS would remove AC power from server in 3 minutes after shutdown command.

Later I've investigated logs and have found that CBS (Component Based Servicing) has began some maitenanace tasks several munites before shutdown. So Windows waited for it to complete.

Approximate timings:

  • 15:36:55 shutdown command with 30 sec delay (shutdown.exe /f /s /t 30)
  • 15:37:25 user logoff
  • about 15:55 shutdown has completed

From CBS.log:

2019-05-08 15:34:59, Info CBS Maint: begin deep clean
...
...
2019-05-08 15:37:26, Info CBS Trusted Installer signaled for shutdown, going to exit.
2019-05-08 15:37:26, Info CBS A system shutdown was initiated while idle scavenging was running
2019-05-08 15:37:26, Info CBS Shtd: Prepare for shutdown processing.
2019-05-08 15:37:26, Info CBS Plan: Package: Package_for_RollupFix~31bf3856ad364e35~amd64~~14393.2273.1.4, Update: 4103720-19196_neutral_PACKAGE, current: Absent, pending: Default, start: Absent, applicable: Absent, targeted: Absent, limit: Absent, selected: Default
2019-05-08 15:37:26, Info CBS SetProgressMessage: progressMessageStage: 0, ExecuteState: ExecuteStateNone, SubStage: 0
2019-05-08 15:37:26, Info CBS Shtd: PreshutdownTimeout: 3600000ms, BlockTimeIncrement: 900000ms
2019-05-08 15:37:26, Info CBS Shtd: progress thread started

I understand the importance of clean room, but when I clean my room and someone tells me "go out because the plane will crash on you in 30 seconds" I would get out as soon as possible.

Questions:

  1. Is this a behaviour of only CBS in WinServer2016? Is there other services that may behave similar (I know about windows update)? What about WinServer2012R2?
  2. Is it possible to make forced but correct shutdown to override such busy processes?

Continue reading...
 
Back
Top Bottom