| Summary: | 5.3 kernel crash | ||
|---|---|---|---|
| Product: | Base System | Reporter: | oz |
| Component: | kern | Assignee: | freebsd-scsi (Nobody) <scsi> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 5.3-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
oz
2004-12-29 09:50:19 UTC
Responsible Changed From-To: freebsd-bugs->freebsd-scsi Assign to SCSI mailing list for evaluation I've had the same problem with 5.3-RELEASE when I connected a Hitachi IC35L073UCDY10 (this is Ultra320) to a Qlogic ISP1080 card. Here is what I get when booting in verbose mode (note: this was copied by hand, so there might be errors): ... pass0 at isp0 bus 0 target 0 lun 0 pass0: <IBM IC35L073UCDY10-0 S27F> Fixed Direct Access SCSI-3 device pass0: Serial Number E6W7735C Fatal trap 18: integer divide fault while in kernel mode instruction pointer = 0x8:0xc044b9cf stack pointer = 0x10:0xe5184644 frame pointer = 0x10:0xe5184654 code segment = base rx0, limit 0xffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 33 (swi3: cambio) trap number = 18 panic: integer divide fault Uptime: 20s Cannot dump. No dump device define. Shutting down ACPI I'm installing FreeBSD to another drive, and I'll see what data I can gather with a normal kernel. I'll also see if I can try other drives and another controller, although my time to test is a bit limited at this point. Please let me know if there is anything I ought to be looking at or keeping my eye out for. Thanks, - djg I did try to debug this some, though I got distracted by work related
tasks. In my opinion,
scsi_calc_syncsrate() has a div by 0 possibility, where the old ifdef'd
code explicitly avoided
this prossibility. something about this code in bt.c which sets
sync_period. The 4.x tree
called scsi_calc_syncparam() which is safer in this regard, but it's
ifdef'd out of the 5.x+ tree.
and I dont think it's doing the right thing. But this is as far as I got.
Phil.
bt.c:
<snip>
#ifdef CAM_NEW_TRAN_CODE
cts->protocol = PROTO_SCSI;
cts->protocol_version = SCSI_REV_2;
cts->transport = XPORT_SPI;
cts->transport_version = 2;
spi->sync_period = sync_period;
spi->valid |= CTS_SPI_VALID_SYNC_RATE;
spi->sync_offset = sync_offset;
spi->valid |= CTS_SPI_VALID_SYNC_OFFSET;
spi->valid |= CTS_SPI_VALID_BUS_WIDTH;
spi->bus_width = bus_width;
if (cts->ccb_h.target_lun != CAM_LUN_WILDCARD) {
scsi->valid = CTS_SCSI_VALID_TQ;
spi->valid |= CTS_SPI_VALID_DISC;
} else
scsi->valid = 0;
#else
/* Convert ns value to standard SCSI sync rate */
if (cts->sync_offset != 0)
cts->sync_period = scsi_calc_syncparam(sync_period);
else
cts->sync_period = 0;
cts->sync_offset = sync_offset;
cts->bus_width = MSG_EXT_WDTR_BUS_8_BIT;
cts->valid = CCB_TRANS_SYNC_RATE_VALID
| CCB_TRANS_SYNC_OFFSET_VALID
| CCB_TRANS_BUS_WIDTH_VALID;
#endif
</snip>
State Changed From-To: open->closed Put in some guard code so we don't divide by zero. |