!wdflogdump???

Hello,

I have a upper filter driver and when I issue an
“IOCTL_DISK_GET_DRIVE_LAYOUT” ioctl, i get STATUS_INVALID_DEVICE_REQUEST as
return status. I would like to understand the reason for this failure.

I’m able to setup breakpoints and trace my driver, unable to see the log
dump and i get the following from windbg.

“Could not find mywdffltr in wdfldr client list”

Not sure what am I missing.

Thanks in advance,
-Raj P.

Make sure you have valid symbols for wdfldr.sys and wdf01000.sys

d

Bent from my phone


From: Rajinikanth Panduranganmailto:xxxxx
Sent: ?5/?15/?2013 3:14 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] !wdflogdump???

Hello,

I have a upper filter driver and when I issue an “IOCTL_DISK_GET_DRIVE_LAYOUT” ioctl, i get STATUS_INVALID_DEVICE_REQUEST as return status. I would like to understand the reason for this failure.

I’m able to setup breakpoints and trace my driver, unable to see the log dump and i get the following from windbg.

“Could not find mywdffltr in wdfldr client list”

Not sure what am I missing.

Thanks in advance,
-Raj P.
— NTDEV is sponsored by OSR OSR is HIRING!! See http://www.osr.com/careers 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</mailto:xxxxx></mailto:xxxxx>

Hello Doron,

I’m able to setup break points and step through, can I safely assume I have
the right symbols?

Thanks,
-Raj P

On Wed, May 15, 2013 at 3:36 PM, Doron Holan wrote:

> Make sure you have valid symbols for wdfldr.sys and wdf01000.sys
>
> d
>
> Bent from my phone
> ------------------------------
> From: Rajinikanth Pandurangan
> Sent: 5/15/2013 3:14 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] !wdflogdump???
>
> Hello,
>
> I have a upper filter driver and when I issue an
> “IOCTL_DISK_GET_DRIVE_LAYOUT” ioctl, i get STATUS_INVALID_DEVICE_REQUEST as
> return status. I would like to understand the reason for this failure.
>
> I’m able to setup breakpoints and trace my driver, unable to see the log
> dump and i get the following from windbg.
>
> “Could not find mywdffltr in wdfldr client list”
>
> Not sure what am I missing.
>
> Thanks in advance,
> -Raj P.
> — NTDEV is sponsored by OSR OSR is HIRING!! See
> http://www.osr.com/careers 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
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> 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
>

Rajinikanth Pandurangan wrote:

I have a upper filter driver and when I issue an
“IOCTL_DISK_GET_DRIVE_LAYOUT” ioctl, i
get STATUS_INVALID_DEVICE_REQUEST as return status. I would like to
understand the reason for this failure.

You are issuing this request from the filter driver? You need to show
us the code that creates the request. Are you providing a file object
in the IRP?

I’m able to setup breakpoints and trace my driver, unable to see the
log dump and i get the following from windbg.
“Could not find mywdffltr in wdfldr client list”
Not sure what am I missing.

Is the driver actually named mywdffltr.sys?


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

Hi Tim,

Yes, it’s my debug driver.

My call is very straight forward.


PWDF_MEMORY_DESCRIPTOR pInMemDesc = NULL;
PWDF_MEMORY_DESCRIPTOR pOutMemDesc = NULL;
WDF_MEMORY_DESCRIPTOR InMemDesc;
WDF_MEMORY_DESCRIPTOR OutMemDesc;
WDF_REQUEST_SEND_OPTIONS options = {0};



WDF_MEMORY_DESCRIPTOR_INIT_BUFFER(&OutMemDesc, OutBuffer,
OutBufferLen);
pOutMemDesc = &OutMemDesc;

status = WdfIoTargetSendIoctlSynchronously(

WdfDeviceGetIoTarget(Device),
NULL,
IOCTL_DISK_GET_DRIVE_LAYOUT,
NULL,
pOutMemDesc,
NULL,
NULL);


Anything obvious???

Thanks,
-Raj P.

On Wed, May 15, 2013 at 3:52 PM, Tim Roberts wrote:

> Rajinikanth Pandurangan wrote:
> >
> > I have a upper filter driver and when I issue an
> > “IOCTL_DISK_GET_DRIVE_LAYOUT” ioctl, i
> > get STATUS_INVALID_DEVICE_REQUEST as return status. I would like to
> > understand the reason for this failure.
>
> You are issuing this request from the filter driver? You need to show
> us the code that creates the request. Are you providing a file object
> in the IRP?
>
>
> > I’m able to setup breakpoints and trace my driver, unable to see the
> > log dump and i get the following from windbg.
> > “Could not find mywdffltr in wdfldr client list”
> > Not sure what am I missing.
>
> Is the driver actually named mywdffltr.sys?
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> 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
>

