Date: Thu, 24 Apr 1997 05:17:48 -0400 (EDT) From: Peter Dufault <dufault@hda.com> To: Shimon@i-Connect.Net (Simon Shapiro) Cc: scsi@freebsd.org Subject: Re: Panic in sys/scsi/scsiconf.c - Please Help... Message-ID: <199704240917.FAA02943@hda.hda.com> In-Reply-To: <XFMail.970423223607.Shimon@i-Connect.Net> from Simon Shapiro at "Apr 23, 97 10:25:18 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
> I am calling scsi_attachdevs() from a device driver and getting PANIC:
>
> extend_set: entry 1 already has storage
> panic: scsi-attachdevs: malloc.
>
> Upon close examination one sees the lines:
>
> if(scbus == 0 || scbus->sc_link == 0
> || extend_set(scbusses, scsibus, scbus) == 0) {
> panic("scsi_attachdevs: malloc");
> ...
>
(That first "scbus == 0" isn't doing anything since it was just
dereferenced.)
Extend_set is allocating pointers in chunks, and reallocating and
moving them when it runs out of point space. Then the array can be indexed
at run time instead of walking a data structure.
extend_set is panicing because it requires:
1. That the index (scsibus) not have already been set;
2. That newly allocated storage be zeroed.
We're probably violating rule 1. I'm surprised you're on your
176th disk and just now getting to bus 1. Is there a chance you
have two devices wired down to bus 1 and nothing complained?
Try boot verbose, and next time include your config output.
> us->sc_link == 0
> || extend_set(scbusses, scsibus, scbus) == 0) {
> panic("scsi_attachdevs: malloc");
And as Justin asked, why do you always get repeated text at the
end of your messages?
Peter
--
Peter Dufault (dufault@hda.com) Realtime Machine Control and Simulation
HD Associates, Inc. Voice: 508 433 6936
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704240917.FAA02943>
