Bug Check 0x7F UNEXPECTED_KERNEL_MODE_TRAP - Windows drivers (2024)

  • Article

The UNEXPECTED_KERNEL_MODE_TRAP bug check has a value of 0x0000007F. This bug check indicates that the Intel CPU generated a trap and the kernel failed to catch this trap.

This trap could be either of the following types:

  • A bound trap, which is a trap the kernel isn't permitted to catch.
  • A double fault, which is a fault that occurred while processing an earlier fault, which always results in a system failure.

Important

This topic is for programmers. If you're a customer who has received a blue screen error code while using your computer, see Troubleshoot blue screen errors.

Parameter 1

The first parameter that appears on the blue screen specifies the trap number.

The most common trap numbers are the following codes:

ParameterTrap codeDescription
0x00000000Divide by Zero ErrorIndicates that a DIV instruction is executed and the divisor is zero. Memory corruption, other hardware problems, or software failures can cause this error.
0x00000004OverflowOccurs when the processor executes a call to an interrupt handler when the overflow (OF) flag is set.
0x00000005Bounds Check FaultIndicates that the processor, while executing a BOUND instruction, finds that the operand exceeds the specified limits. A BOUND instruction ensures that a signed array index is within a certain range.
0x00000006Invalid OpcodeIndicates that the processor tries to execute an invalid instruction. This error typically occurs when the instruction pointer has become corrupted and is pointing to the wrong location. The most common cause of this error is hardware memory corruption.
0x00000008Double FaultIndicates that an exception occurs during a call to the handler for a prior exception. Typically, the two exceptions are handled serially. There are several exceptions that can't be handled serially, so the processor signals a double fault.

There are two common causes of a double fault:

  • The first cause is a kernel stack overflow. This overflow occurs when a guard page is hit, and the kernel tries to push a trap frame. Because there's no stack left, a stack overflow results, causing the double fault. If you think this situation has occurred, use the !thread extension to determine the stack limits, and then use the kb (Display Stack Backtrace) command with a large value, for example, kb 100, to display the full stack.
  • The second common cause is a hardware problem.

The less-common trap codes include the following values:

  • 0x00000001: A system-debugger call (DEBUG)
  • 0x00000003: A debugger breakpoint (INT3)
  • 0x00000007: A hardware coprocessor instruction with no coprocessor present (NXP_NOT_AVAILABLE)
  • 0x0000000A: A corrupted Task State Segment (INVALID_TSS)
  • 0x0000000B: An access to a memory segment that wasn't present (SEGMENT_NOT_PRESENT)
  • 0x0000000C: An access to memory beyond the limits of a stack (STACK_FAULT)
  • 0x0000000D: An exception not covered by some other exception, a protection fault that pertains to access violations for applications (GP_FAULT)
  • 0x0000000F: A reserved trap exception (RESERVED_TRAP)
  • 0x00000010: A hardware coprocessor exception (NPX_ERROR)
  • 0x00000011: An alignment check exception (ALIGNMENT_CHECK)

For other trap numbers, refer to the Intel processor architecture manual for the processor you're troubleshooting.

Cause

Bug check 0x7F typically occurs after you install faulty or mismatched hardware, especially memory, or if installed hardware fails.

A double fault can occur when the kernel stack overflows. This overflow occurs if multiple drivers are attached to the same stack. For example, if two file system filter drivers are attached to the same stack and then the file system recurses back in, the stack overflows.

Debug

Always begin with the !analyze extension with the -v option, verbose. Examine the output and the faulting code. Look for reoccurring trends in multiple dumps.

After you try !analyze, use the kv (Display Stack Backtrace) debugger command.

  • If kv shows a task gate, use the .tss (Display Task State Segment) command on the part before the colon.
  • If kv shows a trap frame, use the .trap (Display Trap Frame) command to format the frame.
  • Otherwise, use the .trap (Display Trap Frame) command on the appropriate frame. On x86-based platforms, this frame is associated with the procedure NT!KiTrap.

After using one of these commands, use kv again to display the new stack.

Troubleshoot

Hardware

If you recently added hardware to the computer, remove it to see if the error recurs. If existing hardware has failed, remove or replace the faulty component. Run hardware diagnostics that the system manufacturer supplies to determine which hardware component failed.

Faulty or mismatched memory can cause this bug check. Use the memory diagnostic program in Windows to test all of the system memory.

Confirm that all hard disk drives and hard disk controllers are compatible with the installed version of Windows.

The system motherboard might have issues, such as a scratched trace or a defective component. A failing power supply can also cause issues.

Overclocking is setting the CPU to run at speeds above the rated specification, which can cause this error. If you've overclocked the computer that's experiencing the error, return the CPU to the default clock speed setting. Disable memory caching of the BIOS to try to resolve the problem if that option is available.

Software

Check the System Log in Event Viewer for other error messages that might help identify the device or driver that's causing the error.

Check the availability of updates for the ACPI/BIOS, the hard driver controller, or network cards from the hardware manufacturer.

