Tracking an IRP

Hi

I have a weird issue in which an IRP is marked as pending , and !irp shows my driver as the driver which marks it pending. However I am not marking as pending. Are there any ways in which I can track an IRP , as it flows throw the device stack.

Regards

Manish

Have you tried to use OSR’s IrpTracker?

Igor Sharovar

Have you tried OSR’s IrpTracker
http://www.osronline.com/article.cfm?article=199?

Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Manish Jawa” wrote in message
news:xxxxx@ntdev:

> Hi
>
>
>
> I have a weird issue in which an IRP is marked as pending , and !irp shows my driver as the driver which marks it pending. However I am not marking as pending. Are there any ways in which I can track an IRP , as it flows throw the device stack.
>
>
>
> Regards
>
> Manish
>

Osr’s Irptracker. But you probably violated one of the rules for
processing Irps, so reviewing your code and checking with
http://support.microsoft.com/kb/320275
http://msdn.microsoft.com/en-us/library/ff551776(VS.85).aspx and other
related documents.

Mark Roddy

On Mon, Oct 4, 2010 at 10:35 AM, Manish Jawa wrote:
> Hi
>
> I have a weird issue in which an IRP is marked as pending , and !irp shows
> my driver as the driver which marks it pending. However I am not marking as
> pending. Are there any ways in which I can track an IRP , as it flows throw
> the device stack.
>
> Regards
> Manish
>
> —
> 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

Is it a kmdf driver?

d

dent from a phpne with no keynoard


From: Manish Jawa
Sent: October 04, 2010 7:36 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Tracking an IRP

Hi

I have a weird issue in which an IRP is marked as pending , and !irp shows my driver as the driver which marks it pending. However I am not marking as pending. Are there any ways in which I can track an IRP , as it flows throw the device stack.

Regards
Manish


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

yes, it is a kmdf driver.

From: xxxxx@microsoft.com
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] Tracking an IRP
Date: Mon, 4 Oct 2010 15:44:14 +0000

Is it a kmdf driver?

d

dent from a phpne with no keynoard

From: Manish Jawa
Sent: October 04, 2010 7:36 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Tracking an IRP

Hi

I have a weird issue in which an IRP is marked as pending , and !irp shows my driver as the driver which marks it pending. However I am not marking as pending. Are there any ways in which I can track an IRP , as it flows throw the device stack.

Regards
Manish


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

Kmdf always pends irps

d

dent from a phpne with no keynoard


From: Manish Jawa
Sent: October 04, 2010 9:38 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Tracking an IRP

yes, it is a kmdf driver.


From: xxxxx@microsoft.com
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] Tracking an IRP
Date: Mon, 4 Oct 2010 15:44:14 +0000

Is it a kmdf driver?

d

dent from a phpne with no keynoard


From: Manish Jawa
Sent: October 04, 2010 7:36 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Tracking an IRP

Hi

I have a weird issue in which an IRP is marked as pending , and !irp shows my driver as the driver which marks it pending. However I am not marking as pending. Are there any ways in which I can track an IRP , as it flows throw the device stack.

Regards
Manish


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

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

On further debugging I found that IRP just keeps waiting in the WDF queue . The major code of IRP is InternalDeviceIOControl and we have a handler registered for it in queue. I am not sure why it just keeps sitting there.

kd> !wdfdriverinfo ctxusbb

Default driver image name: ctxusbb
WDF library image name: wdf01000
FxDriverGlobals 0x81269d48
WdfBindInfo 0xf8ff70ac
Version v1.7 build(6001)

WDFDRIVER: 0x7ee0d3f0

!WDFDEVICE 0x7ee0e1c0


!WDFDEVICE 0x7ee1a4d0


!WDFDEVICE 0x004a4fe8
context: dt 0xffb5b1d8 USB_DEVICE_CONTEXT (size is 0x1c bytes)
EvtCleanupCallback f8fe4240 ctxusbb!Bus_EvtCleanupDevice
EvtDestroyCallback f8fe3ac0 ctxusbb!Bus_EvtDestroyDevice

!WDFDEVICE 0x7ed9a698
context: dt 0x81265b28 CONTROL_DEVICE_CONTEXT (size is 0x38 bytes)


