Error Medic

Windows Stop Code 0xC000021A on Windows 10: Complete Fix Guide

Fix Windows stop code 0xC000021A on Windows 10 with step-by-step solutions: Startup Repair, SFC, DISM, safe mode registry edits, and system restore.

Last updated:
Last verified:
2,084 words
Key Takeaways
  • Root cause 1: Corrupted or mismatched system files — winlogon.exe or csrss.exe have become damaged or replaced by incompatible versions, causing the Windows Session Manager to terminate unexpectedly during boot.
  • Root cause 2: Failed Windows Update or driver installation — a botched update or third-party driver has broken critical subsystem dependencies, triggering the fatal system error 0xC000021A (STATUS_SYSTEM_PROCESS_TERMINATED).
  • Root cause 3: Registry corruption — incorrect registry entries, often from malware or abrupt shutdowns, prevent essential user-mode subsystems from initialising, forcing the kernel to issue a BSOD with stop code 0xC000021A.
  • Quick fix summary: Boot into Windows Recovery Environment (WinRE), run Startup Repair first, then use SFC /scannow and DISM /RestoreHealth from a command prompt. If those fail, restore the registry hives from RegBack or perform a System Restore. As a last resort, use Reset This PC while keeping your files.
Fix Approaches Compared
MethodWhen to UseTimeRisk
Automatic Startup Repair (WinRE)First attempt — catches most boot-loader and file corruption issues automatically5–15 minLow
SFC /scannow (System File Checker)When specific system files are suspected corrupt; run after booting to safe mode or WinRE CMD10–20 minLow
DISM /RestoreHealthWhen SFC reports it cannot fix files; requires internet or mounted ISO as source20–45 minLow
Registry Hive Restore from RegBackWhen error appeared after a registry change or update; restores previous registry state10–20 minMedium — can break apps installed after backup
System RestoreWhen a known good restore point exists before the error started occurring20–40 minMedium — rolls back drivers and updates
Repair Install (In-place Upgrade)When SFC and DISM both fail to resolve corruption; preserves files and settings60–120 minLow–Medium
Reset This PC (Keep My Files)When all other methods fail; reinstalls Windows while attempting to keep personal files60–180 minMedium — apps must be reinstalled
Clean InstallWhen Reset fails or drive integrity is suspect; start fresh90–180 minHigh — all data lost unless backed up

Understanding Windows Stop Code 0xC000021A

When Windows 10 displays a blue screen with the message "Your PC ran into a problem and needs to restart" and lists the stop code 0xC000021A (also written as 0xc00021a), it means the Windows kernel has detected that a critical user-mode subsystem has terminated unexpectedly. Specifically, this is the NT status code STATUS_SYSTEM_PROCESS_TERMINATED.

The two processes most commonly involved are:

  • winlogon.exe — handles the Windows logon/logoff sequence.
  • csrss.exe — the Client/Server Runtime Subsystem, responsible for the Win32 console and GUI shutdown.

If either process exits or crashes before the kernel expects it to, Windows has no safe recovery path and triggers the fatal stop. The full error on screen typically reads:

STOP: 0xC000021A {Fatal System Error}
The Windows SubSystem process terminated unexpectedly with a status of 0x00000000 (0x00000000 0x00000000).
The system has been shut down.

The hex values in parentheses vary per incident and can help pinpoint the offending module in an advanced analysis with WinDbg.


Step 1: Access Windows Recovery Environment (WinRE)

Because the error occurs before Windows fully loads, you must work from the recovery environment.

Method A — Automatic trigger: If Windows fails to boot three times in a row, it automatically boots into WinRE. Force this by pressing and holding the power button during the Windows loading animation on three successive boots.

Method B — Bootable USB: Create a Windows 10 installation USB using the Media Creation Tool from a working PC, boot from it, choose your language, then click "Repair your computer" instead of Install.

Once in WinRE, navigate to: Troubleshoot → Advanced options


