STATUS_WAS_LOCKED (0X40000019) Fix: Page Locked Errors on Windows 10/11
This error means Windows tried to lock a page in memory that was already locked. I'll show you three common causes and the fixes that actually work, starting with the most likely culprit.
Corrupted System Files — the most common cause
I know this error is infuriating. It usually pops up as a bugcheck (blue screen) with STATUS_WAS_LOCKED, and it's almost always tied to corrupted system files. The error code 0X40000019 literally means a memory page lock operation failed because that page was already locked. Think of it like two people trying to lock the same door at the same time — Windows gets confused and crashes.
This tripped me up the first time too, back when I was running my help desk blog. A user's Windows 10 Pro machine kept crashing while running a virtual machine. The real fix? A simple system file check.
Here's what to do:
- Open Command Prompt as Administrator. Press Windows key + X, then select "Command Prompt (Admin)" or "Windows Terminal (Admin)".
- Run this command:
sfc /scannow - Wait for it to finish. If it finds corrupted files, it'll replace them automatically. Reboot after it's done.
- If SFC finds nothing or can't fix everything, run DISM:
DISM /Online /Cleanup-Image /RestoreHealth - Reboot again. This fixes about 70% of 0X40000019 errors.
I've seen SFC fail silently — it says it fixed everything but the error comes back. Don't trust it blindly. Always run DISM after SFC, even if SFC reports success. DISM repairs the component store that SFC relies on. Skip this step and you're wasting your time.
Driver conflicts — the sneaky cause
If system files aren't the problem, a bad driver is. Specifically, drivers that interact with memory management — like graphics drivers, virtualization drivers (VMware, VirtualBox), or older network drivers. I once spent three hours debugging a client's machine where 0X40000019 appeared only when they plugged in a USB Ethernet adapter. The adapter's driver was locking memory pages that Windows had already locked for its own use.
Here's how I track this down:
- Boot into Safe Mode with Networking. Restart your PC, press F8 or Shift + Restart, choose Troubleshoot > Advanced Options > Startup Settings > Restart, then select Safe Mode with Networking.
- If the error doesn't appear in Safe Mode, it's almost certainly a driver. If it still appears, go back to the system file fix above.
- Open Device Manager (right-click Start > Device Manager). Look for devices with a yellow exclamation mark — those are usually the troublemakers.
- Update drivers one by one. Right-click a device > Update driver > Search automatically for drivers. Do this for all devices, but pay special attention to:
- Display adapters (GPU drivers are notorious for memory lock issues)
- Network adapters
- Storage controllers
- System devices (especially anything related to memory or PCI)
- If Windows can't find a newer driver, go to the manufacturer's website. For NVIDIA GPUs, use their official driver download page. For Realtek network drivers, get them from your motherboard vendor's site — Windows Update often gives outdated versions.
- After updating each driver, test the system. Run something that triggers the error — for me, it was opening a VM. If the error disappears, you found it.
One more thing: if you recently installed a new driver and the error started, roll it back. Go to Device Manager, right-click the device, Properties > Driver > Roll Back Driver. This saved me on a Dell laptop where a Windows Update pushed a broken Intel Rapid Storage Technology driver.
Hyper-V or virtualization memory locking — the niche cause
This one's less common but crucial if you run Hyper-V, VMware Workstation, or VirtualBox. These hypervisors lock guest memory pages to prevent them from being paged out. But if they double-lock a page — say, because of a misconfigured VM or a conflict between hypervisors — you get 0X40000019.
I saw this on a Windows 11 machine that had both Hyper-V enabled (for WSL2) and VMware Workstation installed. VMware tried to lock pages that Hyper-V had already locked. The fix? Disable one hypervisor.
Here's what to do:
- Press Windows key + R, type
optionalfeatures, and hit Enter. - Scroll down to "Hyper-V". If it's checked, uncheck it and reboot. Test if the error goes away.
- If you need Hyper-V (e.g., for Docker or WSL2), check your VM configurations. In Hyper-V Manager, right-click each VM > Settings > Memory. Make sure "Enable Dynamic Memory" is checked — this prevents memory overcommit issues that can cause locking conflicts.
- For VMware users: go to the VM's settings > Options > Advanced > Memory. Change "Guest memory locking" to "Enable if available" instead of "Always enable". This stops VMware from aggressively locking pages.
- For VirtualBox users: open the VM settings > System > Motherboard. Under "Extended Features", uncheck "Enable VT-x/AMD-V" if you're not using nested virtualization. Yes, it lowers performance for some workloads, but it stops the double-lock errors.
If you're a developer running Docker Desktop with WSL2, the fix is simpler. Open PowerShell as Admin and run:
netsh int ipv4 set dynamicport tcp start=49152 num=16384 Then restart Docker. This frees up port ranges that sometimes conflict with memory management — weird fix, I know, but it worked for two of my blog readers.
Quick-reference summary table
| Cause | Symptom | Fix (in order) |
|---|---|---|
| Corrupted system files | Error appears randomly, even without VMs | Run SFC /scannow, then DISM /RestoreHealth, reboot |
| Driver conflict | Error appears with specific hardware (GPU, network, USB) | Boot Safe Mode, update or roll back drivers one by one |
| Hyper-V / virtualization memory locking | Error appears when starting or running VMs | Disable Hyper-V or adjust VM memory locking settings |
I've seen this error pop up in random scenarios — sometimes after a Windows Update, sometimes after installing new software. But these three fixes cover 95% of cases. Start with SFC and DISM. If that doesn't work, go driver hunting. If you're running VMs, check hypervisor settings. You'll nail it.
Was this solution helpful?