!WDFDEVICE 0x008eb558
context: dt 0xff714c68 WDFDEVICE (size is 0x4 bytes)

----------------------------------
kd> !WDFDEVICEqueues 0x008eb558

Dumping queues of WDFDEVICE 0x008eb558
=====================================
Number of queues: 1
----------------------------------
Queue: 1 (!wdfqueue 0x0042da58)
Parallel, Default, Power-managed, PowerOff, Passive Only, Can accept, Can dispatch, ExecutionLevelPassive, SynchronizationScopeNone
Number of driver owned requests: 0
Number of waiting requests: 1
!WDFREQUEST 0x008b9a98 !IRP 0xffb69008

EvtIoDeviceControl: (0xf8fe49d0) ctxusbb!Bus_EvtIoDeviceControl
EvtIoInternalDeviceControl: (0xf8fe3ca0) ctxusbb!Bus_EvtIoInternalDeviceControl
kd> !IRP 0xffb69008
Irp is active with 2 stacks 2 is current (= 0xffb6909c)
No Mdl: System buffer=81262b20: Thread ffbdd628: Irp stack trace.
cmd flg cl Device File Completion-Context
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
>[f, 0] 0 1 ff773200 00000000 00000000-00000000 pending
\Driver\ctxusbb
Args: 00000004 00000000 00222854 00000000

From: xxxxx@hotmail.com
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] Tracking an IRP
Date: Tue, 5 Oct 2010 04:38:09 +0000

yes, it is a kmdf driver.

From: xxxxx@microsoft.com
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] Tracking an IRP
Date: Mon, 4 Oct 2010 15:44:14 +0000

Is it a kmdf driver?

d

dent from a phpne with no keynoard

From: Manish Jawa
Sent: October 04, 2010 7:36 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Tracking an IRP

Hi

I have a weird issue in which an IRP is marked as pending , and !irp shows my driver as the driver which marks it pending. However I am not marking as pending. Are there any ways in which I can track an IRP , as it flows throw the device stack.

Regards
Manish


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

Have you manually changed the queue’s state? It is power managed and off if I read the output correctly. What is the device’s power state (output of !wdfdevice)

d

kd> !WDFDEVICEqueues 0x008eb558
Dumping queues of WDFDEVICE 0x008eb558

Number of queues: 1

Queue: 1 (!wdfqueue 0x0042da58)
Parallel, Default, Power-managed, PowerOff, Passive Only, Can accept, Can dispatch, ExecutionLevelPassive, SynchronizationScopeNone
Number of driver owned requests: 0
Number of waiting requests: 1
!WDFREQUEST 0x008b9a98 !IRP 0xffb69008

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Manish Jawa
Sent: Wednesday, October 06, 2010 10:37 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Tracking an IRP

On further debugging I found that IRP just keeps waiting in the WDF queue . The major code of IRP is InternalDeviceIOControl and we have a handler registered for it in queue. I am not sure why it just keeps sitting there.

kd> !wdfdriverinfo ctxusbb

Default driver image name: ctxusbb
WDF library image name: wdf01000
FxDriverGlobals 0x81269d48
WdfBindInfo 0xf8ff70ac
Version v1.7 build(6001)

WDFDRIVER: 0x7ee0d3f0
!WDFDEVICE 0x7ee0e1c0

!WDFDEVICE 0x7ee1a4d0

!WDFDEVICE 0x004a4fe8
context: dt 0xffb5b1d8 USB_DEVICE_CONTEXT (size is 0x1c bytes)
EvtCleanupCallback f8fe4240 ctxusbb!Bus_EvtCleanupDevice
EvtDestroyCallback f8fe3ac0 ctxusbb!Bus_EvtDestroyDevice
!WDFDEVICE 0x7ed9a698
context: dt 0x81265b28 CONTROL_DEVICE_CONTEXT (size is 0x38 bytes)

!WDFDEVICE 0x008eb558
context: dt 0xff714c68 WDFDEVICE (size is 0x4 bytes)