Breakpoints in your code or in kmdf? !lmi will tell you on a per binary basis

d

Bent from my phone


From: Rajinikanth Panduranganmailto:xxxxx
Sent: ?5/?15/?2013 3:47 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: Re: [ntdev] !wdflogdump???

Hello Doron,

I’m able to setup break points and step through, can I safely assume I have the right symbols?

Thanks,
-Raj P

On Wed, May 15, 2013 at 3:36 PM, Doron Holan > wrote:
Make sure you have valid symbols for wdfldr.sys and wdf01000.sys

d

Bent from my phone
________________________________
From: Rajinikanth Panduranganmailto:xxxxx
Sent: 5/15/2013 3:14 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] !wdflogdump???

Hello,

I have a upper filter driver and when I issue an “IOCTL_DISK_GET_DRIVE_LAYOUT” ioctl, i get STATUS_INVALID_DEVICE_REQUEST as return status. I would like to understand the reason for this failure.

I’m able to setup breakpoints and trace my driver, unable to see the log dump and i get the following from windbg.

“Could not find mywdffltr in wdfldr client list”

Not sure what am I missing.

Thanks in advance,
-Raj P.
— NTDEV is sponsored by OSR OSR is HIRING!! See http://www.osr.com/careers 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

OSR is HIRING!! See http://www.osr.com/careers

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 OSR is HIRING!! See http://www.osr.com/careers 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</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

Rajinikanth Pandurangan wrote:

Yes, it’s my debug driver.

My call is very straight forward.

PWDF_MEMORY_DESCRIPTOR pInMemDesc = NULL;
PWDF_MEMORY_DESCRIPTOR pOutMemDesc = NULL;
WDF_MEMORY_DESCRIPTOR InMemDesc;
WDF_MEMORY_DESCRIPTOR OutMemDesc;
WDF_REQUEST_SEND_OPTIONS options = {0};


WDF_MEMORY_DESCRIPTOR_INIT_BUFFER(&OutMemDesc, OutBuffer,
OutBufferLen);
pOutMemDesc = &OutMemDesc;

Hmm, this touches on a hot button of mine. pInMemDesc and pOutMemDesc
are completely unnecessary here. Just pass &OutMemDesc in the final
call. In my opinion, this kind of code means the programmer did not
understand the difference between a pointer passed as an input
parameter, and an address passed as an output parameter.

Anything obvious???

Well, you’re not passing a file object. I’m not enough of a storage guy
to know whether that ioctl requires a file object, but I would not be
surprised. Hopefully, one of the storage masters will chime in.


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

Hello Doron,

yes, breakpoints were in my code not in kmdf.

Now the output of !lmi wdfldr and !lmi wdf01000 as follows.

3: kd> !lmi wdfldr
Loaded Module Info: [wdfldr]
Module: WDFLDR
Base Address: fffff88001167000
Image Name: WDFLDR.SYS
Machine Type: 34404 (X64)
Time Stamp: 4a5bc11a Mon Jul 13 16:19:54 2009
Size: f000
CheckSum: 11010
Characteristics: 22
Debug Data Dirs: Type Size VA Pointer
CODEVIEW 23, 7218, 6418 RSDS - GUID:
{0BF4AFDA-E001-4DEA-89AB-024EBD67A3EC}
Age: 1, Pdb: wdfldr.pdb
Symbol Type: DEFERRED - No error - symbol load deferred
Load Report: no symbols loaded
3: kd> !lmi wdf01000
Loaded Module Info: [wdf01000]
Module: Wdf01000
Base Address: fffff880010c3000
Image Name: Wdf01000.sys
Machine Type: 34404 (X64)
Time Stamp: 4a5bc19f Mon Jul 13 16:22:07 2009
Size: a4000
CheckSum: a2e74
Characteristics: 22
Debug Data Dirs: Type Size VA Pointer
CODEVIEW 25, 8c884, 8b484 RSDS - GUID:
{99521C1B-3604-41A9-A1EA-ECC9E5087A25}
Age: 1, Pdb: Wdf01000.pdb
Symbol Type: DEFERRED - No error - symbol load deferred
Load Report: no symbols loaded

=======================

and then I tried to see the log by 0: kd> !wdfkd.wdflogdump mywdffltr
Trace searchpath is:

Trace format prefix is: %7!u!: %!FUNC! -
Trying to extract TMF information from -
c:\symbols\Wdf01000.pdb\99521C1B360441A9A1EAECC9E5087A251\Wdf01000.pdb
Log at fffffa8005371000
Gather log: Please wait, this may take a moment (reading 4024 bytes).
% read so far … 10, 20, 30, 40, 100
There are 34 log entries
— start of log —
Unknown( 14): GUID=31f474a8-23f3-c270-e156-7b455a6f635c (No Format
Information found).
Unknown( 14): GUID=31f474a8-23f3-c270-e156-7b455a6f635c (No Format
Information found).
Unknown( 14): GUID=d816b6e3-c6ba-363d-54b4-3533d1de16bb (No Format
Information found).
Unknown( 14): GUID=31f474a8-23f3-c270-e156-7b455a6f635c (No Format
Information found).
Unknown( 14): GUID=31f474a8-23f3-c270-e156-7b455a6f635c (No Format
Information found).
Unknown( 10): GUID=0f1627e4-9104-3b5b-0ee6-1d7b7b807395 (No Format
Information found).
Unknown( 15): GUID=9fad61e3-68ff-f42e-15fe-7a3fb252225e (No Format
Information found).
Unknown( 15): GUID=9fad61e3-68ff-f42e-15fe-7a3fb252225e (No Format
Information found).
Unknown( 15): GUID=9fad61e3-68ff-f42e-15fe-7a3fb252225e (No Format
Information found).
Unknown( 15): GUID=9fad61e3-68ff-f42e-15fe-7a3fb252225e (No Format
Information found).
Unknown( 15): GUID=9fad61e3-68ff-f42e-15fe-7a3fb252225e (No Format
Information found).
Unknown( 26): GUID=b08d780f-dac6-1796-1fec-bf92340e06bb (No Format
Information found).
Unknown( 12): GUID=950bd909-4e9f-8c00-5d83-948120fba76d (No Format
Information found).
Unknown( 12): GUID=950bd909-4e9f-8c00-5d83-948120fba76d (No Format
Information found).
Unknown( 15): GUID=9fad61e3-68ff-f42e-15fe-7a3fb252225e (No Format
Information found).
Unknown( 15): GUID=9fad61e3-68ff-f42e-15fe-7a3fb252225e (No Format
Information found).
Unknown( 10): GUID=0f1627e4-9104-3b5b-0ee6-1d7b7b807395 (No Format
Information found).
Unknown( 10): GUID=0f1627e4-9104-3b5b-0ee6-1d7b7b807395 (No Format
Information found).
Unknown( 14): GUID=31f474a8-23f3-c270-e156-7b455a6f635c (No Format
Information found).
Unknown( 14): GUID=31f474a8-23f3-c270-e156-7b455a6f635c (No Format
Information found).
Unknown( 14): GUID=d816b6e3-c6ba-363d-54b4-3533d1de16bb (No Format
Information found).
Unknown( 20): GUID=0cb05f64-1305-ad9b-046c-8d30905d67c5 (No Format
Information found).
Unknown( 15): GUID=d816b6e3-c6ba-363d-54b4-3533d1de16bb (No Format
Information found).
Unknown( 14): GUID=d816b6e3-c6ba-363d-54b4-3533d1de16bb (No Format
Information found).
Unknown( 14): GUID=31f474a8-23f3-c270-e156-7b455a6f635c (No Format
Information found).
Unknown( 14): GUID=31f474a8-23f3-c270-e156-7b455a6f635c (No Format
Information found).
Unknown( 10): GUID=0f1627e4-9104-3b5b-0ee6-1d7b7b807395 (No Format
Information found).
Unknown( 15): GUID=9fad61e3-68ff-f42e-15fe-7a3fb252225e (No Format
Information found).
Unknown( 15): GUID=9fad61e3-68ff-f42e-15fe-7a3fb252225e (No Format
Information found).
Unknown( 15): GUID=9fad61e3-68ff-f42e-15fe-7a3fb252225e (No Format
Information found).
Unknown( 15): GUID=9fad61e3-68ff-f42e-15fe-7a3fb252225e (No Format
Information found).
Unknown( 15): GUID=9fad61e3-68ff-f42e-15fe-7a3fb252225e (No Format
Information found).
Unknown( 26): GUID=b08d780f-dac6-1796-1fec-bf92340e06bb (No Format
Information found).
Unknown( 12): GUID=950bd909-4e9f-8c00-5d83-948120fba76d (No Format
Information found).
---- end of log ----

I noticed wdf01000.sys symbol type is “DEFFERED”. Is it an issue? How do
I fix it to get proper info in the log?

Thanks a lot for your help.
-Raj P.

On Wed, May 15, 2013 at 4:20 PM, Doron Holan wrote:

> Breakpoints in your code or in kmdf? !lmi will tell you on a per binary
> basis
>
>
> d
>
> Bent from my phone
> ------------------------------
> From: Rajinikanth Pandurangan
> Sent: 5/15/2013 3:47 PM
>
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] !wdflogdump???
>
> Hello Doron,
>
> I’m able to setup break points and step through, can I safely assume I
> have the right symbols?
>
> Thanks,
> -Raj P
>
>
> On Wed, May 15, 2013 at 3:36 PM, Doron Holan wrote:
>
>> Make sure you have valid symbols for wdfldr.sys and wdf01000.sys
>>
>> d
>>
>> Bent from my phone
>> ------------------------------
>> From: Rajinikanth Pandurangan
>> Sent: 5/15/2013 3:14 PM
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] !wdflogdump???
>>
>> Hello,
>>
>> I have a upper filter driver and when I issue an
>> “IOCTL_DISK_GET_DRIVE_LAYOUT” ioctl, i get STATUS_INVALID_DEVICE_REQUEST as
>> return status. I would like to understand the reason for this failure.
>>
>> I’m able to setup breakpoints and trace my driver, unable to see the
>> log dump and i get the following from windbg.
>>
>> “Could not find mywdffltr in wdfldr client list”
>>
>> Not sure what am I missing.
>>
>> Thanks in advance,
>> -Raj P.
>> — NTDEV is sponsored by OSR OSR is HIRING!! See
>> http://www.osr.com/careers 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
>>
>> OSR is HIRING!! See http://www.osr.com/careers
>>
>> 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 OSR is HIRING!! See
> http://www.osr.com/careers 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
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> 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
>

Rajinikanth Pandurangan wrote:

and then I tried to see the log by 0: kd> !wdfkd.wdflogdump mywdffltr
Trace searchpath is:

Trace format prefix is: %7!u!: %!FUNC! -
Trying to extract TMF information from -
c:\symbols\Wdf01000.pdb\99521C1B360441A9A1EAECC9E5087A251\Wdf01000.pdb
Log at fffffa8005371000
Gather log: Please wait, this may take a moment (reading 4024 bytes).
% read so far … 10, 20, 30, 40, 100
There are 34 log entries
— start of log —
Unknown( 14): GUID=31f474a8-23f3-c270-e156-7b455a6f635c (No Format
Information found).

You need to use !wdftmffile to tell it where to find the TMF file for
the version of KMDF you are using.


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

Thanks Tim. I did that and set the path for tmffile. Here is the log.

0: kd> !wdfkd.wdflogdump mywdffltr
Trace searchpath is:

Trace format prefix is: %7!u!: %!FUNC! -
TMF file used for formatting log is:
C:\WinDDK\7600.16385.1\tools\tracing\amd64\wdf01009.tmf
Trying to extract TMF information from -
c:\symbols\Wdf01000.pdb\99521C1B360441A9A1EAECC9E5087A251\Wdf01000.pdb
Log at fffffa8005372000
Gather log: Please wait, this may take a moment (reading 4024 bytes).
% read so far … 10, 100
There are 13 log entries
— start of log —
1: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFAC783F8 !devobj
0xFFFFFA8005263C70 entering PnP State WdfDevStatePnpInit from
WdfDevStatePnpObjectCreated
2: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj
0xFFFFFA800526CE20 entering PnP State WdfDevStatePnpInit from
WdfDevStatePnpObjectCreated
3: FxPkgPnp::Dispatch - WDFDEVICE 0x0000057FFAD94518 !devobj
0xFFFFFA800526CE20, IRP_MJ_PNP, 0x00000000(IRP_MN_START_DEVICE) IRP
0xFFFFFA80050E4760
4: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj
0xFFFFFA800526CE20 entering PnP State WdfDevStatePnpInitStarting from
WdfDevStatePnpInit
5: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj
0xFFFFFA800526CE20 entering PnP State WdfDevStatePnpHardwareAvailable from
WdfDevStatePnpInitStarting
6: FxPkgPnp::NotPowerPolicyOwnerEnterNewState - WDFDEVICE
0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering not power policy
owner state WdfDevStatePwrPolStarting from WdfDevStatePwrPolObjectCreated
7: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj
0xFFFFFA800526CE20 entering Power State
WdfDevStatePowerStartingCheckDeviceType from WdfDevStatePowerObjectCreated
8: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj
0xFFFFFA800526CE20 entering Power State WdfDevStatePowerD0Starting from
WdfDevStatePowerStartingCheckDeviceType
9: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj
0xFFFFFA800526CE20 entering Power State
WdfDevStatePowerD0StartingConnectInterrupt from WdfDevStatePowerD0Starting
10: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj
0xFFFFFA800526CE20 entering Power State WdfDevStatePowerD0StartingDmaEnable
from WdfDevStatePowerD0StartingConnectInterrupt
11: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj
0xFFFFFA800526CE20 entering Power State
WdfDevStatePowerD0StartingStartSelfManagedIo from
WdfDevStatePowerD0StartingDmaEnable
12: FxPkgIo::ResumeProcessingForPower - Power resume all queues of
WDFDEVICE 0x0000057FFAD94518
13: FxSelfManagedIoMachine::ProcessEvent - WDFDEVICE 0x0000057FFAD94518
!devobj 0xFFFFFA800526CE20 entering self managed io state
FxSelfManagedIoInit from FxSelfManagedIoCreated
---- end of log ----

