[Beginner] Send Async Write Request to Remote I/O Target

1.9

On Fri, Sep 26, 2014 at 3:25 PM, Doron Holan
wrote:

> What version of WDF?
>
>
>
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] *On Behalf Of *Roscoe Casita
> Sent: Friday, September 26, 2014 2:57 PM
> To: Windows System Software Devs Interest List
> Subject: Re: RE:[ntdev] [Beginner] Send Async Write Request to Remote
> I/O Target
>
>
>
> Wow! thanks for chiming in Doron!
>
>
>
>
>
> Your describing exactly the behavior that the sample did!
>
>
>
> 1. Create new request for the remote target.
>
> 2. Set the memory reference to the old memory reference.
>
> 3. Set the completion routine.
>
> 4. Send the request.
>
> 5. In the call back routine, Get the status code and information.
>
> 6. Delete the request.
>
> 7. complete the original request with the status code and information: ->
> BSOD because reference to the memory object.
>
>
>
> The following steps Don’t create the bsod:
>
>
>
> 1. Create new request for the remote target.
>
> 2. Set the memory reference to the old memory reference.
>
> 3. Set the completion routine.
>
> 4. Send the request.
>
> 5. In the call back routine, Get the status code and information.
>
> 6. Reset the Request.
>
> 7. Delete the request.
>
> 8. complete the original request with the status code and information: ->
> BSOD because reference to the memory object.
>
>
>
> Thanks again for the input!
>
>
>
> On Fri, Sep 26, 2014 at 2:18 PM, Doron Holan
> wrote:
>
> This would probably because the new request takes a reference on the
> wdfmemory object of the parent request. When you complete a parent request
> we want to make sure you are not creating a hand grenade by leaving
> dangling references to memory. If the number of references on the WDFMEMORY
> in the request are >0, we stop with a WDF violation.
>
>
>
> When you format the new request, that takes a reference on the parent
> request WDFMEMORY (assuming you pass it in). That reference through the
> format action is still there when the new request completes back to your
> driver. You can clear that reference by either
>
> a) Deleting the new request
>
> b) Reseting the request, thus clearing the format, thus releasing
> the reference
>
>
>
> d
>
>
>
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] *On Behalf Of *Roscoe Casita
> Sent: Friday, September 26, 2014 2:13 PM
> To: Windows System Software Devs Interest List
> Subject: RE:[ntdev] [Beginner] Send Async Write Request to Remote I/O
> Target
>
>
>
> That is the summary. The important part is I dug around on msdn for a long
> time and still have not found information that dictates this usage.
>
> On Sep 26, 2014 4:51 PM, wrote:
>
> Sorry, Ros… I stopped reading at the code and didn’t see the attached
> dump.
>
> It’s weird. So, to summarize: if you reset the new request for reuse
> before deleting the object you’re “good to go” :slight_smile: but if you do not
> “reuse” the Request… It blue screens? Is that the summary?
>
> Peter
> OSR
> @OSRDrivers
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> 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 Visit the list at:
> http://www.osronline.com/showlists.cfm?list=ntdev 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
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> 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
>
>
>
>
>
> –
> Thanks in advance,
>
> Roscoe Casita
>
> — NTDEV is sponsored by OSR Visit the list at:
> http://www.osronline.com/showlists.cfm?list=ntdev 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
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> 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
>


Thanks in advance,
Roscoe Casita

Try a newer version of the Framework. Just for laughs, try 1.13…

Peter
OSR
@OSRDrivers

Version 1.11 worked correctly

(Only have windows 7 vm on this laptop)

Thanks for all the help! I appreciate the knowledge, and thank you again!

On Fri, Sep 26, 2014 at 5:05 PM, wrote:

> Try a newer version of the Framework. Just for laughs, try 1.13…
>
> Peter
> OSR
> @OSRDrivers
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> 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
>


Thanks in advance,
Roscoe Casita

On Sep 26, 2014, at 5:59 PM, Roscoe Casita > wrote:
Version 1.11 worked correctly

(Only have windows 7 vm on this laptop)

Thanks for all the help! I appreciate the knowledge, and thank you again!

Hmm, that?s a framework bug I haven?t heard about before. So WdfObjectDelete doesn?t release its reference on the WDFMEMORY prior to 1.11?

Tim Roberts, xxxxx@probo.commailto:xxxxx
Providenza & Boekelheide, Inc.</mailto:xxxxx>

Figures lol… I used to do software testing once upon a time. If it can be
broken, I’ll break it just looking at it.
On Sep 27, 2014 2:32 AM, “Tim Roberts” wrote:

> On Sep 26, 2014, at 5:59 PM, Roscoe Casita wrote:
>
> Version 1.11 worked correctly
>
> (Only have windows 7 vm on this laptop)
>
> Thanks for all the help! I appreciate the knowledge, and thank you again!
>
>
> Hmm, that’s a framework bug I haven’t heard about before. So
> WdfObjectDelete doesn’t release its reference on the WDFMEMORY prior to
> 1.11?
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> 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
>

That’s a very cool bug that has impact, but very subtle impact. It would ordinarily be hard to find in the scenario Roscoe has, because if you’re using a second Request you’ll ordinarily keep it around… Not delete it each time.

This raises an interesting question: IS there a “master list” of a Framework issues that one can scan for this type of thing? Such a list would be very helpful to the community…

Peter
OSR
@OSRDrivers

On Sep 27, 2014, at 3:44 AM, xxxxx@osr.com wrote:

This raises an interesting question: IS there a “master list” of a Framework issues that one can scan for this type of thing? Such a list would be very helpful to the community?.

Sure, all you need is an account on Microsoft?s internal Team Foundation Server. Doesn?t everybody have one?

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

I didn’t even know what that IS… Though I now take it to mean that “team” stuff in VS does bug tracking or something?

Not to be confused with SharePoint, another technology that I’ve somehow avoided knowing anything about…

Peter
OSR
@OSRDrivers

>to read about TFS and understand what the premise is?

Some people use Atlassian tools. They are so good that bothering with TFS/SharePoint is not needed at all :slight_smile:


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com