Step 2: Run Automatic Startup Repair

From Advanced options, select Startup Repair. Windows will scan boot sectors, the BCD store, and critical system files. This resolves roughly 40% of 0xC000021A cases with no further action required.

If Startup Repair reports it cannot fix the problem, proceed to Step 3.


Step 3: Run SFC and DISM from WinRE Command Prompt

From Advanced options → Command Prompt, identify your Windows drive letter (it may not be C:\ inside WinRE) and run the following commands:

:: Identify the correct Windows drive
dir C:\
dir D:\

:: Run System File Checker (replace D: with your actual Windows drive if different)
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows

:: Run DISM to repair the component store
Dism /Image:C:\Windows /Cleanup-Image /CheckHealth
Dism /Image:C:\Windows /Cleanup-Image /ScanHealth
Dism /Image:C:\Windows /Cleanup-Image /RestoreHealth

After these complete, type exit and restart. If the error persists, continue to Step 4.


Step 4: Restore Registry Hives from RegBack

Windows periodically backs up registry hives to C:\Windows\System32\config\RegBack. If a corrupt registry is causing the 0xC000021A error, replacing the live hives with these backups can resolve it.

Warning: This will undo registry changes made since the last backup — typically the last time Windows booted successfully.

From the WinRE Command Prompt:

:: Navigate to the config folder
cd C:\Windows\System32\config

:: Create a backup of the current (broken) hives
mkdir C:\RegBackup
copy *.* C:\RegBackup\

:: Copy the RegBack hives over the current ones
copy C:\Windows\System32\config\RegBack\SYSTEM C:\Windows\System32\config\SYSTEM
copy C:\Windows\System32\config\RegBack\SOFTWARE C:\Windows\System32\config\SOFTWARE
copy C:\Windows\System32\config\RegBack\SAM C:\Windows\System32\config\SAM
copy C:\Windows\System32\config\RegBack\SECURITY C:\Windows\System32\config\SECURITY
copy C:\Windows\System32\config\RegBack\DEFAULT C:\Windows\System32\config\DEFAULT

Type exit and restart.


Step 5: Use System Restore

If restore points exist, this is one of the safest ways to recover:

  1. From WinRE Advanced options, choose System Restore.
  2. Select a restore point dated before the error first appeared.
  3. Click Scan for affected programs to review what will be rolled back.
  4. Confirm and wait for the restore to complete (10–40 minutes).

Step 6: Perform a Repair (In-Place Upgrade) Install

A repair install replaces all Windows system files with fresh copies while preserving your personal files, applications, and most settings.

  1. Boot from a Windows 10 USB (same version/build as your installed OS).
  2. Start setup, choose Upgrade, and accept the prompts.
  3. Ensure "Keep personal files and apps" is selected on the summary screen.
  4. Allow the process to complete (60–120 minutes).

This is the most thorough non-destructive fix and resolves virtually all file-level and subsystem corruption causing 0xC000021A.


Step 7: Reset This PC or Clean Install (Last Resort)

If all else fails:

  • Reset This PC (Keep My Files): WinRE → Troubleshoot → Reset this PC → Keep my files.
  • Clean Install: Boot from USB, choose custom installation, format the drive, and reinstall from scratch.

Always back up important data before performing these operations — use a Linux live USB to copy files off the drive if Windows is inaccessible.


Advanced: Analyse the Minidump with WinDbg

For recurring or complex cases, analyse the crash dump located at C:\Windows\Minidump\ or C:\Windows\MEMORY.DMP using WinDbg from the Windows SDK:

windbg -y srv*c:\symbols*https://msdl.microsoft.com/download/symbols -z C:\Windows\Minidump\<dumpfile.dmp>
!analyze -v

The !analyze -v output will identify the faulting module, the exception address, and the thread stack, giving you a precise target for the fix.


