Understanding the CBS log & repairing corrupt files


  1. Posts : 897
    windows 10 professional 64-bit, 21H2
       #1

    Understanding the CBS log & repairing corrupt files


    I've been getting some event errors lately, in particular 2 errors.

    Date: 10/21/2019 8:54:17 AM
    Type: ErrorEvent: 1020Source: Microsoft-Windows-Perflib

    The required buffer size is greater than the buffer size passed to the Collect function of the "C:\Windows\System32\perfts.dll" Extensible Counter DLL for the "LSM" service. The given buffer size was 34008 and the required size was 45368.

    Date: 10/21/2019 2:07:45 PM
    Type: WarningEvent: 1008Source: Microsoft-Windows-Perflib

    The Open procedure for service ".NETFramework" in DLL "C:\WINDOWS\system32\mscoree.dll" failed with error code The system cannot find the file specified.. Performance data for this service will not be available.

    So I went to https://support.microsoft.com/en-us/...rrupted-system and ran

    sfc /scannow

    I got the message:
    Windows Resource Protection found corrupt files but was unable to fix some of them.For online repairs, details are included in the CBS log file located at windir\Logs\CBS\CBS.log.

    I tried to follow the rest of the steps listed on the support page, but got lost in the details.

    1. When I used an elevated Powershell & ran the suggested command, I got:

    PS C:\> findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"

    out-file : Could not find a part of the path 'C:\%userprofile%\Desktop\sfcdetails.txt'.At line:1 char:1+ findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\s ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OpenError: (:) [Out-File], DirectoryNotFoundException + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand

    2. I manually went to C:\Windows\Logs\CBS & opened CBS.log.There was so much detail that I couldn't follow what was corrupt. I've attached the log.

    I would appreciate anyone telling me what files are corrupt & how to replace them. Thank you in advance!
      My Computers


  2. Posts : 25,076
    10 Home x64 (21H2) (10 Pro on 2nd pc)
       #2

    phrab said:
    I manually went to C:\Windows\Logs\CBS & opened CBS.log.There was so much detail that I couldn't follow what was corrupt...

    ...would appreciate anyone telling me what files are corrupt & how to replace them. Thank you in advance!
    Option Five in this tutorial tell you how to view just the results from SFC (there's a lot more in there besides SFC's results).

    Run SFC Command in Windows 10

    Looking at yours, the so-called corrupt files are due to a known bug in older Windows Defender Platform updates. This bug has been fixed now for the latest updates, but you should still make repairs. To do that, use DISM's /RestoreHealth option.

    Use DISM to Repair Windows 10 Image
      My Computers


  3. Posts : 897
    windows 10 professional 64-bit, 21H2
    Thread Starter
       #3

    Thank you so much for your help! I ran:

    Repair-WindowsImage -Online -RestoreHealth


    Windows Resource Protection found corrupt files and successfully repaired them.
    For online repairs, details are included in the CBS log file located at
    windir\Logs\CBS\CBS.log. For example C:\Windows\Logs\CBS\CBS.log. For offline
    repairs, details are included in the log file provided by the /OFFLOGFILE flag.

    I then rebooted.

    Then I ran:
    c:\>sfc /scannow

    Beginning system scan. This process will take some time.

    Beginning verification phase of system scan.
    Verification 100% complete.

    Windows Resource Protection found corrupt files and successfully repaired them.
    For online repairs, details are included in the CBS log file located at
    windir\Logs\CBS\CBS.log. For example C:\Windows\Logs\CBS\CBS.log. For offline
    repairs, details are included in the log file provided by the /OFFLOGFILE flag.

    Then I ran:
    PS C:\> Repair-WindowsImage -Online -CheckHealth

    Path :
    Online : True
    ImageHealthState : Healthy
    RestartNeeded : False

    PS C:\> Repair-WindowsImage -Online -ScanHealth


    Path :
    Online : True
    ImageHealthState : Healthy
    RestartNeeded : False

    I am not sure whether the corrupted files were repaired or not because the "Repair-WindowsImage -Online -RestoreHealth" said it made repairs & then sfc /scannow said it found & made repairs.

    I did notice that I ran all these from C:\ & Brink's tutorial has it run from C:\Windows\System32. I don't know if that makes a difference.

    Does it look like my files should be OK now or is there something else I should do to check?
      My Computers


  4. Posts : 25,076
    10 Home x64 (21H2) (10 Pro on 2nd pc)
       #4

    phrab said:
    I am not sure whether the corrupted files were repaired or not because the "Repair-WindowsImage -Online -RestoreHealth" said it made repairs & then sfc /scannow said it found & made repairs....
    ...Does it look like my files should be OK now or is there something else I should do to check?

    SFC failed to repair the system the first time because the files in the Component Store (WinSxS) were also corrupt. DISM repaired the Component Store, then SFC could repair the system from the Component Store.

    You have done all that was needed.
      My Computers


  5. Posts : 897
    windows 10 professional 64-bit, 21H2
    Thread Starter
       #5

    Event Error 1008 intermittently occurs


    I thought everything was solved, but today I got the same error:
    Date: 11/2/2019 10:24:36 AMType: WarningEvent: 1008Source: Microsoft-Windows-PerflibThe Open procedure for service ".NETFramework" in DLL "C:\WINDOWS\system32\mscoree.dll" failed with error code The system cannot find the file specified.. Performance data for this service will not be available.

    I ran Repair-WindowsImage -Online -RestoreHealth at an elevated Powershell prompt & ran
    sfc /scannow

    Neither showed any corruption.

    This was after I installed 2019-10 Cumulative Update for .NET Framework 3.5 and 4.8 for Windows 10 Version 1903 for x64 (KB4522741).

    Edited on 2/16/21: I don't get these errors any more, so I'm going to mark this solved. It was probably fixed by some update.
    Last edited by phrab; 16 Feb 2021 at 16:19.
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 03:44.
Find Us




Windows 10 Forums