From owner-freebsd-stable Thu Nov 15 14:34:40 2001 Delivered-To: freebsd-stable@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id DF5B037B418; Thu, 15 Nov 2001 14:34:36 -0800 (PST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.6/8.11.6) with ESMTP id fAFMXbB05834; Thu, 15 Nov 2001 23:33:38 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: "Kenneth D. Merry" Cc: Dirk Froemberg , stable@FreeBSD.ORG Subject: Re: kernel panic if using SCSI CDROM as root device In-Reply-To: Your message of "Thu, 15 Nov 2001 15:22:26 MST." <20011115152226.A35113@panzer.kdm.org> Date: Thu, 15 Nov 2001 23:33:37 +0100 Message-ID: <5832.1005863617@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20011115152226.A35113@panzer.kdm.org>, "Kenneth D. Merry" writes: >On Thu, Nov 15, 2001 at 23:11:16 +0100, Dirk Froemberg wrote: >> Hi Kenneth! >> >> On Thu, Nov 15, 2001 at 02:56:15PM -0700, Kenneth D. Merry wrote: >> > [...] >> > Can you find out what line of code in dsioctl is causing the problem? >> > >> > If you built a debug kernel, you can do the following: >> > >> > gdb -k kernel.debug >> > list *(dsioctl+0x42) >> > >> > That should indicate which line in dsioctl is blowing up. >> >> Yes, of course: >> >> % gdb -k kernel.debug >> GNU gdb 4.18 >> [...] >> (kgdb) list *(dsioctl+0x42) >> 0xc01b5216 is in dsioctl (/usr/src/sys/kern/subr_diskslice.c:357). >> 352 struct partition *pp; >> 353 >> 354 slice = dkslice(dev); >> 355 ssp = *sspp; >> 356 sp = &ssp->dss_slices[slice]; >> 357 lp = sp->ds_label; >> 358 switch (cmd) { >> 359 >> 360 case DIOCGDVIRGIN: >> 361 lp = (struct disklabel *)data; >> (kgdb) >> >> Regards Dirk > >Thanks! > >Poul-Henning, any idea why this might be blowing up? It looks like the >slice pointer isn't initialized for some reason. Has the disk actually been opened ? I have fixed some instances where some of the boot-glue would issue ioctl' calls to disks which were not yet opened, that used to work, despite being a gross error. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message