Lost IRP

Hi

I am debugging a case when I issue IRP_MN_REMOVE_DEVICE to my graphic device and the IRP never finished

I tried to look for it on the debugger (using !irp) .
I found that the IRP is valid and the curret stack is my driver (rizalt)
But when I looked at the device (!devobj) I can see that there is no IRP in the device

Can someone explain this ?

Thanks
Yossi

1: kd> !devobj 9E3C6708
Device object (9e3c6708) is for:
\Driver\rizalt DriverObject 88aca630
Current Irp 00000000 RefCount 0 Type 00000023 Flags 00002004
DevExt 9e3c67c0 DevObjExt 9e3c6d60
ExtensionFlags (0x00000808) DOE_REMOVE_PROCESSED
Unknown flags 0x00000800
AttachedTo (Lower) 9e3a9958 \Driver\ACPI
Device queue is not busy.

1: kd> !irp 84373678
Irp is active with 3 stacks 3 is current (= 0x84373730)
No Mdl: No System Buffer: Thread 83b99d78: Irp stack trace.
cmd flg cl Device File Completion-Context
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000

[1b, 2] 0 0 9e3c6708 00000000 00000000-00000000
\Driver\rizalt
Args: 00000000 00000000 00000000 00000000

That just means that legacy system queue IRPs aren’t queued in the device
object. The IRP in question is not going to get queued that way.

On Mon, Jun 2, 2008 at 9:23 AM, Yossi Leybovich <
xxxxx@wilocity.com> wrote:

Hi

I am debugging a case when I issue IRP_MN_REMOVE_DEVICE to my graphic
device and the IRP never finished

I tried to look for it on the debugger (using !irp) .

I found that the IRP is valid and the curret stack is my driver (rizalt)

But when I looked at the device (!devobj) I can see that there is no IRP in
the device

Can someone explain this ?

Thanks

Yossi

1: kd> !devobj 9E3C6708

Device object (9e3c6708) is for:

\Driver\rizalt DriverObject 88aca630

Current Irp 00000000 RefCount 0 Type 00000023 Flags 00002004

DevExt 9e3c67c0 DevObjExt 9e3c6d60

ExtensionFlags (0x00000808) DOE_REMOVE_PROCESSED

Unknown flags 0x00000800

AttachedTo (Lower) 9e3a9958 \Driver\ACPI

Device queue is not busy.

1: kd> !irp 84373678

Irp is active with 3 stacks 3 is current (= 0x84373730)

No Mdl: No System Buffer: Thread 83b99d78: Irp stack trace.

cmd flg cl Device File Completion-Context

