Because I’ve seen this question asked in many places and not answered, I thought I’d post my issue and resolution here. I regard this as a Bug, but I’m not invested enough to deal with the support incident process.
I’ve had repeated instances where a Windows 7 x64 client runs out of hard drive space, and found that C:\Windows\TEMP is being consumed with hundreds of files with names following the pattern “cab_XXXX_X”, generally 100 MB each, and these files are constantly generated until the system runs out of space. Upon removing the files & rebooting, the files start being generated again.
I’ve found that this is caused by large Component-Based Servicing logs. These are stored at C:\Windows\Logs\CBS. The current log file is named “cbs.log”. When “cbs.log” reaches a certain size, a cleanup process renames the log to “CbsPersist_YYYYMMDDHHMMSS.log” and then attempts to compress it into a .cab file.
However, when the cbs.log reaches a size of 2 GB before that cleanup process compresses it, the file is to large to be handled by the makecab.exe utility. The log file is renamed to CbsPersist_date_time.log, but when the makecab process attempts to compress it the process fails (but only after consuming some 100 MB under \Windows\Temp). After this, the cleanup process runs repeatedly (approx every 20 minutes in my experience). The process fails every time, and also consumes a new ~ 100 MB in \Windows\Temp before dying. This is repeated until the system runs out of drive space.
This can be reproduced by trying to manually create the cab file –
Directory of C:\CBS-BAK
12/11/2019 12:28 PM <DIR> .
12/11/2019 12:28 PM <DIR> ..
12/11/2019 12:12 PM 2,491,665,966 CbsPersist_20150823021618.log
Cabinet Maker – Lossless Data Compression Tool
86.19% – CbsPersist_20150823021618.log (1 of 1)
ERROR: (FCIAddFile)Data-size or file-count exceeded CAB format limits
Volume in drive C is OSDisk
Volume Serial Number is 44DE-0CDD
Directory of C:\Users\USERNAME\AppData\Local\Temp
08/26/2015 02:31 PM 102,786,654 cab_4556_2
12/11/2019 12:28 PM 12,978,919 cab_5860_2
12/11/2019 12:27 PM 0 cab_5860_3
To resolve this –
Stop the Windows Modules Installer (TrustedInstaller) service
Delete or move the large Cbspersist_XX.log file out of \Windows\Logs\CBS.
Start the Windows Modules Installer (TrustedInstaller) service