I’m still not sure why I’m getting STATUS_INVALID_DEVICE_REQUEST error code
for ioctl " IOCTL_DISK_GET_DRIVE_LAYOUT ".

Btw, I’m firing the ioctl call from EvtDeviceSelfManagedIoInit().

Thanks,
-Raj P.

On Wed, May 15, 2013 at 6:27 PM, Tim Roberts wrote:

> Rajinikanth Pandurangan wrote:
> >
> > and then I tried to see the log by 0: kd> !wdfkd.wdflogdump mywdffltr
> > Trace searchpath is:
> >
> > Trace format prefix is: %7!u!: %!FUNC! -
> > Trying to extract TMF information from -
> > c:\symbols\Wdf01000.pdb\99521C1B360441A9A1EAECC9E5087A251\Wdf01000.pdb
> > Log at fffffa8005371000
> > Gather log: Please wait, this may take a moment (reading 4024 bytes).
> > % read so far … 10, 20, 30, 40, 100
> > There are 34 log entries
> > — start of log —
> > Unknown( 14): GUID=31f474a8-23f3-c270-e156-7b455a6f635c (No Format
> > Information found).
>
> You need to use !wdftmffile to tell it where to find the TMF file for
> the version of KMDF you are using.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> 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
>

Are you dumping the log before or after you have sent the ioctl? From the look of the log, it looks like it is before the ioctl send

d

Bent from my phone


From: Rajinikanth Panduranganmailto:xxxxx
Sent: ?5/?15/?2013 7:26 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: Re: [ntdev] !wdflogdump???

Thanks Tim. I did that and set the path for tmffile. Here is the log.

0: kd> !wdfkd.wdflogdump mywdffltr
Trace searchpath is:

Trace format prefix is: %7!u!: %!FUNC! -
TMF file used for formatting log is: C:\WinDDK\7600.16385.1\tools\tracing\amd64\wdf01009.tmf
Trying to extract TMF information from - c:\symbols\Wdf01000.pdb\99521C1B360441A9A1EAECC9E5087A251\Wdf01000.pdb
Log at fffffa8005372000
Gather log: Please wait, this may take a moment (reading 4024 bytes).
% read so far … 10, 100
There are 13 log entries
— start of log —
1: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFAC783F8 !devobj 0xFFFFFA8005263C70 entering PnP State WdfDevStatePnpInit from WdfDevStatePnpObjectCreated
2: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering PnP State WdfDevStatePnpInit from WdfDevStatePnpObjectCreated
3: FxPkgPnp::Dispatch - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20, IRP_MJ_PNP, 0x00000000(IRP_MN_START_DEVICE) IRP 0xFFFFFA80050E4760
4: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering PnP State WdfDevStatePnpInitStarting from WdfDevStatePnpInit
5: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering PnP State WdfDevStatePnpHardwareAvailable from WdfDevStatePnpInitStarting
6: FxPkgPnp::NotPowerPolicyOwnerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering not power policy owner state WdfDevStatePwrPolStarting from WdfDevStatePwrPolObjectCreated
7: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering Power State WdfDevStatePowerStartingCheckDeviceType from WdfDevStatePowerObjectCreated
8: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering Power State WdfDevStatePowerD0Starting from WdfDevStatePowerStartingCheckDeviceType
9: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering Power State WdfDevStatePowerD0StartingConnectInterrupt from WdfDevStatePowerD0Starting
10: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering Power State WdfDevStatePowerD0StartingDmaEnable from WdfDevStatePowerD0StartingConnectInterrupt
11: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering Power State WdfDevStatePowerD0StartingStartSelfManagedIo from WdfDevStatePowerD0StartingDmaEnable
12: FxPkgIo::ResumeProcessingForPower - Power resume all queues of WDFDEVICE 0x0000057FFAD94518
13: FxSelfManagedIoMachine::ProcessEvent - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering self managed io state FxSelfManagedIoInit from FxSelfManagedIoCreated
---- end of log ----

I’m still not sure why I’m getting STATUS_INVALID_DEVICE_REQUEST error code for ioctl " IOCTL_DISK_GET_DRIVE_LAYOUT ".

Btw, I’m firing the ioctl call from EvtDeviceSelfManagedIoInit().

Thanks,
-Raj P.

On Wed, May 15, 2013 at 6:27 PM, Tim Roberts > wrote:
Rajinikanth Pandurangan wrote:
>
> and then I tried to see the log by 0: kd> !wdfkd.wdflogdump mywdffltr
> Trace searchpath is:
>
> Trace format prefix is: %7!u!: %!FUNC! -
> Trying to extract TMF information from -
> c:\symbols\Wdf01000.pdb\99521C1B360441A9A1EAECC9E5087A251\Wdf01000.pdb
> Log at fffffa8005371000
> Gather log: Please wait, this may take a moment (reading 4024 bytes).
> % read so far … 10, 20, 30, 40, 100
> There are 34 log entries
> — start of log —
> Unknown( 14): GUID=31f474a8-23f3-c270-e156-7b455a6f635c (No Format
> Information found).

