IoBuildDeviceIoControlRequest

Hi,
I have a problem with IoBuildDeviceIoControlRequest. I have a serial
emulator on which a dial-up client is connected.
When i get an Irp from the user i build my own irp in my emulator and send
it down.
While registring the dialup connection on the network the build Irp call
fails(produces a bug check.

I am sending the bug check analysys along with the mail. Please give me
some clues on what could be the reason for this.

Thanks in advance,
-Naveen

BugCheck 0, {0, 0, 0, 0}

Probably caused by : vport ( vport!VCOMM_InitiateWrite+b0 )

Followup: MachineOwner

kd> !analyze -v
*******************************************************************************

*
*
* Bugcheck Analysis
*
*
*
*******************************************************************************

Unknown bugcheck code (0)
Unknown bugcheck description
Arguments:
Arg1: 00000000
Arg2: 00000000
Arg3: 00000000
Arg4: 00000000

Debugging Details:

DEFAULT_BUCKET_ID: DRIVER_FAULT

BUGCHECK_STR: 0

LAST_CONTROL_TRANSFER: from f77e5156 to 8041f2b8

STACK_TEXT:
8046f3b4 f77e5156 b26bc9bf fcd43a90 8046f404
nt!IoBuildDeviceIoControlRequest+0x1f3
8046f40c f77e3f3e fcd430f8 8046f45c f77e3d4e
vport!VCOMM_InitiateWrite+0xb0
8046f418 f77e3d4e fcd430f8 fcd43314 fcd3dd28
vport!SerialGiveWriteToIsr+0x2c
8046f45c f77e2204 01d430f8 fcd3dd28 fcd430f8 vport!VCPStartWrite+0x12c
8046f478 f77e3c04 fcd430f8 fcd3dd28 fcd4330c vport!VCPQueueOrStartIrp+0xab
8046f4a0 8041f54b fcd43040 fcd3dd28 ffa7a000 vport!VCPWrite+0x56
8046f4b4 f77130e6 fcd48de0 fcd3dd28 fce7af88 nt!IopfCallDriver+0x35
WARNING: Stack unwind information not available. Following frames may be
wrong.
8046f61c f77131be 0246f4e8 fcd3dd28 8041f54b PORTMSYS+0x30e6
8046f668 8041f54b fd017030 fcd3dd28 fcd3de28 PORTMSYS+0x31be
8046f67c f76a907a 00040000 fcd2ba50 00000000 nt!IopfCallDriver+0x35
8046f694 f76a8f66 fce155c8 fcd4d064 fcbc884c
asyncmac!AsyncSendPacket+0x108
8046f6a0 fcbc884c fcd2b5e8 fce155c8 fcd4d064 asyncmac!MpSend+0x14
8046f6c4 fcb030ae fcd47928 fce155c8 fcd4d064 NDIS!ndisMWanSend+0xd8
8046f6f0 fcb0131f fcd48db4 fcd50888 00000001 ndiswan!SendOnLegacyLink+0xd4
8046f754 fcb00c17 00000010 00000060 fcffcf78 ndiswan!FramePacket+0x279
8046f78c fcb025c4 fcd50888 fcde8828 8046f7b4 ndiswan!SendFromProtocol+0xb7
8046f7cc fcb01070 fcd50801 00000001 8046f8d4
ndiswan!SendPacketOnBundle+0x10c
8046f7f4 fcb029ec fcfd3248 00000004 fcffcf78
ndiswan!NdisWanQueueSend+0x2e3
8046f808 fcbc878a fcfd3248 8046f8d4 00000001 ndiswan!MPSendPackets+0x1e
8046f834 f76d4b2b 00000001 00000000 00000000 NDIS!ndisMSendPacketsX+0x15f
8046f858 f76d4977 fd001488 fcd559c8 fcdb2c08 wanarp!WanpSendPackets+0xe1
8046f898 fc24b232 fd001402 8046f8d4 00000001 wanarp!WanIpTransmit+0x149
8046f8c4 fc241efc fce97008 ffffffff fcffcf78 tcpip!SendIPPacket+0x12b
8046f940 fc249f78 fcff32a8 ffffffff fcffcf78 tcpip!SendIPBCast+0x5ea
8046fa48 fc24abd7 fc272634 fceaf702 fcff32a8 tcpip!IPTransmit+0x2107
8046fab8 fc24a9a5 fcff004c 6bfea8c0 fce6e828 tcpip!UDPSend+0x433
8046fadc fc24aa4b fc24aa60 fcf6e0b0 00000044 tcpip!TdiSendDatagram+0x131
8046fb14 fc248fff fce6e828 fce6e8bc fcff3910 tcpip!UDPSendDatagram+0x4d
8046fb28 8041f54b fcff3910 fce6e828 00000044
tcpip!TCPDispatchInternalDeviceControl+0x14b
8046fb3c fc212e32 fcde8668 fcf6e0c8 fcf6e008 nt!IopfCallDriver+0x35
8046fb60 fc21bfba fce6e828 fcf6e0b0 00000044 netbt!TdiSendDatagram+0x14c
8046fba4 fc21c68b fcf6e008 ffffffff 00000044 netbt!UdpSendDatagram+0x14f
8046fbec fc217d12 fcf6e008 fcd397c8 fcf6e102 netbt!UdpSendNSBcast+0x28b
8046fc30 fc219b55 fcf6e102 00000000 fcf6e194
netbt!MSnodeRegCompletion+0x20b
8046fc54 804317a7 fcf545b0 fcf54568 4c96afe0 netbt!TimerExpiry+0x5f
8046fd54 8043171d 8046bb60 8046bdf0 ffdff000 nt!KiTimerListExpire+0xe7
8046fd80 80460bd4 8047e680 00000000 00006985 nt!KiTimerExpiration+0xb4
8046fd94 80460b6f 0000000e 00000000 00000000 nt!KiRetireDpcList+0x30
ffdff800 ffdff800 00000000 8046fd98 00003902 nt!KiIdleLoop+0x26

FOLLOWUP_IP:
vport!VCOMM_InitiateWrite+b0
f77e5156 3bc3 cmp eax,ebx

FOLLOWUP_NAME: MachineOwner

SYMBOL_NAME: vport!VCOMM_InitiateWrite+b0

MODULE_NAME: vport

IMAGE_NAME: vport

STACK_COMMAND: kb

BUCKET_ID: 0x0_vport!VCOMM_InitiateWrite+b0

Followup: MachineOwner

>From the docs:
“Callers of IoBuildDeviceIoControlRequest must be running at IRQL
PASSIVE_LEVEL”

Your stack seem to indicate that you run on a timer-dpc context.

| Norbert Kawulski | mailto:xxxxx@stollmann.de |
| Stollmann E+V GmbH, Development | http://www.stollmann.de |
–If it’s ISDN or Bluetooth, make sure it’s driven by Stollmann–

"Any sufficiently advanced technology is indistinguishable from magic.

  • Arthur C. Clarke"
    -----cut ---------

8046fc54 804317a7 fcf545b0 fcf54568 4c96afe0 netbt!TimerExpiry+0x5f
8046fd54 8043171d 8046bb60 8046bdf0 ffdff000 nt!KiTimerListExpire+0xe7
8046fd80 80460bd4 8047e680 00000000 00006985 nt!KiTimerExpiration+0xb4
8046fd94 80460b6f 0000000e 00000000 00000000 nt!KiRetireDpcList+0x30
ffdff800 ffdff800 00000000 8046fd98 00003902 nt!KiIdleLoop+0x26
-----cut ---------