Re: ERROR_DRIVERS_LEAKING_LOCKED_PAGES

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Jason Hinsperger (iAEngWaterloo_at_newsgroup.nospam)
Date: 11/25/04


Date: Wed, 24 Nov 2004 16:59:02 -0800

Comments in line below.
Thanks a lot for your help.

--Jason

"Alexander Grigoriev" wrote:

> ERROR_WORKING_SET_QOUTA means also there are too many outstanding I/O
> requests, or too many locked pages at once.
>
> Make sure you open your files with FILE_FLAG_NO_BUFFERING (this is a
> requirement for ReadFileScatter). I would also avoid issuing those
> ReadFileScatter from the completion port thread.
We do use this flag already, however we need to do it on the same thread.
There are other threads reading from the same IOCP too. Also due to using
fibres, the fibre which issued the I/O switches to another fibre on the same
thread which will go to the IOCP.

>
> Enable Windows debugger. As you encounter QUOTA error, issue a breakpoint
> and check how many I/O requests are outstanding and now many pages are
> locked.
>
I can get the number of outstanding I/O requests but I have no idea how to
get the number of locked memory pages.
 I assume that ReadFileScatter might be locking pages in memory but
hopefully it unlocks them again. How do I get the number of locked pages?

> When you initialize OVERLAPPED structure, don't set an event handle there.
>
We don't

> If the IOCP queue doesn't get emptied, I don't think it will cause quote
> exaustion, but still possible.
>
> There is still possibility your RAID driver has a bug and doesn't complete
> the I/O requests properly. Try your application on a plain IDE drive.
> Another thing to check: does the process disappear from Task Manager when it
> is terminated.
We will check the disk configurations. This has happened at 3 different
customers so far. We will also check the task manager.

>
> If your process is associated with a job object, check what quotes are set
> for it.
We do not do this.

>
> "Jason Hinsperger" <iAEngWaterloo@newsgroup.nospam> wrote in message
> news:0DDFB1D0-17C4-4BF2-9F13-036A56C5DB6B@microsoft.com...
> > It is using asynchronous I/O using completion ports. The requests that
> > seem
> > to be failing are ReadFileScatter calls. When using ReadFileScatter we
> > are
> > reading 64K chunks into 8 8K buffers. Normal reads are done in 8K chunks.
> > The application also uses TCP/IP to talk to clients.
> > The disk is a RAID 5 system. 3 Partitions: 2 x 35 GB, 1 x 70 GB
> >
> > Our application would hang if we were not emptying our completion port
> > queue
> > so I don't believe this is the case.
> >
> > Thanks,
> > --Jason
> >
> >
> > "Alexander Grigoriev" wrote:
> >
> >> Are you using asynchronous I/O? Completion ports? What's size of a single
> >> I/O request? What type of storage the file is on? If it's a fancy RAID,
> >> do
> >> you see the same error on a plain IDE disk? Are you using any other
> >> communication in you app, such as TCP/IP, serial, etc?
> >>
> >> One reason could be that you're not emptying completion port queue. For
> >> example, your completion port thread got stuck.
> >>
> >> "Jason Hinsperger" <iAEngWaterloo@newsgroup.nospam> wrote in message
> >> news:E9C6F1D2-2DEF-46FF-979D-F371769DF9C8@microsoft.com...
> >> > The 100 reads are the same read made 100 times consecutively as a
> >> > result
> >> > of
> >> > getting the error ERROR_WORKING_SET_QUOTA each time. We are reading
> >> > from
> >> > disk (the db file).
> >> >
> >> > --Jason
> >> >
> >> >
> >> > "Alexander Grigoriev" wrote:
> >> >
> >> >> Are all those 100 reads pending at the same time? What device they
> >> >> read?
> >> >>
> >> >> "Jason Hinsperger" <JasonHinsperger@discussions.microsoft.com> wrote
> >> >> in
> >> >> message news:A934E4E0-370F-4178-A2A9-10021C31856A@microsoft.com...
> >> >> > According to the documentation, the error
> >> >> > ERROR_DRIVERS_LEAKING_LOCKED_PAGES
> >> >> > is described as follows:
> >> >> > "A device driver is leaking locked I/O pages causing system
> >> >> > degradation.
> >> >> > The
> >> >> > system has automatically enabled tracking code in order to try and
> >> >> > catch
> >> >> > the
> >> >> > culprit."
> >> >> >
> >> >> > We'd like to know what the tracking code is and how to make use of
> >> >> > it
> >> >> > (or
> >> >> > how MS will make use of it). This appears to be leading to
> >> >> > ERROR_WORKING_SET_QUOTA in our application on 100 successive read
> >> >> > attempts
> >> >> > on
> >> >> > Windows 2003 Enterprise Server.
> >> >> >
> >> >> > Thanks in advance,
> >> >> >
> >> >> > --
> >> >> > Jason Hinsperger
> >> >> > Product Manager
> >> >> > iAnywhere Solutions
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>