----------------------------------
kd> !WDFDEVICEqueues 0x008eb558
Dumping queues of WDFDEVICE 0x008eb558
=====================================
Number of queues: 1
----------------------------------
Queue: 1 (!wdfqueue 0x0042da58)
Parallel, Default, Power-managed, PowerOff, Passive Only, Can accept, Can dispatch, ExecutionLevelPassive, SynchronizationScopeNone
Number of driver owned requests: 0
Number of waiting requests: 1
!WDFREQUEST 0x008b9a98 !IRP 0xffb69008

EvtIoDeviceControl: (0xf8fe49d0) ctxusbb!Bus_EvtIoDeviceControl
EvtIoInternalDeviceControl: (0xf8fe3ca0) ctxusbb!Bus_EvtIoInternalDeviceControl
kd> !IRP 0xffb69008
Irp is active with 2 stacks 2 is current (= 0xffb6909c)
No Mdl: System buffer=81262b20: Thread ffbdd628: Irp stack trace.
cmd flg cl Device File Completion-Context
[0, 0] 0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
>[f, 0] 0 1 ff773200 00000000 00000000-00000000 pending
\Driver\ctxusbb
Args: 00000004 00000000 00222854 00000000


From: xxxxx@hotmail.com
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] Tracking an IRP
Date: Tue, 5 Oct 2010 04:38:09 +0000

yes, it is a kmdf driver.


From: xxxxx@microsoft.com
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] Tracking an IRP
Date: Mon, 4 Oct 2010 15:44:14 +0000

Is it a kmdf driver?

d

dent from a phpne with no keynoard
________________________________
From: Manish Jawa
Sent: October 04, 2010 7:36 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Tracking an IRP
Hi

I have a weird issue in which an IRP is marked as pending , and !irp shows my driver as the driver which marks it pending. However I am not marking as pending. Are there any ways in which I can track an IRP , as it flows throw the device stack.

Regards
Manish


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

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

Nope I have not changed it manually.

kd> !wdfdevice 0x008eb558

Dumping WDFDEVICE 0x008eb558

WDM PDEVICE_OBJECTs: self ff773200

Pnp state: 105 ( WdfDevStatePnpInit )
Power state: 300 ( WdfDevStatePowerObjectCreated )
Power Pol state: 500 ( WdfDevStatePwrPolObjectCreated )

Parent WDFDEVICE 004a4fe8
Parent states:
Pnp state: 119 ( WdfDevStatePnpStarted )
Power state: 307 ( WdfDevStatePowerD0 )
Power Pol state: 565 ( WdfDevStatePwrPolStarted )

No pended pnp or power irps

From: xxxxx@microsoft.com
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] Tracking an IRP
Date: Thu, 7 Oct 2010 06:51:42 +0000

Have you manually changed the queue?s state? It is power managed and off if I read the output correctly. What is the device?s power state (output of !wdfdevice)

d

kd> !WDFDEVICEqueues 0x008eb558
Dumping queues of WDFDEVICE 0x008eb558

Number of queues: 1

Queue: 1 (!wdfqueue 0x0042da58)
Parallel, Default, Power-managed, PowerOff, Passive Only, Can accept, Can dispatch, ExecutionLevelPassive, SynchronizationScopeNone
Number of driver owned requests: 0
Number of waiting requests: 1
!WDFREQUEST 0x008b9a98 !IRP 0xffb69008

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Manish Jawa
Sent: Wednesday, October 06, 2010 10:37 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Tracking an IRP

On further debugging I found that IRP just keeps waiting in the WDF queue . The major code of IRP is InternalDeviceIOControl and we have a handler registered for it in queue. I am not sure why it just keeps sitting there.

kd> !wdfdriverinfo ctxusbb

Default driver image name: ctxusbb
WDF library image name: wdf01000
FxDriverGlobals 0x81269d48
WdfBindInfo 0xf8ff70ac
Version v1.7 build(6001)

WDFDRIVER: 0x7ee0d3f0
!WDFDEVICE 0x7ee0e1c0

!WDFDEVICE 0x7ee1a4d0

!WDFDEVICE 0x004a4fe8
context: dt 0xffb5b1d8 USB_DEVICE_CONTEXT (size is 0x1c bytes)
EvtCleanupCallback f8fe4240 ctxusbb!Bus_EvtCleanupDevice
EvtDestroyCallback f8fe3ac0 ctxusbb!Bus_EvtDestroyDevice
!WDFDEVICE 0x7ed9a698
context: dt 0x81265b28 CONTROL_DEVICE_CONTEXT (size is 0x38 bytes)