You need to use !wdftmffile to tell it where to find the TMF file for
the version of KMDF you are using.


Tim Roberts, xxxxx@probo.commailto:xxxxx
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

OSR is HIRING!! See http://www.osr.com/careers

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 OSR is HIRING!! See http://www.osr.com/careers 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</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

Hi Doron,

Log was just after the IOCTL call for the device. I confirmed the same by
running it again.

Do I need to set anything for the RequestOptions?

Thanks,
-Raj P.

On Wed, May 15, 2013 at 7:31 PM, Doron Holan wrote:

> Are you dumping the log before or after you have sent the ioctl? From
> the look of the log, it looks like it is before the ioctl send
>
> d
>
> Bent from my phone
> ------------------------------
> From: Rajinikanth Pandurangan
> Sent: 5/15/2013 7:26 PM
>
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] !wdflogdump???
>
> Thanks Tim. I did that and set the path for tmffile. Here is the log.
>
> 0: kd> !wdfkd.wdflogdump mywdffltr
> Trace searchpath is:
>
> Trace format prefix is: %7!u!: %!FUNC! -
> TMF file used for formatting log is:
> C:\WinDDK\7600.16385.1\tools\tracing\amd64\wdf01009.tmf
> Trying to extract TMF information from -
> c:\symbols\Wdf01000.pdb\99521C1B360441A9A1EAECC9E5087A251\Wdf01000.pdb
> Log at fffffa8005372000
> Gather log: Please wait, this may take a moment (reading 4024 bytes).
> % read so far … 10, 100
> There are 13 log entries
> — start of log —
> 1: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFAC783F8 !devobj
> 0xFFFFFA8005263C70 entering PnP State WdfDevStatePnpInit from
> WdfDevStatePnpObjectCreated
> 2: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj
> 0xFFFFFA800526CE20 entering PnP State WdfDevStatePnpInit from
> WdfDevStatePnpObjectCreated
> 3: FxPkgPnp::Dispatch - WDFDEVICE 0x0000057FFAD94518 !devobj
> 0xFFFFFA800526CE20, IRP_MJ_PNP, 0x00000000(IRP_MN_START_DEVICE) IRP
> 0xFFFFFA80050E4760
> 4: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj
> 0xFFFFFA800526CE20 entering PnP State WdfDevStatePnpInitStarting from
> WdfDevStatePnpInit
> 5: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj
> 0xFFFFFA800526CE20 entering PnP State WdfDevStatePnpHardwareAvailable from
> WdfDevStatePnpInitStarting
> 6: FxPkgPnp::NotPowerPolicyOwnerEnterNewState - WDFDEVICE
> 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering not power policy
> owner state WdfDevStatePwrPolStarting from WdfDevStatePwrPolObjectCreated
> 7: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj
> 0xFFFFFA800526CE20 entering Power State
> WdfDevStatePowerStartingCheckDeviceType from WdfDevStatePowerObjectCreated
> 8: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj
> 0xFFFFFA800526CE20 entering Power State WdfDevStatePowerD0Starting from
> WdfDevStatePowerStartingCheckDeviceType
> 9: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj
> 0xFFFFFA800526CE20 entering Power State
> WdfDevStatePowerD0StartingConnectInterrupt from WdfDevStatePowerD0Starting
> 10: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj
> 0xFFFFFA800526CE20 entering Power State WdfDevStatePowerD0StartingDmaEnable
> from WdfDevStatePowerD0StartingConnectInterrupt
> 11: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj
> 0xFFFFFA800526CE20 entering Power State
> WdfDevStatePowerD0StartingStartSelfManagedIo from
> WdfDevStatePowerD0StartingDmaEnable
> 12: FxPkgIo::ResumeProcessingForPower - Power resume all queues of
> WDFDEVICE 0x0000057FFAD94518
> 13: FxSelfManagedIoMachine::ProcessEvent - WDFDEVICE 0x0000057FFAD94518
> !devobj 0xFFFFFA800526CE20 entering self managed io state
> FxSelfManagedIoInit from FxSelfManagedIoCreated
> ---- end of log ----
>
>
> I’m still not sure why I’m getting STATUS_INVALID_DEVICE_REQUEST error
> code for ioctl " IOCTL_DISK_GET_DRIVE_LAYOUT ".
>
> Btw, I’m firing the ioctl call from EvtDeviceSelfManagedIoInit().
>
> Thanks,
> -Raj P.
>
>
> On Wed, May 15, 2013 at 6:27 PM, Tim Roberts wrote:
>
>> Rajinikanth Pandurangan wrote:
>> >
>> > and then I tried to see the log by 0: kd> !wdfkd.wdflogdump mywdffltr
>> > Trace searchpath is:
>> >
>> > Trace format prefix is: %7!u!: %!FUNC! -
>> > Trying to extract TMF information from -
>> > c:\symbols\Wdf01000.pdb\99521C1B360441A9A1EAECC9E5087A251\Wdf01000.pdb
>> > Log at fffffa8005371000
>> > Gather log: Please wait, this may take a moment (reading 4024 bytes).
>> > % read so far … 10, 20, 30, 40, 100
>> > There are 34 log entries
>> > — start of log —
>> > Unknown( 14): GUID=31f474a8-23f3-c270-e156-7b455a6f635c (No Format
>> > Information found).
>>
>> You need to use !wdftmffile to tell it where to find the TMF file for
>> the version of KMDF you are using.
>>
>> –
>> Tim Roberts, xxxxx@probo.com
>> Providenza & Boekelheide, Inc.
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> OSR is HIRING!! See http://www.osr.com/careers
>>
>> 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 OSR is HIRING!! See
> http://www.osr.com/careers 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
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> 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
>

