Win2k SCSI Miniport driver asserts

I am working on a Win2K SCSI miniport disk driver. I am getting a call
into DriverEntry and a subsequent call into FindAdapter. Win2k is then
making a series of StartIo calls for doing Inquiry SRBs to find valid
LUN’s. After returning from DriverEntry to Win2K I begin getting calls
into StartIo for Read Blocks (the infamous 0 blocks reads) and Read
Capacity.

After getting a Read Capacity, 7 Read Blocks, Read Capacity, Mode Sense,
Read Capacity, 4 Read Blocks and a Read Capacity command (which completes)
I get the following assert:

*** Assertion failed: ((PSRB_DATA)(srb->OriginalRequest))->Type ==
SRB_DATA_TYPE
*** Source File: .\port.h, line 3297

Since I am in windbg I then get an input prompt to break or ignore. If
I enter ignore I get 4 more assertion failures complaining about Type not
being == to SRB_DATA_TYPE.

Finally, I get:

Fatal System Error: 0x00000019 (BAD_POOL_HEADER)
(0x00000003, 0x804cea18, 0x00000000, 0x00000000)

My main question is if there is a way to determine what to do about
Assertions. I’m not sure how to proceed with finding out what I am doing
that Win2K is unhappy about.

I have seen cases where Assertions when in windbg can be ignored as being
informationaly in which case my real problem would be the BAD_POOL_HEADER
problem.

Any help/advise is greatly appreciated.

Dave Stallmo

Have you modified the OriginalRequest field of the SRB? You should not
touch this field. The field actually represents port driver data for
handling the request, not an IRP.

More likely, the problem is that you’ve simply corrupted memory. Memory
corruption would cause both the SrbData’s signature to be invalid (the
assert you hit), and the bad pool header bugcheck you saw later. Enable
the driver verifier with special pool tracking for your driver, and you
should be able to nail this down pretty quickly.

  • Matt

Matt Hendel
Windows Base OS/Drivers

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: David Stallmo [mailto:xxxxx@borg3.com]
Sent: Thursday, August 15, 2002 4:45 PM
Subject: Win2k SCSI Miniport driver asserts

I am working on a Win2K SCSI miniport disk driver. I am getting a call
into DriverEntry and a subsequent call into FindAdapter. Win2k is then
making a series of StartIo calls for doing Inquiry SRBs to find valid
LUN’s. After returning from DriverEntry to Win2K I begin getting calls
into StartIo for Read Blocks (the infamous 0 blocks reads) and Read
Capacity.

After getting a Read Capacity, 7 Read Blocks, Read Capacity, Mode Sense,
Read Capacity, 4 Read Blocks and a Read Capacity command (which
completes)
I get the following assert:

*** Assertion failed: ((PSRB_DATA)(srb->OriginalRequest))->Type ==
SRB_DATA_TYPE
*** Source File: .\port.h, line 3297

Since I am in windbg I then get an input prompt to break or ignore. If
I enter ignore I get 4 more assertion failures complaining about Type
not
being == to SRB_DATA_TYPE.

Finally, I get:

Fatal System Error: 0x00000019 (BAD_POOL_HEADER)
(0x00000003, 0x804cea18, 0x00000000, 0x00000000)

My main question is if there is a way to determine what to do about
Assertions. I’m not sure how to proceed with finding out what I am
doing
that Win2K is unhappy about.

I have seen cases where Assertions when in windbg can be ignored as
being
informationaly in which case my real problem would be the
BAD_POOL_HEADER
problem.

Any help/advise is greatly appreciated.

Dave Stallmo