[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000
00000000 00000000

[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000
00000000 00000000

>[1b, 2] 0 0 9e3c6708 00000000 00000000-00000000

\Driver\rizalt

Args: 00000000 00000000
00000000 00000000


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


Mark Roddy

Are you creating and sending the remove irp to work around a potential bug? If so, a whole lot of things will break…

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Yossi Leybovich
Sent: Monday, June 02, 2008 6:24 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Lost IRP

Hi

I am debugging a case when I issue IRP_MN_REMOVE_DEVICE to my graphic device and the IRP never finished

I tried to look for it on the debugger (using !irp) .
I found that the IRP is valid and the curret stack is my driver (rizalt)
But when I looked at the device (!devobj) I can see that there is no IRP in the device

Can someone explain this ?

Thanks
Yossi

1: kd> !devobj 9E3C6708
Device object (9e3c6708) is for:
\Driver\rizalt DriverObject 88aca630
Current Irp 00000000 RefCount 0 Type 00000023 Flags 00002004
DevExt 9e3c67c0 DevObjExt 9e3c6d60
ExtensionFlags (0x00000808) DOE_REMOVE_PROCESSED
Unknown flags 0x00000800
AttachedTo (Lower) 9e3a9958 \Driver\ACPI
Device queue is not busy.

1: kd> !irp 84373678
Irp is active with 3 stacks 3 is current (= 0x84373730)
No Mdl: No System Buffer: Thread 83b99d78: Irp stack trace.
cmd flg cl Device File Completion-Context
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000

[1b, 2] 0 0 9e3c6708 00000000 00000000-00000000
\Driver\rizalt
Args: 00000000 00000000 00000000 00000000


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

Actually its sort of WA

Vista not allow to have 2 different display adapter , and it automatically disables one of them .
(BTW do you know why ? is it going to be change ?
I know that people who want to use their laptop with external GPU force to work with XP)

Any how I am trying to enable this by presenting one driver for both adapter.
Now I am trying to test hot plug/unplug and here I am facing lots of troubles
While testing my driver I discover that display adapter not handle hot unplug/plug event and if display adapter get SURPRISE_REMOVEPnP it get stuck.

My WA was to change SURPRISE_REMOVE IRP to QUERY_REMOVE IRP .
Now I can see that my REMOVE_DEVICE IRP get stuck and try to understand why.

Any hint ?

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Monday, June 02, 2008 6:15 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Lost IRP

Are you creating and sending the remove irp to work around a potential bug? If so, a whole lot of things will break…

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Yossi Leybovich
Sent: Monday, June 02, 2008 6:24 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Lost IRP

Hi

I am debugging a case when I issue IRP_MN_REMOVE_DEVICE to my graphic device and the IRP never finished

I tried to look for it on the debugger (using !irp) .
I found that the IRP is valid and the curret stack is my driver (rizalt)
But when I looked at the device (!devobj) I can see that there is no IRP in the device

Can someone explain this ?

Thanks
Yossi

1: kd> !devobj 9E3C6708
Device object (9e3c6708) is for:
\Driver\rizalt DriverObject 88aca630
Current Irp 00000000 RefCount 0 Type 00000023 Flags 00002004
DevExt 9e3c67c0 DevObjExt 9e3c6d60
ExtensionFlags (0x00000808) DOE_REMOVE_PROCESSED
Unknown flags 0x00000800
AttachedTo (Lower) 9e3a9958 \Driver\ACPI
Device queue is not busy.

1: kd> !irp 84373678
Irp is active with 3 stacks 3 is current (= 0x84373730)
No Mdl: No System Buffer: Thread 83b99d78: Irp stack trace.
cmd flg cl Device File Completion-Context
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000

[1b, 2] 0 0 9e3c6708 00000000 00000000-00000000
\Driver\rizalt
Args: 00000000 00000000 00000000 00000000


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

Yes, the hint is that you are going down a road that will never lead to success. You cannot arbitrarily change the order of state changing pnp irps nor their meaning so converting a surprise remove to a query remove is one of the worst ideas I have heard in a long time. Look at the semantics. Surprise remove irps cannot fail and must be sent down the stack. A query remove irp can fail and anyone in the stack can complete it w/out sending it down the stack. So the display adapter sees your query remove and fails it and then thinks it is still in the started state. The OS thinks it is in the s.r. state, the miniport can’t touch hardware anymore though even though it thinks it still can…

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Yossi Leybovich
Sent: Monday, June 02, 2008 8:35 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Lost IRP

Actually its sort of WA

Vista not allow to have 2 different display adapter , and it automatically disables one of them .
(BTW do you know why ? is it going to be change ?
I know that people who want to use their laptop with external GPU force to work with XP)

Any how I am trying to enable this by presenting one driver for both adapter.
Now I am trying to test hot plug/unplug and here I am facing lots of troubles
While testing my driver I discover that display adapter not handle hot unplug/plug event and if display adapter get SURPRISE_REMOVEPnP it get stuck.

My WA was to change SURPRISE_REMOVE IRP to QUERY_REMOVE IRP .
Now I can see that my REMOVE_DEVICE IRP get stuck and try to understand why.

Any hint ?

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Monday, June 02, 2008 6:15 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Lost IRP

Are you creating and sending the remove irp to work around a potential bug? If so, a whole lot of things will break…

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Yossi Leybovich
Sent: Monday, June 02, 2008 6:24 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Lost IRP

Hi

I am debugging a case when I issue IRP_MN_REMOVE_DEVICE to my graphic device and the IRP never finished

I tried to look for it on the debugger (using !irp) .
I found that the IRP is valid and the curret stack is my driver (rizalt)
But when I looked at the device (!devobj) I can see that there is no IRP in the device

Can someone explain this ?

Thanks
Yossi

1: kd> !devobj 9E3C6708
Device object (9e3c6708) is for:
\Driver\rizalt DriverObject 88aca630
Current Irp 00000000 RefCount 0 Type 00000023 Flags 00002004
DevExt 9e3c67c0 DevObjExt 9e3c6d60
ExtensionFlags (0x00000808) DOE_REMOVE_PROCESSED
Unknown flags 0x00000800
AttachedTo (Lower) 9e3a9958 \Driver\ACPI
Device queue is not busy.

1: kd> !irp 84373678
Irp is active with 3 stacks 3 is current (= 0x84373730)
No Mdl: No System Buffer: Thread 83b99d78: Irp stack trace.
cmd flg cl Device File Completion-Context
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000

[1b, 2] 0 0 9e3c6708 00000000 00000000-00000000
\Driver\rizalt
Args: 00000000 00000000 00000000 00000000


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

Still how can I enable 2 display adapter on Vista ?
Without all this hacks Vista simply disable one of the adapters.

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Monday, June 02, 2008 7:54 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Lost IRP

Yes, the hint is that you are going down a road that will never lead to success. You cannot arbitrarily change the order of state changing pnp irps nor their meaning so converting a surprise remove to a query remove is one of the worst ideas I have heard in a long time. Look at the semantics. Surprise remove irps cannot fail and must be sent down the stack. A query remove irp can fail and anyone in the stack can complete it w/out sending it down the stack. So the display adapter sees your query remove and fails it and then thinks it is still in the started state. The OS thinks it is in the s.r. state, the miniport can’t touch hardware anymore though even though it thinks it still can…

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Yossi Leybovich
Sent: Monday, June 02, 2008 8:35 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Lost IRP

Actually its sort of WA

Vista not allow to have 2 different display adapter , and it automatically disables one of them .
(BTW do you know why ? is it going to be change ?
I know that people who want to use their laptop with external GPU force to work with XP)

Any how I am trying to enable this by presenting one driver for both adapter.
Now I am trying to test hot plug/unplug and here I am facing lots of troubles
While testing my driver I discover that display adapter not handle hot unplug/plug event and if display adapter get SURPRISE_REMOVEPnP it get stuck.

My WA was to change SURPRISE_REMOVE IRP to QUERY_REMOVE IRP .
Now I can see that my REMOVE_DEVICE IRP get stuck and try to understand why.

Any hint ?

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Monday, June 02, 2008 6:15 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Lost IRP

Are you creating and sending the remove irp to work around a potential bug? If so, a whole lot of things will break…

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Yossi Leybovich
Sent: Monday, June 02, 2008 6:24 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Lost IRP

Hi

I am debugging a case when I issue IRP_MN_REMOVE_DEVICE to my graphic device and the IRP never finished

I tried to look for it on the debugger (using !irp) .
I found that the IRP is valid and the curret stack is my driver (rizalt)
But when I looked at the device (!devobj) I can see that there is no IRP in the device

Can someone explain this ?

Thanks
Yossi

1: kd> !devobj 9E3C6708
Device object (9e3c6708) is for:
\Driver\rizalt DriverObject 88aca630
Current Irp 00000000 RefCount 0 Type 00000023 Flags 00002004
DevExt 9e3c67c0 DevObjExt 9e3c6d60
ExtensionFlags (0x00000808) DOE_REMOVE_PROCESSED
Unknown flags 0x00000800
AttachedTo (Lower) 9e3a9958 \Driver\ACPI
Device queue is not busy.

1: kd> !irp 84373678
Irp is active with 3 stacks 3 is current (= 0x84373730)
No Mdl: No System Buffer: Thread 83b99d78: Irp stack trace.
cmd flg cl Device File Completion-Context
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000

[1b, 2] 0 0 9e3c6708 00000000 00000000-00000000
\Driver\rizalt
Args: 00000000 00000000 00000000 00000000


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

Yossi Leybovich wrote:

Still how can I enable 2 display adapter on Vista ? Without all this hacks
Vista simply disable one of the adapters.

What makes you think you are entitled, or even able, to work around this restriction with this hackery? Do you think your display driver will get a logo when it is creating its own PNP IRPs?

Yossi Leybovich wrote:

Still how can I enable 2 display adapter on Vista ?

Without all this hacks Vista simply disable one of the adapters.

If you have an XPDM driver, then the multi-monitor stuff works just like
XP. But Vista does not allow multiple WDDM drivers to run at once. A
single WDDM driver can expose multiple surfaces, so a laptop with an
external CRT plug will work (because it is one chip, and therefore one
driver), but you cannot insert two WDDM graphics adapters from two
different manufacturers.

This will certainly be made to work someday, but WDDM is just too new
for the multi-driver layer to have been implemented yet.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.