Try turning on verbose logging with wdfverifier.exe and retrying after reloading your driver

d

Bent from my phone


From: Rajinikanth Panduranganmailto:xxxxx
Sent: ?5/?15/?2013 8:11 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: Re: [ntdev] !wdflogdump???

Hi Doron,

Log was just after the IOCTL call for the device. I confirmed the same by running it again.

Do I need to set anything for the RequestOptions?

Thanks,
-Raj P.

On Wed, May 15, 2013 at 7:31 PM, Doron Holan > wrote:
Are you dumping the log before or after you have sent the ioctl? From the look of the log, it looks like it is before the ioctl send

d

Bent from my phone
________________________________
From: Rajinikanth Panduranganmailto:xxxxx
Sent: 5/15/2013 7:26 PM

To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: Re: [ntdev] !wdflogdump???

Thanks Tim. I did that and set the path for tmffile. Here is the log.

0: kd> !wdfkd.wdflogdump mywdffltr
Trace searchpath is:

Trace format prefix is: %7!u!: %!FUNC! -
TMF file used for formatting log is: C:\WinDDK\7600.16385.1\tools\tracing\amd64\wdf01009.tmf
Trying to extract TMF information from - c:\symbols\Wdf01000.pdb\99521C1B360441A9A1EAECC9E5087A251\Wdf01000.pdb
Log at fffffa8005372000
Gather log: Please wait, this may take a moment (reading 4024 bytes).
% read so far … 10, 100
There are 13 log entries
— start of log —
1: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFAC783F8 !devobj 0xFFFFFA8005263C70 entering PnP State WdfDevStatePnpInit from WdfDevStatePnpObjectCreated
2: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering PnP State WdfDevStatePnpInit from WdfDevStatePnpObjectCreated
3: FxPkgPnp::Dispatch - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20, IRP_MJ_PNP, 0x00000000(IRP_MN_START_DEVICE) IRP 0xFFFFFA80050E4760
4: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering PnP State WdfDevStatePnpInitStarting from WdfDevStatePnpInit
5: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering PnP State WdfDevStatePnpHardwareAvailable from WdfDevStatePnpInitStarting
6: FxPkgPnp::NotPowerPolicyOwnerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering not power policy owner state WdfDevStatePwrPolStarting from WdfDevStatePwrPolObjectCreated
7: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering Power State WdfDevStatePowerStartingCheckDeviceType from WdfDevStatePowerObjectCreated
8: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering Power State WdfDevStatePowerD0Starting from WdfDevStatePowerStartingCheckDeviceType
9: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering Power State WdfDevStatePowerD0StartingConnectInterrupt from WdfDevStatePowerD0Starting
10: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering Power State WdfDevStatePowerD0StartingDmaEnable from WdfDevStatePowerD0StartingConnectInterrupt
11: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering Power State WdfDevStatePowerD0StartingStartSelfManagedIo from WdfDevStatePowerD0StartingDmaEnable
12: FxPkgIo::ResumeProcessingForPower - Power resume all queues of WDFDEVICE 0x0000057FFAD94518
13: FxSelfManagedIoMachine::ProcessEvent - WDFDEVICE 0x0000057FFAD94518 !devobj 0xFFFFFA800526CE20 entering self managed io state FxSelfManagedIoInit from FxSelfManagedIoCreated
---- end of log ----

I’m still not sure why I’m getting STATUS_INVALID_DEVICE_REQUEST error code for ioctl " IOCTL_DISK_GET_DRIVE_LAYOUT ".

