SYSTEM_SERVICE_EXCEPTION

Code: 0x3b (59)

As HRESULT:As NTSTATUS:

Parameters

ParameterDescription
1The exception that caused the bug check.
2The address of the instruction that caused the bug check
3The address of the context record for the exception that caused the bug check
40 (Not used)

Description

The SYSTEM_SERVICE_EXCEPTION bug check has a value of 0x0000003B. This indicates that an exception happened while executing a routine that transitions from non-privileged code to privileged code.

Important

This article 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.

Cause

This stop code indicates that executing code had an exception, and the thread that was below it, is a system thread.

This can happen because a NULL pointer dereferenced​ or a random incorrect address was accessed. This in turn can be caused by memory being freed prematurely​, or data structure corruption.

The exception information that is returned in parameter 1 is described in NTSTATUS values. The exception codes are defined in ntstatus.h, a header file provided by the Windows Driver Kit. (For more info, see Header files in the Windows Driver Kit).

Common exception codes include:

Resolution

To determine the specific cause and to create a code fix, programming experience and access to the source code of the faulting module is required.

To debug this problem, use the .cxr (display context record) command with Parameter 3, and then use kb (display stack backtrace). You can also set a breakpoint in the code that precedes this stop code and attempt to single-step forward into the faulting code. Use the u, ub, uu (unassemble) commands to see the assembly program code.

The !analyze debugger extension displays information about the bug check and can be helpful in determining the root cause. The following example is output from !analyze.

SYSTEM_SERVICE_EXCEPTION (3b)
An exception happened while executing a system service routine.
Arguments:
Arg1: 00000000c0000005, Exception code that caused the bugcheck
Arg2: fffff802328375b0, Address of the instruction which caused the bugcheck
Arg3: ffff9c0a746c2330, Address of the context record for the exception that caused the bugcheck
Arg4: 0000000000000000, zero.
...

For more information about WinDbg and !analyze, see the following topics:

For more information on Windows memory usage, see Windows Internals 7th Edition Part 1 by Pavel Yosifovich, Mark E. Russinovich, David A. Solomon and Alex Ionescu.

Identify the driver

If a driver that is responsible for the error can be identified, its name is printed on the blue screen and stored in memory at the location (PUNICODE_STRING) KiBugCheckDriver. You can use dx (display debugger object model expression), a debugger command, to display this: dx KiBugCheckDriver.

kd> dx KiBugCheckDriver
KiBugCheckDriver                 : 0xffffe10b9991e3e8 : "nvlddmkm.sys" [Type: _UNICODE_STRING *]

Use the !error extension to display information about the exception code in parameter 1. Following is an example of output from !error.

2: kd> !error 00000000c0000005
Error code: (NTSTATUS) 0xc0000005 (3221225477) - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

Look at the STACK TEXT output from WinDbg for clues about what was running when the failure occurred. If multiple dump files are available, compare their information to look for common code that is in the stack. Use debugger commands like kb (display stack backtrace) to investigate the faulting code.

Use the following command to list modules that are loaded in memory: lm t n

Use !memusage to examine the general state of the system memory. You can also use the commands !pte and !pool to examine specific areas of memory.

In the past, this error has been linked to excessive use of the paged pool, which may occur due to user-mode graphics drivers crossing over and passing bad data to the kernel code. If you suspect this is the case, use the pool options in Driver Verifier to gather additional information.

Driver Verifier

Driver Verifier is a tool that runs in real time to examine the behavior of drivers. For example, Driver Verifier checks the use of memory resources, such as memory pools. If it identifies errors in the execution of driver code, it proactively creates an exception to allow that part of the driver code to be further scrutinized. Driver Verifier Manager is built into Windows and is available on all Windows PCs.

To start Driver Verifier Manager, enter verifier at a command prompt. You can configure which drivers to verify. The code that verifies drivers adds overhead as it runs, so try to verify the smallest number of drivers possible. For more information, see Driver Verifier.

Remarks

For general troubleshooting of Windows bug check codes, follow these suggestions:

For additional general troubleshooting information, see Analyze Bug Check Blue Screen Data.

See Also

Crash dump analysis using the Windows debuggers (WinDbg)

Analyzing a Kernel-Mode Dump File with WinDbg

Bug Check Code Reference

Article text from the Windows driver documentation (opens in a new tab), by Microsoft, under the CC BY 4.0 (opens in a new tab) licence.

Associated Modules

ModuleCodeFound inDescription
EventCreate.exe0x3b78.11011%1
KernelBase.dll0x3b78.1An unexpected network error occurred.
WinMgmtR.dll0x3b1011Windows Management Instrumentation ADAP was unable to create the Win32_PerfRawData base class %1
cipher.exe0x3b78.11011Certificate thumbprint: %1
dsreg.dll0x3b1011Unable to connect to server %1:%2 through WinHTTP. Error: %3
dssec.dll0x3b78.11011Other domain parameters (for use by SAM)
ehepgres.dll0x3b7%1
hvloader.dll0x3b11Hypervisor launch failed; Second Level Address Translation is required to launch the hypervisor.
hvservice.sys0x3b10Hypervisor launch failed; Second Level Address Translation is required to launch the hypervisor.
kernel32.dll0x3b78.11011An unexpected network error occurred.
nslookup.exe0x3b78.11011Aliases:
reagentc.exe0x3b8.11011%1: Configuring or modifying the recovery image location is not supported on this PC.
sc.exe0x3b78.11011: %1
webservices.dll0x3b78.11011The length of the framing fault string exceeded the quota.
wevtutil.exe0x3b78.11011Archive log file in a self-contained format. A subdirectory with the name of the locale is created and all locale-specific information is saved in that subdirectory. When the directory created by the archive-log command is present along with the log file, events in the file can be read whether or not the publisher is installed. Usage: wevtutil { al | archive-log } [/OPTION:VALUE [/OPTION:VALUE] ...] The log file to be archived. A log file can be generated using export-log or clear-log command. Options: You can use either the short (for example, /l) or long (for example, /locale) version of the option names. Options and their values are not case-sensitive. /{l | locale}:VALUE VALUE is a locale string to archive a log in a specific locale. If not specified, the locale of the current console will be used. For a list of all supported locale strings, please refer to the Microsoft Developer Network (MSDN) documentation for the LocaleNameToLCID API.
win32k.sys0x3b78.1GradientActiveTitle
win32kbase.sys0x3b1011GradientActiveTitle
17 entries