If the error occurred after the installation of a new or updated device driver, remove or replace the driver. If, under this circ*mstance, the error occurs during the startup sequence, use Safe Mode to rename or delete the faulty driver. If the driver is used as part of the system startup process in Safe Mode, start the computer by using the Recovery Console in order to access the file. Try the Last Known Good Configuration option. This option is most effective when you add only one driver or service at a time.

If you encounter this error while upgrading to a new version of the Windows operating system, the error might be caused by incompatible software. Examples include a device driver, a system service, a virus scanner, or a backup tool. If possible, remove all third-party device drivers and system services and disable any virus scanners before you upgrade. Contact the software manufacturer to obtain updates of these tools. Also, make sure that you've installed the latest Windows updates.

See also

  • !analyze
  • Bug check code reference
Bug Check 0x7F UNEXPECTED_KERNEL_MODE_TRAP - Windows drivers (2024)

FAQs

Bug Check 0x7F UNEXPECTED_KERNEL_MODE_TRAP - Windows drivers? ›

Bug check 0x7F typically occurs after you install faulty or mismatched hardware, especially memory, or if installed hardware fails. A double fault can occur when the kernel stack overflows. This overflow occurs if multiple drivers are attached to the same stack.

How to fix kernel mode? ›

🔨Fixes
  1. Fix1. Check RAM.
  2. Fix 2. Troubleshoot Hardware Failures.
  3. Fix 3. Check Windows to Update.
  4. Fix 4. Run CHKDSK or SFC Scan.
  5. Fix 5. Update or Uninstall Drivers.
  6. Fix 6. Disable Overclocking and Memory Caching.
  7. Fix 7. Update Firmware.
  8. Fix 8. Disable Antivirus Program.
Jul 24, 2023

What is the BSOD from bug check? ›

BSOD, or "The computer has rebooted from a bugcheck," indicates a serious error caused by hardware issues or outdated drivers. The problem may cause a system crash or more serious damage. You can fix it by updating drivers, performing System File Check, Memory Check, etc.

How to debug kernel mode driver? ›

To enable kernel-mode debugging on the target system: On the host system, open a Command Prompt window and enter ipconfig to determine its IP address. On the target system, open a Command Prompt window and use the ping command to confirm network connectivity between the two systems.

How do I fix kernel failure? ›

I survived a scary Blue Screen of Death, the dreaded Kernel Security Check Failure. Here's how.
  1. Boot into Safe Mode. ...
  2. Scan for Malware. ...
  3. Scan for Disk Corruption and Corrupt Files. ...
  4. Check Recent Updates, Software Installs and Drivers. ...
  5. Check Bluescreen View. ...
  6. Uninstall and Reinstall Graphics Driver (in my case)
Jan 20, 2024

How to debug a bugcheck? ›

Open the memory. dmp file
  1. Go to File > Open Crash Dump... > Open the MEMORY. DMP file.
  2. Click or type "! analyze -v to get the detailed debugging information.
  3. Wait for the analysis to complete.

How do I see what caused my BSOD? ›

Open “Windows Logs” > “System”. View the details of the event by doing any of the following: Click on the relevant error events and see the details in the pane right below the list of events. Highlight an event then click on “Event Properties” under the “Actions” pane on the right side of the screen.

How do I fix kernel data error? ›

Kernel Data Inpage Error Windows 10 (Blue Screen)
  1. Fix 1. Check and Repair Hard Disk for Errors with CHKDSK.
  2. Fix 2. Run a Virus Scan.
  3. Fix 3. Run SFC and DISM Scan to Fix Kernel Data Inpage Error.
  4. Fix 4. Run Memory Diagnostics Tool to Fix Kernel Data Inpage Error.
  5. Fix 5. Check Hardware Peripherals.
May 21, 2024

How do I fix kernel power failure? ›

Common causes of the Kernel-Power error include outdated Windows, enabled Windows fast startup, and faulty RAM or graphics card. Fix the error by updating Windows, disabling fast startup, reseating RAM and graphics card, testing for faulty PSU, and running CHKDSK and SFC.

How to fix memory management stop code? ›

Let us begin.
  1. Reboot your Windows PC. ...
  2. Quick scan your PC using Windows Security. ...
  3. Update Windows 11/ 10 OS. ...
  4. Update Drivers. ...
  5. Update GPU Driver. ...
  6. Run Windows Memory Diagnostic tool. ...
  7. Check RAM issues using the free Memtest86+ tool. ...
  8. Use the chkdsk command to verify and repair system files.
Jan 31, 2024

Top Articles
Latest Posts
Article information

Author: Carmelo Roob

Last Updated:

Views: 6291

Rating: 4.4 / 5 (65 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Carmelo Roob

Birthday: 1995-01-09

Address: Apt. 915 481 Sipes Cliff, New Gonzalobury, CO 80176

Phone: +6773780339780

Job: Sales Executive

Hobby: Gaming, Jogging, Rugby, Video gaming, Handball, Ice skating, Web surfing

Introduction: My name is Carmelo Roob, I am a modern, handsome, delightful, comfortable, attractive, vast, good person who loves writing and wants to share my knowledge and understanding with you.