Windows: investigating error code 0x80073701 and 0x800f081f while updating; some DISM and CBS log things to search for
Posted by jpluimers on 2023/03/20
A while ago when applying KB5008212* through Windows Update, I got errors. It was odd, as until now, all other upgrades had worked fine.
Often Windows update errors are because of lack of disk space (I try maintain 10 gigabytes or more free space on virtual machines, but that sometimes fails because some software – despite user files being on a different drive – sometimes insists on filling the system drive).
This time, Windows Update would show 0x80073701
, of course right after reaching 100%, but actually it was a 0x800f081f
in disguise.
My usual modus operandi didn’t solve it (with a retry after every step):
- Reboot
- Cleanup of the system drive using built-in
CleanMgr.exe
(Disk cleanup) - Scan all corrupted system files and replace them from cache:
SFC /ScanNow
(System File Checker) - Cleanup and repair the Windows image using
DISM /Online /Cleanup-image /Restorehealth
(Deployment Image Servicing and Management)
All failed, but in the last step, DISM would consistently show error 0x800f081f
.
Even a local DISM /Online /Cleanup-Image /RestoreHealth /Source:C:\Windows\WinSxS /LimitAccess
would fail.
Each DISM run will actually log in two log files, and this is the trick to figure out what the next step would be.
Examples from my case:
- The log file that DISM tells you about:
C:\WINDOWS\Logs\DISM\dism.log
(or better:%windir%\Logs\DISM\dism.log
):
2021-12-17 19:41:36, Info DISM DISM Package Manager: PID=4628 TID=11884 Error in operation: source for package or file not found, ResolveSource() unsuccessful. (CBS HRESULT=0x800f081f) - CCbsConUIHandler::Error 2021-12-17 19:41:36, Error DISM DISM Package Manager: PID=4628 TID=11304 Failed finalizing changes. - CDISMPackageManager::Internal_Finalize(hr:0x800f081f) 2021-12-17 19:41:36, Error DISM DISM Package Manager: PID=4628 TID=11304 The source files could not be found; their location must be specified using the /source option to restore the feature. - GetCbsErrorMsg 2021-12-17 19:41:36, Error DISM DISM Package Manager: PID=4628 TID=11304 Failed processing package changes with session option CbsSessionOptionRepairStoreCorruption - CDISMPackageManager::RestoreHealth(hr:0x800f081f) 2021-12-17 19:41:36, Error DISM DISM Package Manager: PID=4628 TID=11304 The source files could not be found; their location must be specified using the /source option to restore the feature. - GetCbsErrorMsg 2021-12-17 19:41:36, Error DISM DISM Package Manager: PID=4628 TID=11304 Failed to restore the image health. - CPackageManagerCLIHandler::ProcessCmdLine_CleanupImage(hr:0x800f081f) 2021-12-17 19:41:36, Error DISM DISM Package Manager: PID=4628 TID=11304 Failed while processing command cleanup-image. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f081f) 2021-12-17 19:41:36, Info DISM DISM Package Manager: PID=4628 TID=11304 Further logs for online package and feature related operations can be found at %WINDIR%\logs\CBS\cbs.log - CPackageManagerCLIHandler::ExecuteCmdLine
- The log file that you will find back in in
dism.log
:C:\Windows\Logs\CBS\CBS.log
(or better%WINDIR%\logs\CBS\cbs.log
) which is a lot in the context around the above timestamp:
2021-12-17 19:41:32, Info CBS FLOW: Entering stage: CheckStagedPackages 2021-12-17 19:41:34, Info CBS Appl:Feature On Demand package without explicit comparator, using GE on build version 2021-12-17 19:41:34, Info CBS Appl:Feature On Demand package without explicit comparator, using GE on build version 2021-12-17 19:41:35, Info CBS Package Format: PSFX 2021-12-17 19:41:35, Info CBS Package Format: PSFX 2021-12-17 19:41:35, Info CBS Package Format: PSFX 2021-12-17 19:41:35, Info CBS Appl:LCU package and revision compare set to explicit 2021-12-17 19:41:35, Info CBS Package Format: PSFX 2021-12-17 19:41:35, Info CBS Repr: Staged package check completes 2021-12-17 19:41:35, Info CBS Exec: Not able to find Package_1_for_KB5004331~31bf3856ad364e35~amd64~~10.0.4400.1.mum from directory local source 2021-12-17 19:41:35, Info CBS Exec: Not able to find Servicing\Packages\Package_1_for_KB5004331~31bf3856ad364e35~amd64~~10.0.4400.1.mum from directory local source 2021-12-17 19:41:35, Info CBS Exec: Not able to find update.mum from directory local source 2021-12-17 19:41:35, Info CBS Exec: Not able to find Servicing\Packages\update.mum from directory local source 2021-12-17 19:41:35, Info CBS Repr: Not able to find replacement manifests for package Package_1_for_KB5004331~31bf3856ad364e35~amd64~~10.0.4400.1 from any local source 2021-12-17 19:41:35, Info CBS Exec: Download qualification evaluation, business scenario: Manual Corruption Repair 2021-12-17 19:41:35, Info CBS Exec: Clients specified using local source only. 2021-12-17 19:41:35, Info CBS Repr: The system configuration is not qualified for Windows Update download, skip WU. 2021-12-17 19:41:35, Info CBS Failed to collect payload and there is nothing to repair. [HRESULT = 0x800f081f - CBS_E_SOURCE_MISSING] 2021-12-17 19:41:35, Info CBS FLOW: Entering stage: RemoveStagedPackages 2021-12-17 19:41:35, Info CBS Failed to repair store. [HRESULT = 0x800f081f - CBS_E_SOURCE_MISSING] 2021-12-17 19:41:35, Info CBS 2021-12-17 19:41:35, Info CBS ================================= 2021-12-17 19:41:35, Info CBS Checking System Update Readiness. 2021-12-17 19:41:35, Info CBS 2021-12-17 19:41:35, Info CBS (p) CBS Catalog Missing (n) Package_1_for_KB5004331~31bf3856ad364e35~amd64~~10.0.4400.1 2021-12-17 19:41:35, Info CBS Repair failed: Missing replacement mum/cat pair. 2021-12-17 19:41:35, Info CBS 2021-12-17 19:41:35, Info CBS Summary: 2021-12-17 19:41:35, Info CBS Operation: Detect and Repair 2021-12-17 19:41:35, Info CBS Operation result: 0x800f081f 2021-12-17 19:41:35, Info CBS Last Successful Step: Remove staged packages completes. 2021-12-17 19:41:35, Info CBS Total Detected Corruption: 1 2021-12-17 19:41:35, Info CBS CBS Manifest Corruption: 1 2021-12-17 19:41:35, Info CBS CBS Metadata Corruption: 0 2021-12-17 19:41:35, Info CBS CSI Manifest Corruption: 0 2021-12-17 19:41:35, Info CBS CSI Metadata Corruption: 0 2021-12-17 19:41:35, Info CBS CSI Payload Corruption: 0 2021-12-17 19:41:35, Info CBS Total Repaired Corruption: 0 2021-12-17 19:41:35, Info CBS CBS Manifest Repaired: 0 2021-12-17 19:41:35, Info CBS CSI Manifest Repaired: 0 2021-12-17 19:41:35, Info CBS CSI Payload Repaired: 0 2021-12-17 19:41:35, Info CBS CSI Store Metadata refreshed: False 2021-12-17 19:41:35, Info CBS Staged Packages: 2021-12-17 19:41:35, Info CBS CBS Staged packages: 0 2021-12-17 19:41:35, Info CBS CBS Staged packages removed: 0 2021-12-17 19:41:35, Info CBS 2021-12-17 19:41:35, Info CBS Total Operation Time: 308 seconds. 2021-12-17 19:41:35, Info CBS Ensure WCP corruption flag is clear 2021-12-17 19:41:35, Info CBS All CSI corruption was fixed, ensure CorruptionDetectedDuringAcr is clear 2021-12-17 19:41:35, Info CBS Failed to clear CorruptionDetectedDuringAcr store corrupt flag (slow mode trigger). [HRESULT = 0x80070002 - ERROR_FILE_NOT_FOUND] 2021-12-17 19:41:35, Info CBS CheckSur: hrStatus: 0x800f081f [CBS_E_SOURCE_MISSING], download results: 2021-12-17 19:41:35, Info CBS Count of times corruption detected: 1 2021-12-17 19:41:35, Info CBS Seconds between initial corruption detections: -1 2021-12-17 19:41:35, Info CBS Seconds between corruption and repair: -1 2021-12-17 19:41:35, Info CBS Failed to run Detect and repair. [HRESULT = 0x800f081f - CBS_E_SOURCE_MISSING] 2021-12-17 19:41:36, Info CBS Reboot mark cleared 2021-12-17 19:41:36, Info CBS Winlogon: Simplifying Winlogon CreateSession notifications 2021-12-17 19:41:36, Info CBS Winlogon: Deregistering for CreateSession notifications 2021-12-17 19:41:36, Info CBS Exec: Processing complete, session(Corruption Repairing): 30929781_11880646 [HRESULT = 0x800f081f - CBS_E_SOURCE_MISSING] 2021-12-17 19:41:36, Error CBS Session: 30929781_11880646 failed to perform store corruption detect and repair operation. [HRESULT = 0x800f081f - CBS_E_SOURCE_MISSING] 2021-12-17 19:41:36, Info CBS Session: 30929781_11880646 finalized. Reboot required: no [HRESULT = 0x800f081f - CBS_E_SOURCE_MISSING] 2021-12-17 19:41:36, Info CBS Failed to FinalizeEx using worker session [HRESULT = 0x800f081f] 2021-12-17 19:41:36, Info CBS Deleting directory: \\?\C:\WINDOWS\CbsTemp\30929781_11880646\ 2021-12-17 19:41:36, Info CBS Moving directory from \\?\C:\WINDOWS\CbsTemp\30929781_11880646\ to \\?\C:\WINDOWS\CbsTemp\30929781_11880646\{C579026D-0F50-4DD2-8B5D-9B8A738CF811} 2021-12-17 19:41:36, Info CBS Failed to move \\?\C:\WINDOWS\CbsTemp\30929781_11880646\ to temp directory \\?\C:\WINDOWS\CbsTemp\30929781_11880646\{C579026D-0F50-4DD2-8B5D-9B8A738CF811} [HRESULT = 0x80070020 - ERROR_SHARING_VIOLATION] 2021-12-17 19:41:36, Info CBS Failed moving directory: \\?\C:\WINDOWS\CbsTemp\30929781_11880646\ to temp, will delete in-place instead [HRESULT = 0x80070020 - ERROR_SHARING_VIOLATION] 2021-12-17 19:41:36, Info CBS Deletion of: \\?\C:\WINDOWS\CbsTemp\30929781_11880646\ successful 2021-12-17 19:43:37, Info CBS Trusted Installer is shutting down because: SHUTDOWN_REASON_AUTOSTOP 2021-12-17 19:43:37, Info CBS TiWorker signaled for shutdown, going to exit.
So the culprit seems to be KB5004331
**, which lead me to uninstalling/reinstalling it. That was a tad more difficult than anticipated, as KB5004331
was not present in the installation history ([Wayback/Archive] Problems after KB5004331 update – Microsoft Community suggested it would) to uninstall.
Given the file dates of files similar to Package_1_for_KB5004331~31bf3856ad364e35~amd64~~10.0.4400.1.mum
, my best guess was that it got installed at or slightly prior to the August 2021 Patch Tuesday, and indeed it was [Wayback/Archive] August Patch Tuesday update breakdown.
So I hoped I could work my way backwards uninstalling n the reverse order:
- KB5007289
- KB5006365
- Servicing Stack 10.0.19041.1371
- KB5007186
- Servicing Stack 10.0.19041.1310
- Servicing Stack 10.0.19041.1220
- Servicing Stack 10.0.19041.1371
Well, that is impossible as per [Wayback/Archive] Servicing stack updates – Windows Deployment | Microsoft Docs:
Once a servicing stack update is installed, it cannot be removed or uninstalled from the machine.
Now my options had become very limited: my image backup schedule didn’t go this far back, so restoring wasn’t an option.
So I reverted to searching the Super User site which in the past helped me big time, though over recent years most Windows activity seems to have gone to answers.microsoft.com
.
Anyway: [Wayback/Archive] 0x800f081f site:superuser.com – Google Search immediately got me to [Wayback/Archive] Can’t run Windows Update: error 0x800f081f – Super User, with an answer pointing me to [Wayback/Archive] [Fix] DISM and .NET Framework 3.5 Error 0x800F081F » Winhelponline which mentioned you could also download a Windows 10 ISO (I already wrote about changing the web browser’s User Agent to do that in Force downloading Windows 10 ISOs instead of Media Creation Tool), then slipstream any updates, and use the resulting image as a source.
I skipped the slipstream part (if I ever want to: [Wayback/Archive] Slipstream Windows 10: Integrate Updates with Original Setup Disk » Winhelponline describes how to accomplish this using either NTLite or [Wayback/Archive] DISM GUI – which has unmaintained source code on GitHub at [Wayback/Archive] mikecel79/DISMGUI: DISM GUI is a graphical interface for the DISM command line utility written in the .NET. DISM GUI allows you to mount and dismount WIMs, manager drivers, features and packages.).
After downloading the Win10_21H2_English_x64.iso
and mounting it to the E: drive, I used to dism /Get-WimInfo /WimFile:"E:\sources\install.wim"
which showed index 10 was for “Windows 10 Pro for Workstations” and dism /Get-WimInfo /WimFile:"E:\sources\install.wim" /Index:10
showing the details for it.
Now I could fix the Windows installation running dism /Online /Cleanup-Image /RestoreHealth /Source:wim:"E:\Sources\Install.wim":10 /LimitAccess
The /LimitAccess
part would ensure only the wim
image was used.
Later I found out that [Wayback/Archive] .NET Framework 3.5 installation errors – Windows Client | Microsoft Docs had similar steps. Good to know it is somewhere on the Microsoft site as well (:
Updates now installed:
- KB5007289
- KB5008212
–jeroen
- see:
- [Wayback/Archive] December 14, 2021—KB5008212 (OS Builds 19041.1415, 19042.1415, 19043.1415, and 19044.1415)
- [Wayback/Archive] Microsoft Update Catalog: KB5008212
** see:
- [Wayback/Archive] August 10, 2021-KB5004331 Cumulative Update for .NET Framework 3.5 and 4.8 for Windows 10, version 2004, Windows Server, version 2004, Windows 10, version 20H2, and Windows Server, version 20H2, and Windows Version 21H1
- [Wayback/Archive] Microsoft Update Catalog: KB5004331
Leave a Reply