NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/54045: mpii driver triggers panic on timeout in physio
The following reply was made to PR kern/54045; it has been noted by GNATS.
From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/54045: mpii driver triggers panic on timeout in physio
Date: Wed, 6 Mar 2019 12:31:56 -0000 (UTC)
kardel%netbsd.org@localhost writes:
>>Description:
> Timeouts on SCSI WRITE/READ commands in the mpii driver cause physio to panic with:
> kernel diagnostic assertion "bp->b_error == 0" failed: file "/src/NetBSD/cur/src/sys/kern/kern_physio.c", line 179
The adapter driver doesn't hold that assertion. You can get a partial
transfer and an error condition at the same time from SCSI. Some error
paths in some drivers reset xs->resid, but that's not used very consistently.
The sd driver assures that the physio assertion is satisfied in sddone(),
but the tape driver doesn't.
The assertion itself is also something "new". The original code would
accept a partial read (usually an EOM condition) that could also return
an error.
The combination of drivers that reset the residual after an error and
an assertion that checks the fake residual is a bit strange too.
--
--
Michael van Elst
Internet: mlelstv%serpens.de@localhost
"A potential Snark may lurk in every tree."
Home |
Main Index |
Thread Index |
Old Index