Windows Error 717: “One of the Pages to Lock Was Already Locked”
Why This Error Happens
Error 717 occurs when an application or system process attempts to lock a memory page in physical RAM (via the VirtualLock API) that has already been locked by another thread or process. This typically stems from a race condition in memory management, a bug in a driver or application that fails to properly track its locked-page allocations, or memory corruption caused by an unstable or outdated driver. It is frequently seen in conjunction with services that rely on non-paged memory pools, such as networking or storage drivers, especially after a recent Windows Update or driver installation.
Step-by-Step Resolution Guide
-
Identify the Offending Process/Driver
Open Event Viewer (eventvwr.msc), navigate to Windows Logs > System, and locate the Error 717 event. Note the source (e.g., a specific.sysdriver or service name) listed in the “General” tab details. -
Update or Roll Back the Associated Driver
- Press
Win + Xand select Device Manager. - Locate the hardware associated with the faulty driver identified in Step 1 (commonly Network Adapters or Storage controllers).
- Right-click the device, select Properties > Driver tab.
- Click Update Driver. If the error started after a recent update, click Roll Back Driver instead.
- Run the System File Checker (SFC) and DISM
Corrupted system files can cause improper memory locking behavior.
- Open Terminal (Admin) via the Start menu right-click.
- Run:
sfc /scannow - Once complete, run:
DISM /Online /Cleanup-Image /RestoreHealth - Restart your PC after both commands finish.
- Adjust Virtual Memory (Paging File) Settings
Sometimes a misconfigured or insufficient paging file exacerbates locking conflicts.
- Go to Settings > System > About > Advanced system settings.
- Under the Advanced tab, click Settings under Performance, then the Advanced tab again.
- Click Change under Virtual Memory, uncheck “Automatically manage paging file size,” select your system drive (usually C:), choose System managed size, and click Set, then OK.
- Restart the computer.
- Check for Pending Windows Updates
Navigate to Settings > Windows Update and ensure all optional and driver updates are installed, as Microsoft frequently patches known memory-locking kernel bugs.
Alternative or Verification Steps
- Verify the Fix: Reopen Event Viewer and monitor the System log for 24–48 hours to confirm Error 717 no longer appears under the same source.
- Alternative Solution: If the error persists and started recently, use System Restore (
rstrui.exe) to revert to a restore point created before the driver update or software installation that triggered the issue.