Windows Stop Code 0xC000021A on Windows 10: Complete Fix Guide
Fix Windows Stop Code 0xC000021A on Windows 10. Step-by-step solutions including SFC, DISM, Safe Mode, and System Restore to resolve this fatal BSOD error.
- Root Cause 1: Corrupted or mismatched system files — specifically winlogon.exe or csrss.exe — trigger a fatal subsystem failure, causing the 0xC000021A stop code.
- Root Cause 2: A failed Windows Update, incompatible third-party driver, or recently installed software can overwrite critical system binaries and produce this BSOD on Windows 10.
- Root Cause 3: Corrupted Windows Registry hives or user-mode subsystem (CSRSS) crashes due to disk errors or bad RAM can also cause this stop code.
- Quick Fix Summary: Boot into Safe Mode or Windows Recovery Environment (WinRE), run SFC /scannow and DISM /RestoreHealth to repair system files, roll back recent updates or drivers, and if necessary perform a Startup Repair or System Restore. In worst-case scenarios, a clean Windows 10 install is required.
| Method | When to Use | Time | Risk |
|---|---|---|---|
| SFC /scannow (System File Checker) | Corrupted or missing Windows system files detected | 10-20 min | Low |
| DISM /RestoreHealth | SFC fails or reports it cannot fix files; Windows image corruption | 15-30 min | Low |
| Startup Repair (WinRE) | PC cannot boot at all; boot files are damaged | 10-20 min | Low |
| System Restore | Error started after a recent update, driver, or software install | 15-30 min | Low — reverts system changes |
| Roll Back Windows Update | BSOD appeared immediately after a cumulative or feature update | 10-20 min | Low |
| Driver Rollback / Uninstall | Error triggered after a specific driver update | 5-15 min | Low-Medium |
| Check Disk (chkdsk) | Suspected bad sectors or disk-level file corruption | 20-60 min | Low |
| Memory Diagnostic (mdsched) | Suspected bad RAM modules causing subsystem crashes | 30-60 min | Low |
| Reset This PC (Keep Files) | All software-level fixes have failed; want to preserve data | 45-90 min | Medium |
| Clean Windows 10 Install | Severe corruption; Reset This PC also fails; last resort | 60-120 min | High — data loss possible |
Understanding the Windows Stop Code 0xC000021A
When Windows 10 displays a Blue Screen of Death (BSOD) with the stop code 0xC000021A (also written as 0xc00021a), the exact message you will see on screen is:
Your PC ran into a problem and needs to restart.
Stop code: 0xC000021A
This stop code maps to STATUS_SYSTEM_PROCESS_TERMINATED, a fatal error thrown when the Windows Session Manager Subsystem (smss.exe) detects that either winlogon.exe (the Windows logon process) or csrss.exe (the Client/Server Runtime Subsystem) has terminated unexpectedly or returned an error code. Because these are essential user-mode subsystems, Windows cannot safely continue and forces an immediate shutdown.
Why This Is Different From Other BSODs
Most BSODs originate in kernel-mode drivers. The 0xC000021A error is unique because it originates in user-mode space — specifically in processes that the kernel considers non-negotiable for operation. When they die, the OS has no recovery path and must halt.
Common triggers include:
- A Windows Update that partially replaced system DLLs
- Incompatible antivirus or security software that hooks into winlogon.exe
- Corrupted Windows Registry hives (especially SYSTEM and SOFTWARE)
- A failing hard drive or SSD with bad sectors affecting system files
- Defective RAM producing sporadic memory corruption
- Third-party software that modifies Graphical Identification and Authentication DLL (msgina.dll) on older systems
Step 1: Boot Into Safe Mode or Windows Recovery Environment
If your PC is stuck in a BSOD loop and cannot reach the desktop, you must first access a recovery environment.
Method A — Trigger WinRE automatically: Force-shut down the PC three times in a row during the Windows logo screen. On the third restart, Windows 10 should automatically launch the Windows Recovery Environment (WinRE) and display "Preparing Automatic Repair."
Method B — Use a Windows 10 USB installer:
- Boot from the Windows 10 installation media.
- Click Next on the language screen, then Repair your computer (bottom-left).
- Navigate to Troubleshoot → Advanced options.
Method C — Boot into Safe Mode from WinRE:
- In WinRE, go to Troubleshoot → Advanced options → Startup Settings → Restart.
- Press 4 or F4 for Safe Mode, or 5 / F5 for Safe Mode with Networking.
Step 2: Run System File Checker (SFC)
Once inside Safe Mode or a Command Prompt via WinRE, run the System File Checker to scan and repair corrupted protected system files.
Open an elevated Command Prompt and run:
sfc /scannow
Wait for the scan to complete (it scans 100% of protected files). Possible outcomes:
- "Windows Resource Protection did not find any integrity violations." — System files are intact; proceed to other fixes.
- "Windows Resource Protection found corrupt files and successfully repaired them." — Reboot and check if the error is resolved.
- "Windows Resource Protection found corrupt files but was unable to fix some of them." — Proceed immediately to DISM.
SFC logs are saved to: C:\Windows\Logs\CBS\CBS.log
Step 3: Run DISM to Repair the Windows Image
If SFC cannot repair files, the Windows Component Store (WinSxS) itself may be corrupted. DISM (Deployment Image Servicing and Management) can restore it using Windows Update servers.
Run these commands in sequence:
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth
The /RestoreHealth switch downloads and replaces corrupted components directly from Microsoft servers — ensure you have an internet connection. After DISM completes, run sfc /scannow again to verify all files are now repaired.
Step 4: Run Check Disk to Find Bad Sectors
Disk-level corruption is a major cause of 0xC000021A. Run chkdsk to scan your system drive:
chkdsk C: /f /r /x
/f— fixes file system errors/r— locates bad sectors and recovers readable data/x— forces the volume to dismount first
You may be prompted to schedule the scan for the next reboot. Type Y and restart. The scan can take 30-60 minutes depending on drive size.
Step 5: Run Windows Memory Diagnostic
Bad RAM can silently corrupt in-memory data structures for csrss.exe or winlogon.exe, producing this stop code. Test your memory:
mdsched.exe
Choose Restart now and check for problems. After the scan, check Event Viewer → System logs for results from the MemoryDiagnostics-Results source.
Alternatively, use Memtest86 (bootable USB) for a more thorough multi-pass test.
Step 6: Roll Back Recent Windows Updates
If the BSOD started after a Windows Update, uninstall the most recent update:
- Boot into Safe Mode.
- Open Settings → Update & Security → View Update History → Uninstall Updates.
- Sort by date and uninstall the most recent Cumulative Update.
- Restart and test.
Alternatively, from WinRE: Troubleshoot → Advanced options → Uninstall Updates → Uninstall latest quality update.
Step 7: Use System Restore
If System Restore was enabled before the error occurred:
- From WinRE: Troubleshoot → Advanced options → System Restore.
- Select a restore point dated before the BSOD first appeared.
- Follow the prompts and allow the restore to complete.
System Restore does not affect personal files but removes apps, drivers, and updates installed after the restore point.
Step 8: Startup Repair
If boot files are damaged:
- From WinRE: Troubleshoot → Advanced options → Startup Repair.
- Let Windows automatically diagnose and attempt repairs.
You can also manually rebuild the BCD (Boot Configuration Data) from an elevated command prompt:
bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd
Step 9: Reset This PC or Clean Install
If all above steps fail, your last options are:
Reset This PC (Keep Files):
- WinRE → Troubleshoot → Reset this PC → Keep my files → Cloud download (recommended) or Local reinstall.
Clean Install:
- Boot from Windows 10 USB media, delete all partitions, and perform a fresh installation. Back up all data first.
Prevention Tips
- Keep Windows Update enabled and install updates regularly.
- Always create a System Restore point before installing major software or drivers.
- Use Windows Defender instead of aggressive third-party AV tools that hook system processes.
- Monitor drive health with CrystalDiskInfo or vendor tools (e.g., Samsung Magician, Seagate SeaTools).
- Run
sfc /scannowmonthly as a preventive health check.
Frequently Asked Questions
# ============================================================
# Windows Stop Code 0xC000021A - Diagnostic & Fix Commands
# Run from an elevated Command Prompt (Admin) or WinRE CMD
# ============================================================
# --- STEP 1: System File Checker ---
# Scans and repairs protected Windows system files
sfc /scannow
# View SFC log for detailed results
type C:\Windows\Logs\CBS\CBS.log | findstr /c:"[SR]"
# --- STEP 2: DISM Component Store Repair ---
# Check image health
DISM /Online /Cleanup-Image /CheckHealth
# Scan image for corruption
DISM /Online /Cleanup-Image /ScanHealth
# Restore health using Windows Update (requires internet)
DISM /Online /Cleanup-Image /RestoreHealth
# Restore health using local Windows ISO (offline, no internet needed)
# Mount your Windows 10 ISO first, then replace D: with your mount drive letter
DISM /Online /Cleanup-Image /RestoreHealth /Source:D:\Sources\install.wim /LimitAccess
# Run SFC again after DISM completes
sfc /scannow
# --- STEP 3: Check Disk for Bad Sectors ---
# Schedule a full scan and repair on next reboot
chkdsk C: /f /r /x
# Check disk status without modifying (read-only)
chkdsk C:
# --- STEP 4: Windows Memory Diagnostic ---
# Launch GUI tool to schedule memory test on reboot
mdsched.exe
# --- STEP 5: Rebuild Boot Configuration Data (BCD) ---
# Use these if Startup Repair fails or boot files are damaged
# Run from WinRE Command Prompt
bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd
# If rebuildbcd finds 0 installations, try:
bcdedit /export C:\BCD_Backup
attrib C:\boot\bcd -r -s -h
ren C:\boot\bcd bcd.old
bootrec /rebuildbcd
# --- STEP 6: View Recent Windows Updates (to identify culprit) ---
wmic qfe list brief /format:table
# Or in PowerShell:
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 10
# --- STEP 7: Uninstall a Specific Windows Update via CLI ---
# Replace KB5XXXXXXX with the actual KB number
wusa /uninstall /kb:5XXXXXXX /quiet /norestart
# --- STEP 8: Check Event Logs for Crash Details ---
# View System events around the time of the BSOD
wevtutil qe System /count:50 /format:text /rd:true | findstr /i "critical error warning"
# Export full System event log
wevtutil epl System C:\SystemLog.evtx
# --- STEP 9: Read Minidump Files (requires WinDbg) ---
# List crash dump files
dir C:\Windows\Minidump\
# Analyze with WinDbg (after installing Windows SDK)
# windbg -z C:\Windows\Minidump\<dumpfile.dmp>
# --- STEP 10: Safe Mode Boot via BCDEdit ---
# Force next boot into Safe Mode (use if F8 doesn't work)
bcdedit /set {current} safeboot minimal
# After fixing, remove Safe Mode boot flag
bcdedit /deletevalue {current} safeboot
# ============================================================
# END OF DIAGNOSTIC SCRIPT
# ============================================================Error Medic Editorial
The Error Medic Editorial team is composed of senior DevOps engineers, SRE professionals, and Windows system administrators with over a decade of hands-on experience diagnosing and resolving critical system errors across Windows, Linux, and cloud environments. Our guides are built from real-world incident data, official Microsoft documentation, and community-validated solutions to help you resolve even the most stubborn BSODs, stop codes, and system failures quickly and safely.
Sources
- https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-0xc000021a--status-system-process-terminated
- https://support.microsoft.com/en-us/windows/use-startup-repair-to-fix-startup-problems-in-windows-b5f4e926-31cb-43b2-4036-9e1fd83ca5dc
- https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/repair-a-windows-image
- https://support.microsoft.com/en-us/windows/using-system-file-checker-in-windows-365e0031-36b1-6031-f804-8fd86e0ef4ca
- https://answers.microsoft.com/en-us/windows/forum/all/blue-screen-stop-code-0xc000021a/7a76ecce-8c57-4bf2-b66f-6da8e70ff680
- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/chkdsk