page fault even after removing all data access

Hi,
I am testing a WDM driver for a PCI video streaming device which crashes
after servicing a few interrupts. I removed all memory accesses for data
from the driver, so as of now, ISR of this driver gets an interrupt,
services it only by clearing it and returns. After servicing a few
interrupts(may be 20 times)this way, it crashes
sometimes with the message Bug Check 0x50: PAGE_FAULT_IN_NONPAGED_AREA
sometimes with the message page fault
sometimes with the message Bug Check 0x1E: KMODE_EXCEPTION_NOT_HANDLED
with 0xC0000005 as exception code

I am using a helper function which ISR calls in order to do these
operations(clearing interrupts…), in fact there are lot of helper
functions in the actual driver
Can it happen that these helper functions are paged out and in ISR these
can not be paged in and that results in crash? If it can happen, then is
there any way to lock these function codes in the memory?

Or any other reason behind the crash?

Regards,
Champak

>> Can it happen that these helper functions are paged out

It depends, I dont know in what sections of your PE image you placed them.
Post a stack dump, and maybe we will see what happens. This bugcheck is very
common,
and it;s the result in 99% of flaws in your driver, i.e , erratic pointers.

Dan

----- Original Message -----
From: “Champak”
To: “NT Developers Interest List”
Sent: Monday, August 12, 2002 6:35 AM
Subject: [ntdev] page fault even after removing all data access

> Hi,
> I am testing a WDM driver for a PCI video streaming device which crashes
> after servicing a few interrupts. I removed all memory accesses for data
> from the driver, so as of now, ISR of this driver gets an interrupt,
> services it only by clearing it and returns. After servicing a few
> interrupts(may be 20 times)this way, it crashes
> sometimes with the message Bug Check 0x50: PAGE_FAULT_IN_NONPAGED_AREA
> sometimes with the message page fault
> sometimes with the message Bug Check 0x1E: KMODE_EXCEPTION_NOT_HANDLED
> with 0xC0000005 as exception code
>
> I am using a helper function which ISR calls in order to do these
> operations(clearing interrupts…), in fact there are lot of helper
> functions in the actual driver
> Can it happen that these helper functions are paged out and in ISR these
> can not be paged in and that results in crash? If it can happen, then is
> there any way to lock these function codes in the memory?
>
> Or any other reason behind the crash?
>
> Regards,
> Champak
>
> —
> You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to %%email.unsub%%
>

Thanks for the response. In fact I removed all the helper function and
using a single ISR function in which I am just clearing interrupts.
Stack shows these
KeBugcheckEx +0001
i81xdnt5 !text +00018d1b
i81xdnt5 !text +00018f0f
win32k ! text + 08058277
win32k ! text + 00061349
win32k ! text + 00061c20
win32k ! text + 00057f88
win32k ! text + 00031953
win32k ! text + 0002a12b

Regards,
Champak

Please , use Windbg and full OS symbols. And learn how to debug and identify
possible reasons by yourself. Removing / adding code / testing for debugging
puroposes is not a very
efficient technique.

----- Original Message -----
From: “Champak”
To: “NT Developers Interest List”
Sent: Monday, August 12, 2002 4:13 PM
Subject: [ntdev] Re: page fault even after removing all data access

> Thanks for the response. In fact I removed all the helper function and
> using a single ISR function in which I am just clearing interrupts.
> Stack shows these
> KeBugcheckEx +0001
> i81xdnt5 !text +00018d1b
> i81xdnt5 !text +00018f0f
> win32k ! text + 08058277
> win32k ! text + 00061349
> win32k ! text + 00061c20
> win32k ! text + 00057f88
> win32k ! text + 00031953
> win32k ! text + 0002a12b
>
> Regards,
> Champak
>
> —
> You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to %%email.unsub%%
>