Btw, I’m firing the ioctl call from EvtDeviceSelfManagedIoInit().

Thanks,
-Raj P.

On Wed, May 15, 2013 at 6:27 PM, Tim Roberts > wrote:
Rajinikanth Pandurangan wrote:
>
> and then I tried to see the log by 0: kd> !wdfkd.wdflogdump mywdffltr
> Trace searchpath is:
>
> Trace format prefix is: %7!u!: %!FUNC! -
> Trying to extract TMF information from -
> c:\symbols\Wdf01000.pdb\99521C1B360441A9A1EAECC9E5087A251\Wdf01000.pdb
> Log at fffffa8005371000
> Gather log: Please wait, this may take a moment (reading 4024 bytes).
> % read so far … 10, 20, 30, 40, 100
> There are 34 log entries
> — start of log —
> Unknown( 14): GUID=31f474a8-23f3-c270-e156-7b455a6f635c (No Format
> Information found).

You need to use !wdftmffile to tell it where to find the TMF file for
the version of KMDF you are using.


Tim Roberts, xxxxx@probo.commailto:xxxxx
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

OSR is HIRING!! See http://www.osr.com/careers

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 OSR is HIRING!! See http://www.osr.com/careers 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

OSR is HIRING!! See http://www.osr.com/careers

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 OSR is HIRING!! See http://www.osr.com/careers 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</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

> Hi Tim,

Yes, it’s my debug driver.

My call is very straight forward.


PWDF_MEMORY_DESCRIPTOR pInMemDesc = NULL;
PWDF_MEMORY_DESCRIPTOR pOutMemDesc = NULL;
WDF_MEMORY_DESCRIPTOR InMemDesc;
WDF_MEMORY_DESCRIPTOR OutMemDesc;
****
Why do you declare pointer variables here? Don’t you read the
documentation? I’m sure it said that it wanted a parameter of type
PWDF_MEMORY_DESCRIPTOR, but why did you think that translates to “I must
pass a variable of that type”? It means that it wants ANY EXPRESSION THAT
EVALUATES TO THAT TYPE!

For example, &InMemDesc and &OutMemDesc are expressions which evaluate to
type PWDF_MEMORY_DESCRIPTOR.

I find that even programmers with several years of experience make this
error. All it does is clutter your code up with meaningless and totally
unnecessary variables!
****

WDF_REQUEST_SEND_OPTIONS options = {0};



WDF_MEMORY_DESCRIPTOR_INIT_BUFFER(&OutMemDesc, OutBuffer,
OutBufferLen);
pOutMemDesc = &OutMemDesc;

This assignment is both unnecessary and downright silly.

status = WdfIoTargetSendIoctlSynchronously(

WdfDeviceGetIoTarget(Device),
NULL,
IOCTL_DISK_GET_DRIVE_LAYOUT,
NULL,
pOutMemDesc,

that would be &OutMemDesc

NULL,
NULL);


Anything obvious???

I see a lot of NULL parameters. Many calls will not check for NULL, but
blindly go ahead and use them, delivering a BSOD. Other calls check them
and return an error code if a required parameter is NULL. This is an
error I saw being committed a lot in applications.

Out of curiosity, I looked the call up. The error you are getting says
the request was already queued up for a device. This might be an accurate
reporting of the condition, in which case you need to figure out where it
is already queued up, or figure out what combination of parameters might
have led it down a path where it thinks this is true.

Or did you mean to send an IRP_MJ_INTERNAL_DEVICE_CONTROL?

I found a lot of the documentation of the call confusing, because I’m not
a file-system guru, but superficially what you wrote looks correct to me.
There’s even what appears to be an identical example in the Remarks
section. But it may not be, and I wasn’t up to reading all the
background.
joe

Thanks,
-Raj P.

On Wed, May 15, 2013 at 3:52 PM, Tim Roberts wrote:
>
>> Rajinikanth Pandurangan wrote:
>> >
>> > I have a upper filter driver and when I issue an
>> > “IOCTL_DISK_GET_DRIVE_LAYOUT” ioctl, i
>> > get STATUS_INVALID_DEVICE_REQUEST as return status. I would like to
>> > understand the reason for this failure.
>>
>> You are issuing this request from the filter driver? You need to show
>> us the code that creates the request. Are you providing a file object
>> in the IRP?
>>
>>
>> > I’m able to setup breakpoints and trace my driver, unable to see the
>> > log dump and i get the following from windbg.
>> > “Could not find mywdffltr in wdfldr client list”
>> > Not sure what am I missing.
>>
>> Is the driver actually named mywdffltr.sys?
>>
>> –
>> Tim Roberts, xxxxx@probo.com
>> Providenza & Boekelheide, Inc.
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> OSR is HIRING!! See http://www.osr.com/careers
>>
>> 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
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> 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