!WDFDEVICE 0x008eb558
context: dt 0xff714c68 WDFDEVICE (size is 0x4 bytes)

----------------------------------
kd> !WDFDEVICEqueues 0x008eb558
Dumping queues of WDFDEVICE 0x008eb558
=====================================
Number of queues: 1
----------------------------------
Queue: 1 (!wdfqueue 0x0042da58)
Parallel, Default, Power-managed, PowerOff, Passive Only, Can accept, Can dispatch, ExecutionLevelPassive, SynchronizationScopeNone
Number of driver owned requests: 0
Number of waiting requests: 1
!WDFREQUEST 0x008b9a98 !IRP 0xffb69008

EvtIoDeviceControl: (0xf8fe49d0) ctxusbb!Bus_EvtIoDeviceControl
EvtIoInternalDeviceControl: (0xf8fe3ca0) ctxusbb!Bus_EvtIoInternalDeviceControl
kd> !IRP 0xffb69008
Irp is active with 2 stacks 2 is current (= 0xffb6909c)
No Mdl: System buffer=81262b20: Thread ffbdd628: Irp stack trace.
cmd flg cl Device File Completion-Context
[0, 0] 0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
>[f, 0] 0 1 ff773200 00000000 00000000-00000000 pending
\Driver\ctxusbb
Args: 00000004 00000000 00222854 00000000

From: xxxxx@hotmail.com
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] Tracking an IRP
Date: Tue, 5 Oct 2010 04:38:09 +0000

yes, it is a kmdf driver.

From: xxxxx@microsoft.com
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] Tracking an IRP
Date: Mon, 4 Oct 2010 15:44:14 +0000

Is it a kmdf driver?

d

dent from a phpne with no keynoard

From: Manish Jawa
Sent: October 04, 2010 7:36 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Tracking an IRP

Hi

I have a weird issue in which an IRP is marked as pending , and !irp shows my driver as the driver which marks it pending. However I am not marking as pending. Are there any ways in which I can track an IRP , as it flows throw the device stack.

Regards
Manish


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

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

Well the queue is off because the pdo has not started yet, and thus not powered up. You should make the top level dispatching queue non power managed and the create a 2ndary queue that is power managed for the requests that require power. You fwd these requests to the secondary queue.

d

dent from a phpne with no keynoard


From: Manish Jawa
Sent: October 07, 2010 12:08 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Tracking an IRP

Nope I have not changed it manually.

kd> !wdfdevice 0x008eb558
Dumping WDFDEVICE 0x008eb558
=================================
WDM PDEVICE_OBJECTs: self ff773200
Pnp state: 105 ( WdfDevStatePnpInit )
Power state: 300 ( WdfDevStatePowerObjectCreated )
Power Pol state: 500 ( WdfDevStatePwrPolObjectCreated )
Parent WDFDEVICE 004a4fe8
Parent states:
Pnp state: 119 ( WdfDevStatePnpStarted )
Power state: 307 ( WdfDevStatePowerD0 )
Power Pol state: 565 ( WdfDevStatePwrPolStarted )
No pended pnp or power irps


From: xxxxx@microsoft.com
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] Tracking an IRP
Date: Thu, 7 Oct 2010 06:51:42 +0000

Have you manually changed the queue?s state? It is power managed and off if I read the output correctly. What is the device?s power state (output of !wdfdevice)

d

kd> !WDFDEVICEqueues 0x008eb558
Dumping queues of WDFDEVICE 0x008eb558
=====================================
Number of queues: 1
----------------------------------
Queue: 1 (!wdfqueue 0x0042da58)
Parallel, Default, Power-managed, PowerOff, Passive Only, Can accept, Can dispatch, ExecutionLevelPassive, SynchronizationScopeNone
Number of driver owned requests: 0
Number of waiting requests: 1
!WDFREQUEST 0x008b9a98 !IRP 0xffb69008

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Manish Jawa
Sent: Wednesday, October 06, 2010 10:37 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Tracking an IRP

On further debugging I found that IRP just keeps waiting in the WDF queue . The major code of IRP is InternalDeviceIOControl and we have a handler registered for it in queue. I am not sure why it just keeps sitting there.

