HI,
I am stress testing my serial driver at a high baud rate of 256000 bps by Writing to the serial port and reading data back from the serial port (after configuring the serial port for loop back).
At this baud rate, i am seeing that the system crashes with an error “Access violation - code c0000005 (!!! second chance !!!)” very soon after the test is started. As per the crash analysis, my driver is not involved in the I/O. Below is hte crash dump.
!analyze -v
Connected to Windows 7 7601 x86 compatible target at (Tue Sep 30 21:39:52.338 2014 (UTC + 5:30)), ptr64 FALSE
Loading Kernel Symbols
…
…
…
Loading User Symbols
…
Loading unloaded module list
…
*** WARNING: Unable to verify checksum for SerialValidation20.exe
*** ERROR: Symbol file could not be found. Defaulted to export symbols for mfehidk.sys -
*** ERROR: Module load completed but symbols could not be loaded for regflt.sys
*** ERROR: Module load completed but symbols could not be loaded for VME.sys
*** ERROR: Module load completed but symbols could not be loaded for spldr.sys
*** ERROR: Module load completed but symbols could not be loaded for e1c6232.sys
*** ERROR: Module load completed but symbols could not be loaded for hbdrvisr.sys
*** ERROR: Symbol file could not be found. Defaulted to export symbols for mfetdik.sys -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for igdkmd32.sys -
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************
Unknown bugcheck code (0)
Unknown bugcheck description
Arguments:
Arg1: 00000000
Arg2: 00000000
Arg3: 00000000
Arg4: 00000000
Debugging Details:
PROCESS_NAME: SerialValidati
FAULTING_IP:
Wdf01000!FxContextHeaderInit+1c
8bc31889 8b4e1c mov ecx,dword ptr [esi+1Ch]
EXCEPTION_RECORD: ffffffff – (.exr 0xffffffffffffffff)
ExceptionAddress: 8bc31889 (Wdf01000!FxContextHeaderInit+0x0000001c)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 00000000
Parameter[1]: 11100f3a
Attempt to read from address 11100f3a
ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
EXCEPTION_PARAMETER1: 00000000
EXCEPTION_PARAMETER2: 11100f3a
READ_ADDRESS: 11100f3a
FOLLOWUP_IP:
Wdf01000!FxContextHeaderInit+1c
8bc31889 8b4e1c mov ecx,dword ptr [esi+1Ch]
BUGCHECK_STR: ACCESS_VIOLATION
DEFAULT_BUCKET_ID: VISTA_DRIVER_FAULT
CURRENT_IRQL: 0
LAST_CONTROL_TRANSFER: from 8bc318f9 to 8bc31889
STACK_TEXT:
ad0d7a68 8bc318f9 87246f90 87246ec8 87439010 Wdf01000!FxContextHeaderInit+0x1c
ad0d7a7c 8bc31055 87246ec8 00000002 87442010 Wdf01000!FxObjectAndHandleHeaderInit+0x39
ad0d7aa0 8bc361db 87439010 11100f1e 87442010 Wdf01000!FxDevice::AllocateRequestMemory+0x127
ad0d7ac4 8bc36849 87439010 11100f1e 871f1e48 Wdf01000!FxRequest::_CreateForPackage+0x1e
ad0d7b00 8bc30bc2 871f1e48 87439910 871f1e48 Wdf01000!FxPkgIo::Dispatch+0x297
ad0d7b28 8bc30a33 87439910 871f1e48 8720ed78 Wdf01000!FxDevice::Dispatch+0x155
ad0d7b44 83250c29 87439910 871f1e48 871f1e48 Wdf01000!FxDevice::DispatchWithLock+0x77
ad0d7b5c 83445b29 871f1e48 871f1edc 8720ed78 nt!IofCallDriver+0x63
ad0d7b7c 8347e516 87439910 8720ed78 00000001 nt!IopSynchronousServiceTail+0x1f8
ad0d7c08 832578fa 87439910 871f1e48 00000000 nt!NtReadFile+0x644
ad0d7c08 778e7094 87439910 871f1e48 00000000 nt!KiFastCallEntry+0x12a
006af1ac 778e62c4 75b3cfde 0000001c 0000002c ntdll!KiFastSystemCallRet
006af1b0 75b3cfde 0000001c 0000002c 00000000 ntdll!ZwReadFile+0xc
006af214 76f69bba 0000001c 006af7a8 0000000a KERNELBASE!ReadFile+0xaa
006af25c 013325e1 0000001c 006af7a8 0000000a kernel32!ReadFileImplementation+0xf0
006af890 76f6ed6c 03b50508 006af8dc 7790377b SerialValidation20!comm_read_thread_proc+0x161 [d:\24-09-2014\solution_amat\solution_amat\solution_amat\serialvalidation.cpp @ 604]
006af89c 7790377b 03b50508 77fcb8dc 00000000 kernel32!BaseThreadInitThunk+0xe
006af8dc 7790374e 01332480 03b50508 00000000 ntdll!__RtlUserThreadStart+0x70
006af8f4 00000000 01332480 03b50508 00000000 ntdll!_RtlUserThreadStart+0x1b
STACK_COMMAND: kb
SYMBOL_STACK_INDEX: 0
SYMBOL_NAME: Wdf01000!FxContextHeaderInit+1c
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: Wdf01000
IMAGE_NAME: Wdf01000.sys
DEBUG_FLR_IMAGE_TIMESTAMP: 5010ac41
FAILURE_BUCKET_ID: ACCESS_VIOLATION_Wdf01000!FxContextHeaderInit+1c
BUCKET_ID: ACCESS_VIOLATION_Wdf01000!FxContextHeaderInit+1c
Followup: MachineOwner
2: kd> .exr 0xffffffffffffffff
ExceptionAddress: 8bc31889 (Wdf01000!FxContextHeaderInit+0x0000001c)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 00000000
Parameter[1]: 11100f3a
Attempt to read from address 11100f3a
From the above, i understand that an attempt has been made to read from an invalid address.
From the stack trace it appears that the application (SerialValidation20) is sending a ReadFile request which the WDF framework is trying to deliver to my driver. But somewhere around FxContextHeaderInit() function it is crashing. My drivers functions are not displayed in stack trace.
SOme information about my target environment:
The target OS is WIndows 7 Embedded Standard SP1. I have 5 multiport serial controllers each of which have 8 ports. I am running the tests on all of the ports simultaneoulsy.
I am not getting any clue how to proceed about debugging these king of issues which don’t seem to be related to my driver. Could somebody please suggest me how to go find out the root cause of this issue?