Re: How is possible that NDIS_PACKET->Head->MappedSystemVa is page



All what details I wrote in previous message I have from "!analyze -v",
and from searching stack.
Code crashes inside of: NdisMIndicateReceivePacket(),
In my case this function is called from IRQL==DISPATCH_LEVEL.
I dont access directly or undirectly NDIS_BUFFERS in my code before crash .
This bug is not reproducable, I met it only once.

How is in principle possible that:
NDIS_PACKET with NDIS_BUFFER inside it are created
only with help of documented functions and in memory system stress
MappedSystemVa is paged ?
How can I to avoid this ?

Peter


"Stephan Wolf [MVP]" wrote:

First, please do not make any assumptions on the format of an
NDIS_BUFFER, even if it is currently an MDL in NT-based Windows.

Second, if you need to access the virtual buffer of an NDIS_BUFFER you
should use NdisQueryBufferSafe() to get the virtual buffer address.
NdisQueryBufferSafe() will take care of locking any related pages if
necessary.

Third, try the "!analyze -v" debugger command to get a more detailed
description (including a stack trace) of the bugcheck.

Also try and enable NDIS debug tracing, see

"NDIS Driver Debugging Guidelines"
http://www.microsoft.com/whdc/device/network/NDIS/ndisdebug.mspx

"How to enable NDIS debug tracing"
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q164459

"INFO: NDIS Debug Tracing and Kernel Debugger Extensions"
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q248413

Stephan
---
Peter wrote:
I met bug:
DRIVER_IRQL_NOT_LESS_OR_EQUAL,

Bug occurred inside of: NdisMIndicateReceivePacket(...,myPacket, 1);
called from my driver.
Amazing is that address of memory referenced is inside of NDIS_PACKET:
MyPacket->Head->MappedSystemVa.
I see in memory in debugger that MappedSystemVa is not displayable ant it
show error ERROR_READ_FAULT, so it is probably paged.

I met this bug in system with debug versions of kernel,hal and ndis.sys
and on system running under memory stress with driver verifier turned on my
driver and ndis.sys.
MyPacket was allocated with NdisDprAllocatePacket() and buffers are created
by copying from original packet with help of NdisCopyBuffer().
How can be possible that packet created by such way has paged
Head->MappedSystemVa ?
What can I to do in my code to avoid of this ?

Peter


.



Relevant Pages

  • Re: How do I find Driver Causing System Crash?
    ... same debug output, sorry about that. ... When I google the first memory address ... If kernel debugger is available get stack backtrace. ... Microsoft to find which driver is in conflict. ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: How to slove these bugcheck code??
    ... It seems to me your device/driver is badly corrupting the system memory. ... > I got these bugcheck code when I develop my own dma driver. ... > FOLLOWUP_NAME: MachineOwner ... > If a kernel debugger is available get the stack backtrace. ...
    (microsoft.public.development.device.drivers)
  • Re: How is possible that NDIS_PACKET->Head->MappedSystemVa is pageable
    ... Also try and enable NDIS debug tracing, ... "NDIS Driver Debugging Guidelines" ... NDIS Debug Tracing and Kernel Debugger Extensions" ... Amazing is that address of memory referenced is inside of NDIS_PACKET: ...
    (microsoft.public.development.device.drivers)
  • Re: How is possible that NDIS_PACKET->Head->MappedSystemVa is page
    ... Double-check your code in the crashing path; you probably have a bug. ... Also try and enable NDIS debug tracing, ... "NDIS Driver Debugging Guidelines" ... NDIS Debug Tracing and Kernel Debugger Extensions" ...
    (microsoft.public.development.device.drivers)
  • Bug check calling nt!RtlQueryEnvironmentVariable_U
    ... I am writing a minifilter driver that reads some configuration data from the ... If I use REG_SZ values in the registry then everything works as expected. ... in the debugger it looks like the procedure is paged out (the debugger just ... Invalid system memory was referenced. ...
    (microsoft.public.development.device.drivers)