kd> !wdfdriverinfo ctxusbb
----------------------------------
Default driver image name: ctxusbb
WDF library image name: wdf01000
FxDriverGlobals 0x81269d48
WdfBindInfo 0xf8ff70ac
Version v1.7 build(6001)
----------------------------------
WDFDRIVER: 0x7ee0d3f0
!WDFDEVICE 0x7ee0e1c0

!WDFDEVICE 0x7ee1a4d0

!WDFDEVICE 0x004a4fe8
context: dt 0xffb5b1d8 USB_DEVICE_CONTEXT (size is 0x1c bytes)
EvtCleanupCallback f8fe4240 ctxusbb!Bus_EvtCleanupDevice
EvtDestroyCallback f8fe3ac0 ctxusbb!Bus_EvtDestroyDevice
!WDFDEVICE 0x7ed9a698
context: dt 0x81265b28 CONTROL_DEVICE_CONTEXT (size is 0x38 bytes)

!WDFDEVICE 0x008eb558
context: dt 0xff714c68 WDFDEVICE (size is 0x4 bytes)

----------------------------------
kd> !WDFDEVICEqueues 0x008eb558
Dumping queues of WDFDEVICE 0x008eb558
=====================================
Number of queues: 1
----------------------------------
Queue: 1 (!wdfqueue 0x0042da58)
Parallel, Default, Power-managed, PowerOff, Passive Only, Can accept, Can dispatch, ExecutionLevelPassive, SynchronizationScopeNone
Number of driver owned requests: 0
Number of waiting requests: 1
!WDFREQUEST 0x008b9a98 !IRP 0xffb69008

EvtIoDeviceControl: (0xf8fe49d0) ctxusbb!Bus_EvtIoDeviceControl
EvtIoInternalDeviceControl: (0xf8fe3ca0) ctxusbb!Bus_EvtIoInternalDeviceControl
kd> !IRP 0xffb69008
Irp is active with 2 stacks 2 is current (= 0xffb6909c)
No Mdl: System buffer=81262b20: Thread ffbdd628: Irp stack trace.
cmd flg cl Device File Completion-Context
[0, 0] 0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
>[f, 0] 0 1 ff773200 00000000 00000000-00000000 pending
\Driver\ctxusbb
Args: 00000004 00000000 00222854 00000000



From: xxxxx@hotmail.com
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] Tracking an IRP
Date: Tue, 5 Oct 2010 04:38:09 +0000

yes, it is a kmdf driver.



From: xxxxx@microsoft.com
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] Tracking an IRP
Date: Mon, 4 Oct 2010 15:44:14 +0000

Is it a kmdf driver?

d

dent from a phpne with no keynoard



From: Manish Jawa
Sent: October 04, 2010 7:36 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Tracking an IRP

Hi

I have a weird issue in which an IRP is marked as pending , and !irp shows my driver as the driver which marks it pending. However I am not marking as pending. Are there any ways in which I can track an IRP , as it flows throw the device stack.

Regards
Manish


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

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

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

Thanks Doronn for replying. Is there any sample which demonstartes this. I am relatively new to KMDf.

From: xxxxx@microsoft.com
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] Tracking an IRP
Date: Thu, 7 Oct 2010 07:14:36 +0000

Well the queue is off because the pdo has not started yet, and thus not powered up. You should make the top level dispatching queue non power managed and the create a 2ndary queue that is power managed for the requests that require power. You fwd these requests to the secondary queue.

d

dent from a phpne with no keynoard

From: Manish Jawa
Sent: October 07, 2010 12:08 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Tracking an IRP

Nope I have not changed it manually.

kd> !wdfdevice 0x008eb558
Dumping WDFDEVICE 0x008eb558
=================================
WDM PDEVICE_OBJECTs: self ff773200
Pnp state: 105 ( WdfDevStatePnpInit )
Power state: 300 ( WdfDevStatePowerObjectCreated )
Power Pol state: 500 ( WdfDevStatePwrPolObjectCreated )
Parent WDFDEVICE 004a4fe8
Parent states:
Pnp state: 119 ( WdfDevStatePnpStarted )
Power state: 307 ( WdfDevStatePowerD0 )
Power Pol state: 565 ( WdfDevStatePwrPolStarted )
No pended pnp or power irps

