Hi all:
I have a network file system driver on W2K that will, at times, reject read
requests for various files. These rejections may come if a server is
unresponsive, or if a user loses rights to access files on the server. In
these cases, I fail the read with, currently, a rather generic error code
(STATUS_INSUFFICIENT_RESOURCES).
I’ve found two occasions in which rejecting these reads cause big problems.
First, if the read is for a plain data file, emanating from the NT Cache
Manager: failing this always causes a BSOD with a bug check code I don’t
have handy. Apparently, the Cache Manager never expects a read to fail.
Second, if the read is to handle a page fault for an executing application,
occasionally this causes the requestor (the VMM?) to infinitely retry the
request, causing the application to hang.
My question: Is there anything obvious that I’m doing wrong? I’ve
experimented with other error return codes (STATUS_ACCESS_DENIED among
others) with no success in the latter case. (I don’t remember if I’ve ever
tried other error codes with the former case.)
Unfortunately, I can’t always tell at create time if a subsequent read down
the line will fail. I’ve thought about succeeding the read with a page full
of zeros, but this could cause data corruption problems for plain data files
(though it does nicely crash the application in the second case).
Any insights into this problem will be greatly appreciated; I looked through
the Fat sources a bit, and nothing leaped out at me.
Thanks,
Curt Wohlgemuth
Have You tried STATUS_INVALID_xxx codes?
For example try STATUS_INVALID_PARAMETER, or CID, or even better try
a lock conflict?
As per second case, I suggest not failing a paging request-
Regards, Dejan.
xxxxx@omnishift.com wrote:
Hi all:
I have a network file system driver on W2K that will, at times, reject
read requests for various files. These rejections may come if a
server is unresponsive, or if a user loses rights to access files on
the server. In these cases, I fail the read with, currently, a rather
generic error code (STATUS_INSUFFICIENT_RESOURCES).
I’ve found two occasions in which rejecting these reads cause big
problems.
First, if the read is for a plain data file, emanating from the NT
Cache Manager: failing this always causes a BSOD with a bug check
code I don’t have handy. Apparently, the Cache Manager never expects
a read to fail.
Second, if the read is to handle a page fault for an executing
application, occasionally this causes the requestor (the VMM?) to
infinitely retry the request, causing the application to hang.
My question: Is there anything obvious that I’m doing wrong? I’ve
experimented with other error return codes (STATUS_ACCESS_DENIED among
others) with no success in the latter case. (I don’t remember if I’ve
ever tried other error codes with the former case.)
Unfortunately, I can’t always tell at create time if a subsequent read
down the line will fail. I’ve thought about succeeding the read with
a page full of zeros, but this could cause data corruption problems
for plain data files (though it does nicely crash the application in
the second case).
Any insights into this problem will be greatly appreciated; I looked
through the Fat sources a bit, and nothing leaped out at me.
Thanks,
Curt Wohlgemuth
You are currently subscribed to ntfsd as: xxxxx@ptt.yu
To unsubscribe send a blank email to $subst(‘Email.Unsub’)
–
Regards, Dejan M. CEO Alfa Co. www.register.co.yu
E-mail : xxxxx@alfaunits.co.yu ICQ# : 56570367
Professional file&system related components and libraries for Win32
developers.
Alfa Units - #1 file and system handling units for Delphi.
Alfa File Monitor - #1 file monitoring system for Win32 developers.
Alfa Interceptor - #1 file protection and hiding system for Win32
developers.
Bug check, hangs with failing read requests>Second, if the read is to handle
a page fault for an executing application, >occasionally this causes the
requestor (the VMM?) to infinitely retry the >request, causing the
application to hang.
The correct behavior if the user mode page fault read failed is - to kill
the app with “In Page Error” exception.
Yes, MM will really retry the fault infinitely in case of
STATUS_INSUFFICIENT_RESOURCES, so, you have chosen the bad status code for
the purpose.
Try to use STATUS_UNEXPECTED_IO_ERROR instead.
Max
Hi Max:
The correct behavior if the user mode page fault read failed
is - to kill
the app with “In Page Error” exception.
Yes, MM will really retry the fault infinitely in case of
STATUS_INSUFFICIENT_RESOURCES, so, you have chosen the bad
status code for
the purpose.
Try to use STATUS_UNEXPECTED_IO_ERROR instead.
I’ve tried this, and have anecdotal evidence so far that it may be working.
Still for the case where a failed read to the Cache Manager causes an
exception to be thrown, it doesn’t help. I can’t believe that the OS was
written to kill the system if a network FS fails a read. Am I expected to
handle this exception gracefully? What exception codes should I expect;
I’ve seen STATUS_IN_PAGE_ERROR – will there be others?
Thanks,
Curt
How is you kill the app with an “In Page Error” exception?
-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Wednesday, December 06, 2000 10:26 AM
To: File Systems Developers
Subject: [ntfsd] Re: Bug check, hangs with failing read requests
Bug check, hangs with failing read requests>Second, if the
read is to handle
a page fault for an executing application, >occasionally this
causes the
requestor (the VMM?) to infinitely retry the >request, causing the
application to hang.
The correct behavior if the user mode page fault read failed
is - to kill
the app with “In Page Error” exception.
Yes, MM will really retry the fault infinitely in case of
STATUS_INSUFFICIENT_RESOURCES, so, you have chosen the bad
status code for
the purpose.
Try to use STATUS_UNEXPECTED_IO_ERROR instead.
Max
You are currently subscribed to ntfsd as: xxxxx@nsisw.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)
> How is you kill the app with an “In Page Error” exception?
I mean:
- if the user space inpage read failed with an error other than
STATUS_END_OF_FILE or STATUS_INSUFFICIENT_RESOURCES - MM sends the “In Page
Error” exception to the app. This usually kills the app.
- for STATUS_END_OF_FILE, MM just zeroes the pages and goes on.
(so, the FSD can fail all paging reads starting beyond the valid data length
with this status).
- for STATUS_INSUFFICIENT_RESOURCES, the fault is retried infinitely.
Max