You break in with the kernel debugger and you look around.
* You look at the threads of the application(s) calling your driver and see if any of them are blocked waiting for a lock.
* You look at the system threads and see if there’s a worker thread (if you use any) that’s blocked.
* You look at the processors and see if any of them is stuck in a DPC.
* You run !locks and see if there’s an obvious lock that’s causing problems - say one that’s exclusively owned with a large list of waiters - and then look at the thread there and see what’s stuck.
If you don’t find anyone blocked then you look at your driver’s private data structures and your device to find out (a) what it thinks it’s doing, (b) whether it’s really doing what it thinks it’s doing and (c) if there’s a mismatch you try to find out why.
Like any scientific exploration you examine, hypothesize and then test. Usually you can at least find out what’s stuck, you just might not know why. So you make some changes to your driver to log more of it’s operation and rerun your test.
It sounds reproducible, so you’re already over the biggest hurdle.
-p
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of nayan kumar
Sent: Tuesday, November 06, 2007 8:18 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find where the problem lies
Hi,
Thanks for your help.
That problem is gone now i am struggling with another problem that is whenever i am testing my driver with driver verifier with all the option whatever it has after couple of iteration like 500 or 600 it becomes idle.system is not hanging niether its crashing i am able to use other application and system properly but driver is not responding no any operation . is it expected behaviour when we check driver with driver verifier if not what could be possible reason because of which we get this kind of result.and how can i debug this problem.
Regards
From: xxxxx@gmail.com
To: xxxxx@lists.osr.com
Subject: Re: [ntdev] How to find where the problem lies
Date: Mon, 5 Nov 2007 08:33:02 -0800
Can you attach a debugger to the crashing machine? This is definitely what I would do to debug such issue. Otherwise, it looks like windbg is correctly loading the symbols for your driver. Have you inspected all the variables of your code from the crash dump?
Have a nice day
GV
PS: is this a kernel mode driver? I found quite interesting that you have a source file in
c:\documents and settings\nayan\my documents\visual studio projects\win_sd_stack_nov_1_2007\sdhost\supportingfunctions.c
considering that the ddk build utility does not like paths with spaces…
----- Original Message -----
From: nayan kumarmailto:xxxxx
To: Windows System Software Devs Interest Listmailto:xxxxx
Sent: Monday, November 05, 2007 7:06 AM
Subject: RE: [ntdev] How to find where the problem lies
Hi,
Thanks for your reply.
It is happening after some io operation i am just reading and writting register in a infinite loop just to check weather its working properly or not .
And after couple of iteration its failing i dont understand whats goes wrong after couple of iteration .
I dont know but just asking do you think this kind of problem may arises due to hardware fault.If yes how to find those problem.
how can i find the problem if this is the case.
Regards
> Date: Mon, 5 Nov 2007 07:17:18 -0500
> From: xxxxx@evitechnology.com
> Subject: Re:[ntdev] How to find where the problem lies
> To: xxxxx@lists.osr.com
>
> This is a very strange !analyze -v to be sure, but basically it is
> saying that you are attempting to write to 0x0000000, which is a
> guaranteed blue screen. It would appear that you are passing a NULL
> pointer at the first argument to WRITE_REGISTER_USHORT.
>
> Good luck,
>
> mm
>
>
> nayan kumar wrote:
> > Hi All,
> > How can i find where the problem lies in the code based on
> > windeb output that i got after issuing !analyze -v cmd.
> >
> > Following is the output
> >
> > *****
> >
> >
> > * Bugcheck
> > Analysis
> >
> >
> >
> > Unknown bugcheck code (0)
> > Unknown bugcheck description
> > Arguments:
> > Arg1: 00000000
> > Arg2: 00000000
> > Arg3: 00000000
> > Arg4: 00000000
> > Debugging Details:
> > ------------------
> > WARNING: Unable to verify checksum for JinSdHost.dll
> > ERROR: Module load completed but symbols could not be loaded for
> > JinSdHost.dll
> > WARNING: Unable to verify checksum for JinSdDesignerTestApp.exe
> > ERROR: Module load completed but symbols could not be loaded for
> > JinSdDesignerTestApp.exe
> > PROCESS_NAME: JinSdDesignerTe
> > FAULTING_IP:
> > nt!WRITE_REGISTER_USHORT+8
> > 804d9122 668902 mov [edx],ax
> > EXCEPTION_RECORD: ffffffff – (.exr ffffffffffffffff)
> > ExceptionAddress: 804d9122 (nt!WRITE_REGISTER_USHORT+0x00000008)
> > ExceptionCode: c0000005 (Access violation)
> > ExceptionFlags: 00000000
> > NumberParameters: 2
> > Parameter[0]: 00000001
> > Parameter[1]: 00000000
> > Attempt to write to address 00000000
> > ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at “0x%08lx”
> > referenced memory at “0x%08lx”. The memory could not be “%s”.
> > WRITE_ADDRESS: 00000000
> > BUGCHECK_STR: ACCESS_VIOLATION
> > DEFAULT_BUCKET_ID: DRIVER_FAULT
> > LAST_CONTROL_TRANSFER: from f925fb4c to 804d9122
> > STACK_TEXT:
> > eb3c7b3c f925fb4c 00000000 eb3c01ff eb3c7b9e nt!WRITE_REGISTER_USHORT+0x8
> > eb3c7b5c f925fdde 811a78d8 eb3c01ff 00000002
> > JinSdDesigner!WriteDataToDeviceRegister+0x8e [c:\documents and
> > settings\nayan\my documents\visual studio
> > projects\win_sd_stack_nov_1_2007\sdhost\ioctl.c @ 614]
> > eb3c7b90 f92647a8 811a78d8 000001ff 820fcf01
> > JinSdDesigner!WriteDataToDevice+0x96 [c:\documents and settings\nayan\my
> > documents\visual studio projects\win_sd_stack_nov_1_2007\sdhost\ioctl.c
> > @ 564]
> > eb3c7bb0 f926483c 00000000 820fcf00 811a7820
> > JinSdDesigner!SdHostDispatchIoctl+0x6a [c:\documents and
> > settings\nayan\my documents\visual studio
> > projects\win_sd_stack_nov_1_2007\sdhost\ioctl.c @ 85]
> > eb3c7bc8 804e37f7 811a7820 820fcf00 806ee2e8
> > JinSdDesigner!SdHostDispatchIO+0x52 [c:\documents and settings\nayan\my
> > documents\visual studio
> > projects\win_sd_stack_nov_1_2007\sdhost\supportingfunctions.c @ 64]
> > eb3c7bd8 80669fc5 820fcfd4 820fcff8 811a77c0 nt!IopfCallDriver+0x31
> > eb3c7bfc 80674f0b 811a7708 811a7b90 820fcf00 nt!IovCallDriver+0xa0
> > eb3c7c10 804e37f7 811a7708 820fcf00 806ee2e8 nt!ViDriverDispatchGeneric+0x2a
> > eb3c7c20 80669fc5 fe7eb230 806ee2d0 820fcf00 nt!IopfCallDriver+0x31
> > eb3c7c44 8056a148 820fcfdc fea9f9f0 820fcf00 nt!IovCallDriver+0xa0
> > eb3c7c58 8057ad03 811a7708 820fcf00 fea9f9f0
> > nt!IopSynchronousServiceTail+0x60
> > eb3c7d00 8057d281 00000050 00000054 00000000 nt!IopXxxControlFile+0x611
> > eb3c7d34 804de7ec 00000050 00000054 00000000 nt!NtDeviceIoControlFile+0x2a
> > eb3c7d34 7c90eb94 00000050 00000054 00000000 nt!KiFastCallEntry+0xf8
> > 0012fd4c 7c90d8ef 7c8016be 00000050 00000054 ntdll!KiFastSystemCallRet
> > 0012fd50 7c8016be 00000050 00000054 00000000 ntdll!ZwDeviceIoControlFile+0xc
> > 0012fdb0 10001619 00000050 8000a024 008f0540 kernel32!DeviceIoControl+0x78
> > WARNING: Stack unwind information not available. Following frames may be
> > wrong.
> > 0012fe10 100055ca 00000050 ff8ffc00 00000034 JinSdHost+0x1619
> > 0012fe60 00401060 00000050 00370030 00350032 JinSdHost+0x55ca
> > 00000000 00000000 00000000 00000000 00000000 JinSdDesignerTestApp+0x1060
> >
> > FOLLOWUP_IP:
> > JinSdDesigner!WriteDataToDeviceRegister+8e [c:\documents and
> > settings\nayan\my documents\visual studio
> > projects\win_sd_stack_nov_1_2007\sdhost\ioctl.c @ 614]
> > f925fb4c eb24 jmp JinSdDesigner!WriteDataToDeviceRegister+0xb4
> > (f925fb72)
> > SYMBOL_STACK_INDEX: 1
> > FOLLOWUP_NAME: MachineOwner
> > SYMBOL_NAME: JinSdDesigner!WriteDataToDeviceRegister+8e
> > MODULE_NAME: JinSdDesigner
> > IMAGE_NAME: JinSdDesigner.sys
> > DEBUG_FLR_IMAGE_TIMESTAMP: 472a29a7
> > STACK_COMMAND: kb
> > FAILURE_BUCKET_ID:
> > ACCESS_VIOLATION_W_JinSdDesigner!WriteDataToDeviceRegister+8e
> > BUCKET_ID: ACCESS_VIOLATION_W_JinSdDesigner!WriteDataToDeviceRegister+8e
> > Followup: MachineOwner
> > ---------
> > *** ERROR: Symbol file could not be found. Defaulted to export symbols
> > for WINTRUST.dll -
> >
> > Any kind of help will be grat in this regard.
> >
> > Regards
> >
> > ------------------------------------------------------------------------
> > Get the new Windows Live Messenger! Try it!
> > http:
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Search from any Web page with powerful protection. Get the FREE Windows Live Toolbar Today! Try it now!http:
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Call friends with PC-to-PC calling – FREE Try it now!http:
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</http:></http:></http:></mailto:xxxxx></mailto:xxxxx>