Bugcheck and Analysis:
*** Fatal System Error: 0x0000007e
(0xC0000005,0x805C9A77,0xF789E42C,0xF789E128)
Break instruction exception - code 80000003 (first chance)
A fatal system error has occurred.
Debugger entered on first try; Bugcheck callbacks have not been invoked.
A fatal system error has occurred.
Connected to Windows XP 2600 x86 compatible target, ptr64 FALSE
Loading Kernel Symbols
.............................
Loading User Symbols
*******************************************************************************
*
*
* Bugcheck Analysis
*
*
*
*******************************************************************************
Use !analyze -v to get detailed debugging information.
BugCheck 7E, {c0000005, 805c9a77, f789e42c, f789e128}
Probably caused by : MyDrv.sys ( MyDrv!MyDrvMethod+da )
Followup: MachineOwner
nt!RtlpBreakWithStatusInstruction:
804e2a52 cc int 3
0: kd> !analyze -v
*******************************************************************************
*
*
* Bugcheck Analysis
*
*
*
*******************************************************************************
SYSTEM_THREAD_EXCEPTION_NOT_HANDLED (7e)
This is a very common bugcheck. Usually the exception address pinpoints
the driver/function that caused the problem. Always note this address
as well as the link date of the driver/image that contains this address.
Arguments:
Arg1: c0000005, The exception code that was not handled
Arg2: 805c9a77, The address that the exception occurred at
Arg3: f789e42c, Exception Record Address
Arg4: f789e128, Context Record Address
Debugging Details:
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at "0x%08lx"
referenced memory at "0x%08lx". The memory could not be "%s".
FAULTING_IP:
nt!MiFindExportedRoutineByName+51
805c9a77 8b348a mov esi,dword ptr [edx+ecx*4]
EXCEPTION_RECORD: f789e42c -- (.exr fffffffff789e42c)
ExceptionAddress: 805c9a77 (nt!MiFindExportedRoutineByName+0x00000051)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 00000000
Parameter[1]: 00718094
Attempt to read from address 00718094
CONTEXT: f789e128 -- (.cxr fffffffff789e128)
eax=e1021e28 ebx=80562443 ecx=1fffffff edx=80718098 esi=80705ab8
edi=3ffffffe
eip=805c9a77 esp=f789e4f4 ebp=f789e514 iopl=0 nv up ei pl nz na pe
nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000
efl=00010206
nt!MiFindExportedRoutineByName+0x51:
805c9a77 8b348a mov esi,dword ptr [edx+ecx*4]
ds:0023:00718094=????????
Resetting default scope
DEFAULT_BUCKET_ID: DRIVER_FAULT
PROCESS_NAME: System
ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at "0x%08lx" referenced
memory at "0x%08lx". The memory could not be "%s".
READ_ADDRESS: 00718094
BUGCHECK_STR: 0x7E
LAST_CONTROL_TRANSFER: from 805cb097 to 805c9a77
STACK_TEXT:
f789e514 805cb097 806fd000 e1021e28 f789e59e
nt!MiFindExportedRoutineByName+0x51
f789e550 f743ba2a f789e5bc 89be3fc8 00000000
nt!MmGetSystemRoutineAddress+0xab
f789e5c4 f743721d 89bb8530 00000000 002a0028 MyDrv!MyDrvMethod+0xda
f789e5ec 806b7b15 89bb8928 80095900 80095900 MyDrv!DriverEntry+0x20d
f789e62c 806b7c2a 89bb89dc 80095900 00000018
nt!IopInitializeBuiltinDriver+0x260
f789e690 806adfa1 80087000 f789e6ac 00034000
nt!IopInitializeBootDrivers+0x2d2
f789e838 806af012 80087000 00000000 89bfb5b8 nt!IoInitSystem+0x712
f789edac 80574128 80087000 00000000 00000000 nt!Phase1Initialization+0xac7
f789eddc 804ec791 806ae7bf 80087000 00000000 nt!PspSystemThreadStartup+0x34
00000000 00000000 00000000 00000000 00000000 nt!KiThreadStartup+0x16
FOLLOWUP_IP:
MyDrv!MyDrvMethod+da
f743ba2a 8945f4 mov dword ptr [ebp-0Ch],eax
SYMBOL_STACK_INDEX: 2
SYMBOL_NAME: MyDrv!MyDrvMethod+da
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: MyDrv
IMAGE_NAME: MyDrv.sys
DEBUG_FLR_IMAGE_TIMESTAMP: 465de0dd
STACK_COMMAND: .cxr 0xfffffffff789e128 ; kb
FAILURE_BUCKET_ID: 0x7E_MyDrv!MyDrvMethod+da
BUCKET_ID: 0x7E_MyDrv!MyDrvMethod+da
Followup: MachineOwner
Code that caused it:
PCRED_CMREGISTERCALLBACKEX cmFunc;
WCHAR funcName =
L"CmRegisterCallbackEx";
UNICODE_STRING funcNameStr;
RtlInitUnicodeString(&funcNameStr, funcName);
ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL);
if (1) //(DeviceExtension->WindowsVersion >= WINVER_VISTA)
{
// Don't allow the following call on any system prior to Vista
// or a bugcheck will result. Nice huh?
if (cmFunc =
(PCRED_CMREGISTERCALLBACKEX)MmGetSystemRoutineAddress(&funcNameStr))
{
Bill M.
"Doron Holan" wrote in message
news:xxxxx@ntdev...
Can you send a callstack? And yes, it should return NULL and not blow
up. Just to verify, you are calling at IRQL==PASSIVE_LEVEL right?
Thx
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bill McKenzie
Sent: Wednesday, May 30, 2007 12:02 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] MmGetSystemRoutineAddress BugCheck?
Am I crazy, or is MmGetSystemRoutineAddress supposed to return NULL when
it
does not find the requested system routine name and NOT blue screen? On
XP
SP2, looking for CmRegisterCallbackEx using MmGetSystemRoutineAddress it
blue screens everytime. Change the requested system routine name to
CmRegisterCallback and no problem.
This is a bug no? Makes MmGetSystemRoutineAddress rather useless or
actually harmful.
Bill M.
---
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
ListServer/Forum