Preventing Future Occurrences

  • Enable System Protection on the C:\ drive to create automatic restore points.
  • Use Windows Update on a stable schedule and avoid forcefully powering off during updates.
  • Keep third-party antivirus and driver software up to date.
  • Run sfc /scannow monthly from an elevated command prompt as a health check.
  • Maintain a bootable Windows 10 USB for emergency access.

Frequently Asked Questions

bash
:: ============================================================
:: Windows Stop Code 0xC000021A - Diagnostic & Fix Commands
:: Run from WinRE Command Prompt or elevated CMD in Safe Mode
:: ============================================================

:: --- 1. Identify Windows drive letter inside WinRE ---
dir C:\
dir D:\
:: Look for the drive that contains \Windows folder

:: --- 2. Run System File Checker (offline mode from WinRE) ---
:: Replace C: with your actual Windows drive letter if different
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows

:: --- 3. Run SFC in normal Windows (if you can reach Safe Mode) ---
sfc /scannow

:: --- 4. DISM health checks and repair ---
Dism /Online /Cleanup-Image /CheckHealth
Dism /Online /Cleanup-Image /ScanHealth
Dism /Online /Cleanup-Image /RestoreHealth

:: Offline DISM repair using mounted Windows ISO as source
:: (replace D: with the drive letter of your mounted/USB ISO)
Dism /Image:C:\Windows /Cleanup-Image /RestoreHealth /Source:D:\Sources\install.wim

:: --- 5. Check and repair Boot Configuration Data (BCD) ---
bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd

:: --- 6. Check disk for errors on the Windows volume ---
chkdsk C: /f /r /x

:: --- 7. Restore registry hives from RegBack ---
cd C:\Windows\System32\config
mkdir C:\RegBackup
copy *.* C:\RegBackup\
copy C:\Windows\System32\config\RegBack\SYSTEM C:\Windows\System32\config\SYSTEM /Y
copy C:\Windows\System32\config\RegBack\SOFTWARE C:\Windows\System32\config\SOFTWARE /Y
copy C:\Windows\System32\config\RegBack\SAM C:\Windows\System32\config\SAM /Y
copy C:\Windows\System32\config\RegBack\SECURITY C:\Windows\System32\config\SECURITY /Y
copy C:\Windows\System32\config\RegBack\DEFAULT C:\Windows\System32\config\DEFAULT /Y

:: --- 8. Verify winlogon.exe and csrss.exe are intact ---
:: Should both return a valid hash, not "Access Denied" or "File Not Found"
certutil -hashfile C:\Windows\System32\winlogon.exe SHA256
certutil -hashfile C:\Windows\System32\csrss.exe SHA256

:: --- 9. Check event logs for subsystem termination details ---
:: Run in normal Windows or safe mode with networking
wevtutil qe System /c:20 /rd:true /f:text | findstr /i "0xc000021a critical"

:: --- 10. Open crash dump in WinDbg (install Windows SDK first) ---
:: Replace <dumpfile.dmp> with actual filename from C:\Windows\Minidump\
windbg -y "srv*C:\Symbols*https://msdl.microsoft.com/download/symbols" -z "C:\Windows\Minidump\<dumpfile.dmp>"
:: Then in WinDbg console:
::   !analyze -v
::   lmvm winlogon
::   lmvm csrss

:: --- 11. Re-register core DLLs (run in safe mode CMD as Admin) ---
regsvr32 /s C:\Windows\System32\winsrv.dll
regsvr32 /s C:\Windows\System32\basesrv.dll

:: ============================================================
:: After any of the above, restart and test normal boot
:: ============================================================
E

Error Medic Editorial

The Error Medic Editorial team is composed of senior DevOps engineers, SREs, and Windows system administrators with a combined 40+ years of experience diagnosing and resolving OS-level failures across enterprise and consumer environments. Our guides are built on real incident data, official Microsoft documentation, and hands-on lab testing to ensure every recommended fix is accurate, actionable, and safe to execute.

Sources

Related Articles in Windows 10 Windows Stop Code

Explore More windows Guides