From: xxxxx@microsoft.com
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] Tracking an IRP
Date: Thu, 7 Oct 2010 06:51:42 +0000

Have you manually changed the queue?s state? It is power managed and off if I read the output correctly. What is the device?s power state (output of !wdfdevice)

d

kd> !WDFDEVICEqueues 0x008eb558
Dumping queues of WDFDEVICE 0x008eb558
=====================================
Number of queues: 1
----------------------------------
Queue: 1 (!wdfqueue 0x0042da58)
Parallel, Default, Power-managed, PowerOff, Passive Only, Can accept, Can dispatch, ExecutionLevelPassive, SynchronizationScopeNone
Number of driver owned requests: 0
Number of waiting requests: 1
!WDFREQUEST 0x008b9a98 !IRP 0xffb69008

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Manish Jawa
Sent: Wednesday, October 06, 2010 10:37 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Tracking an IRP

On further debugging I found that IRP just keeps waiting in the WDF queue . The major code of IRP is InternalDeviceIOControl and we have a handler registered for it in queue. I am not sure why it just keeps sitting there.

kd> !wdfdriverinfo ctxusbb
----------------------------------
Default driver image name: ctxusbb
WDF library image name: wdf01000
FxDriverGlobals 0x81269d48
WdfBindInfo 0xf8ff70ac
Version v1.7 build(6001)
----------------------------------
WDFDRIVER: 0x7ee0d3f0
!WDFDEVICE 0x7ee0e1c0

!WDFDEVICE 0x7ee1a4d0

!WDFDEVICE 0x004a4fe8
context: dt 0xffb5b1d8 USB_DEVICE_CONTEXT (size is 0x1c bytes)
EvtCleanupCallback f8fe4240 ctxusbb!Bus_EvtCleanupDevice
EvtDestroyCallback f8fe3ac0 ctxusbb!Bus_EvtDestroyDevice
!WDFDEVICE 0x7ed9a698
context: dt 0x81265b28 CONTROL_DEVICE_CONTEXT (size is 0x38 bytes)

!WDFDEVICE 0x008eb558
context: dt 0xff714c68 WDFDEVICE (size is 0x4 bytes)

----------------------------------
kd> !WDFDEVICEqueues 0x008eb558
Dumping queues of WDFDEVICE 0x008eb558
=====================================
Number of queues: 1
----------------------------------
Queue: 1 (!wdfqueue 0x0042da58)
Parallel, Default, Power-managed, PowerOff, Passive Only, Can accept, Can dispatch, ExecutionLevelPassive, SynchronizationScopeNone
Number of driver owned requests: 0
Number of waiting requests: 1
!WDFREQUEST 0x008b9a98 !IRP 0xffb69008

EvtIoDeviceControl: (0xf8fe49d0) ctxusbb!Bus_EvtIoDeviceControl
EvtIoInternalDeviceControl: (0xf8fe3ca0) ctxusbb!Bus_EvtIoInternalDeviceControl
kd> !IRP 0xffb69008
Irp is active with 2 stacks 2 is current (= 0xffb6909c)
No Mdl: System buffer=81262b20: Thread ffbdd628: Irp stack trace.
cmd flg cl Device File Completion-Context
[0, 0] 0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
>[f, 0] 0 1 ff773200 00000000 00000000-00000000 pending
\Driver\ctxusbb
Args: 00000004 00000000 00222854 00000000

From: xxxxx@hotmail.com
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] Tracking an IRP
Date: Tue, 5 Oct 2010 04:38:09 +0000

yes, it is a kmdf driver.

From: xxxxx@microsoft.com
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] Tracking an IRP
Date: Mon, 4 Oct 2010 15:44:14 +0000

Is it a kmdf driver?

d

dent from a phpne with no keynoard

From: Manish Jawa
Sent: October 04, 2010 7:36 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Tracking an IRP

Hi

I have a weird issue in which an IRP is marked as pending , and !irp shows my driver as the driver which marks it pending. However I am not marking as pending. Are there any ways in which I can track an IRP , as it flows throw the device stack.

Regards
Manish


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

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

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