Oh joy, those are so much fun to find.
The grunt method of debug:
Start with a known point, such as the IO processing entry, set a breakpoint, and use step, step into, or step around until you get to a function that hangs. With a little luck, and lots or restarts, you will eventually get to the point where you will find what is actually hanging. That may not necessarily answer WHY it’s hanging.
The grock method of debug:
Odds are good that it’s a spinlock problem. Check to see if there are multiple paths that acquire the spinlock and that all of those paths release the spinlock. Have you run pre-fast? CUV? Turn on Driver Verifier, and WDF Verifier? Use the !wdfxxxx commands to chase back WDF objects.
An aside: The !wdfxxx debug commands were some of the most useful functions I have used. In a matter of minutes I could find tons of information in my driver, from a cold break in. I used them heavily to find cancel IO problems with multiple threads feeding the IO queue. All I needed to know was the name of the driver.
Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of ANNIE LI
Sent: Tuesday, June 02, 2009 11:19 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to debug a hang OS.
Hi
I hit a hang problem on my windows pv driver. We use microsoft ISCSI
initiator to setup ISCSI interface to access data. The whole process
will take about 10 hours, and the vm hang somewhere after the test
begain 5 hours. The hang state means no mouse and keyboard response. I
tried to use windbg to trace this problem, stop windbg when hanging, the
stack information is limited as following:
nt!DbgBreakPointWithStatus+0x4
nt!KeEnterCriticalRegion+0x8d
nt!KeQueryTickCount+0x391
nt!CcFlushCache+0x21a
nt!KeQueryTickCount+0x13d
nt!IoGetBaseFileSystemDeviceObject+0x76
nt!KeResetEvent+0xab7
nt!NtConnectPort+0x557
nt!KeQueryInterruptTime+0x1f2
I tried to use .crash to crash the vm, but no dump file generated. How
to locate this problem using windbg?
Any help is appreciated.
Thanks
Annie.
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