problem with NdisReturnPackets ( )
- From: "Steve" <anonymous@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 25 Apr 2005 20:56:29 -0700
If you queue the packets then you must alloc and copy the
payload. The passthru example just allocs and copies the
packet descriptor and sets the desriptor to point to the
payload in the original packet descriptor. My quess (and
I mean guess) is that the payload is being freed by the
NIC (receive) while the copied packet is still in your
queue.
>-----Original Message-----
>Hello, All!
>
>I get BSOD on vmware 5.0 and some other networc cards.
>It does not happen on other vmware versions and physical
NICs.
>
>The problem appears when I try to send previously queued
packed. The same(?)
>packets are sent before BSOD using the same functions,
pools, etc without
>problems.
>
>On Windows 2000 Pro, mydriver rises D2 bugcheck
somewhere in
>ethFilterDprIndicateReceivePacket (instead of D1 one in
XPsp2 system, see
>below).
>
>Does anybody know why this may happen?
>
>According to
>http://pcausa.com/support/KB05050101.htm
>I use separate pools for send and receive packets.
>
>Also, I tried to zero Packet->MacReserved field. No luck.
>
>Any thoughts about this would be greatly appreciated.
>
>Best regards,
>Serge.
>
>
>
>#########################################################
###################
>#########
>
>
>
>*** Fatal System Error: 0x000000d1
>
(0x00000008,0x00000002,0x00000000,0xF9889848)
>
>Break instruction exception - code 80000003 (first
chance)
>
>A fatal system error has occurred.
>Debugger entered on first try; Bugcheck callbacks have
not been invoked.
>
>A fatal system error has occurred.
>
>Connected to Windows XP 2600 x86 compatible target,
ptr64 FALSE
>Loading Kernel Symbols
>.........................................................
............
>Loading unloaded module list
>....
>Loading User Symbols
>*********************************************************
*******************
>***
>*
>*
>* Bugcheck Analysis
>*
>*
>*
>*********************************************************
*******************
>***
>
>Use !analyze -v to get detailed debugging information.
>
>BugCheck D1, {8, 2, 0, f9889848}
>
>Probably caused by : mydriver.sys ( mydriver!
MPReturnPacket+73 )
>
>Followup: MachineOwner
>---------
>
>nt!RtlpBreakWithStatusInstruction:
>804e3b25 cc int 3
>kd> !analyze -v
>*********************************************************
*******************
>***
>*
>*
>* Bugcheck Analysis
>*
>*
>*
>*********************************************************
*******************
>***
>
>DRIVER_IRQL_NOT_LESS_OR_EQUAL (d1)
>An attempt was made to access a pageable (or completely
invalid) address at
>an
>interrupt request level (IRQL) that is too high. This
is usually
>caused by drivers using improper addresses.
>If kernel debugger is available get stack backtrace.
>Arguments:
>Arg1: 00000008, memory referenced
>Arg2: 00000002, IRQL
>Arg3: 00000000, value 0 = read operation, 1 = write
operation
>Arg4: f9889848, address which referenced memory
>
>Debugging Details:
>------------------
>
>
>READ_ADDRESS: 00000008
>
>CURRENT_IRQL: 2
>
>FAULTING_IP:
>NDIS!NdisReturnPackets+48
>f9889848 8b7308 mov esi,[ebx+0x8]
>
>DEFAULT_BUCKET_ID: DRIVER_FAULT
>
>BUGCHECK_STR: 0xD1
>
>LAST_CONTROL_TRANSFER: from f975f58f to f9889848
>
>TRAP_FRAME: f9f028ec -- (.trap fffffffff9f028ec)
>ErrCode = 00000000
>eax=ffffffff ebx=00000000 ecx=00000002 edx=00000002
esi=81664518
>edi=81669f30
>eip=f9889848 esp=f9f02960 ebp=f9f02978 iopl=0 nv
up ei pl zr na po
>nc
>cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000
>efl=00010246
>NDIS!NdisReturnPackets+0x48:
>f9889848 8b7308 mov esi,[ebx+0x8]
>Resetting default scope
>
>STACK_TEXT:
>f9f02978 f975f58f f9f02998 00000001 817b1f30 NDIS!
NdisReturnPackets+0x48
>f9f029b4 f988987f 815ba3a0 817b1f30 81558280 mydriver!
MPReturnPacket+0x73
>[C:\Work\Driver\NDIS\miniport.c @ 598]
>f9f029dc f9755061 f9f02a00 00000001 817b1f78 NDIS!
NdisReturnPackets+0xe9
>f9f029f4 f9896d09 815ac140 817b1f30 f975ab40 psched!
MpReturnPacket+0x3b
>f9f02a48 f975501d 00029d70 81685be0 00000001
>NDIS!ethFilterDprIndicateReceivePacket+0x56d
>f9f02a5c f97551b4 81558280 81685be0 00000001 psched!
PsFlushReceiveQueue+0x15
>f9f02a80 f97555f9 815ac148 00000000 81558280
>psched!PsEnqueueReceivePacket+0xda
>f9f02a98 f9896d40 815ac140 00000000 816b1120 psched!
ClReceiveComplete+0x13
>f9f02ae8 f9761fb4 00029d70 f9f02b08 00000001
>NDIS!ethFilterDprIndicateReceivePacket+0x5a4
>f9f02c60 f976ab31 815ba3a0 817b1f30 00000001
>mydriver!PtReceivePacketEx+0x119
[C:\Work\Driver\NDIS\protocol.c @ 745]
>f9f02ca0 f976ae93 815ba3a0 817b1f30 00000002
>mydriver!Queue_Packet_ExecuteEx+0x85
[C:\Work\Driver\NDIS\queue_packet.c @
>239]
>f9f02cd8 f976b453 815ba3a0 81027720 00000000
>mydriver!Queue_Packet_Execute_Item+0xef
[C:\Work\Driver\NDIS\queue_packet.c
>@ 270]
>f9f02d30 f976b6fa 815ba3a0 81027720 00000000
>mydriver!Queue_Packet_Execute+0x7b
[C:\Work\Driver\NDIS\queue_packet.c @
>331]
>f9f02d74 f976bdd5 815ba3a0 00000000 816b1120
>mydriver!Queue_Packet_Manage+0xa6
[C:\Work\Driver\NDIS\queue_packet.c @ 396]
>f9f02dac 8057dfed 815ba3a0 00000000 00000000
>mydriver!Queue_Packet_Thread+0xa5
[C:\Work\Driver\NDIS\queue_packet.c @ 505]
>f9f02ddc 804fa477 f976bd30 815ba3a0 00000000 nt!
PspSystemThreadStartup+0x34
>00000000 00000000 00000000 00000000 00000000 nt!
KiThreadStartup+0x16
>
>
>FOLLOWUP_IP:
>mydriver!MPReturnPacket+73
[C:\Work\Driver\NDIS\miniport.c @ 598]
>f975f58f eb0d jmp mydriver!
MPReturnPacket+0x82 (f975f59e)
>
>SYMBOL_STACK_INDEX: 1
>
>FOLLOWUP_NAME: MachineOwner
>
>SYMBOL_NAME: mydriver!MPReturnPacket+73
>
>MODULE_NAME: mydriver
>
>IMAGE_NAME: mydriver.sys
>
>DEBUG_FLR_IMAGE_TIMESTAMP: 42695faa
>
>STACK_COMMAND: .trap fffffffff9f028ec ; kb
>
>BUCKET_ID: 0xD1_mydriver!MPReturnPacket+73
>
>Followup: MachineOwner
>---------
>
>
>
>#########################################################
###################
>#########
>
>
>
>kd> !ndiskd.pkt 0x81669f30 4
>NDIS_PACKET at 81669f30
>NDIS_BUFFER at 81606120
> Next 00000000
> Size 20
> MdlFlags c
> Process 00000000
> MappedSystemVa 814d3000
> Start VA 814d3000
> ByteCount 5ea
> ByteOffset 0
>MacReserved[]: 00000000 00000000
00000000 00000000
> 0. TcpIpChecksumPacketInfo = 00000000
> 1. IpSecPacketInfo = 00000000
> 2. TcpLargeSendPacketInfo = 00000000
> 3. ClassificationHandlePacketInfo = 00000000
> 4. NdisReserved = 0000000e
> 5. ScatterGatherListPacketInfo = 00000000
> 6. Ieee8021QInfo = 00000000
> 7. OriginalPacketInfo = 00000103
> 8. PacketCancelId = 00000000
> 9. OriginalNetBufferList = 00000000
> 10. CachedNetBufferList = 00000000
> 11. MaxPerPacketInfo = 00000000
>
>Packet.Private
> PhysicalCount 00000000 Total Length
00000000
> Head 00000000 Tail
00000000
> Pool 00000000 Count
00000000
> Flags 00000000 ValidCounts 00
> NdisPacketFlags 00000000 NdisPacketOobOffset 0000
>
> Private.Flags : 00000000
> Private.NdisPacketFlags: 80
> fPACKET_ALLOCATED_BY_NDIS,
>
>
>
>#########################################################
###################
>#########
>
>
>
>kd> !ndiskd.pkt 0x81669f30 5
>NDIS_PACKET at 81669f30
> MDL = 81606120
> StartVa ffffffff814d3000, ByteCount 0x5ea, ByteOffset
0x0, NB MdlOffset
>0x0
> 814d3000: 00 0c 29 5e 75 ca 00 50 56 c0 00 01 08 06 00
01
> 814d3010: 08 00 06 04 00 02 00 50 56 c0 00 01 0a 01 00
01
> 814d3020: 00 0c 29 5e 75 ca 0a 01 00 07 00 00 00 00 00
00
> 814d3030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00
> [zeros skipped]
> 814d35c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00
> 814d35d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00
> 814d35e0: 00 00 00 00 00 00 00 00 00 00
>
>
>.
>
.
- Follow-Ups:
- Re: problem with NdisReturnPackets ( )
- From: serge
- Re: problem with NdisReturnPackets ( )
- From: Stephan Wolf [MVP]
- Re: problem with NdisReturnPackets ( )
- References:
- problem with NdisReturnPackets ( )
- From: serge
- problem with NdisReturnPackets ( )
- Prev by Date: Re: How to prevent context switching?
- Next by Date: Re: IoCompleteRequest query
- Previous by thread: Re: problem with NdisReturnPackets ( )
- Next by thread: Re: problem with NdisReturnPackets ( )
- Index(es):
Relevant Pages
|