Date: Tue, 24 Apr 2001 00:37:21 -0400 From: Brian Dean <bsd@bsdhome.com> To: freebsd-stable@freebsd.org Subject: panic in mountroot Message-ID: <20010424003721.D84555@vger.bsdhome.com>
next in thread | raw e-mail | index | archive | help
Hi, I'm working on a bootable CD root filesystem and ran into a panic. Let me first say that using an IDE cdrom does not exhibit this problem. However, when I moved the CD to a system with an Adaptec 1542 and a SCSI CD, I got the panic which happens when we go to mount the root filesystem: (kgdb) target remote /dev/cuaa0 Remote debugging using /dev/cuaa0 Debugger (msg=0xc0296e78 "Boot flags requested debugger") at /usr/src/sys/i386/i386/db_interface.c:321 321 } (kgdb) contin Continuing. cd Program received signal SIGSEGV, Segmentation fault. dsioctl (Ignoring packet error, continuing... dev=0xc0716900, cmd=1074029316, data=0xc034ed44 "", flags=1, sspp=0xc0729044) at /usr/src/sys/kern/subr_diskslice.c:372 372 lp = sp->ds_label; (kgdb) bt #0 dsioctl (dev=0xc0716900, cmd=1074029316, data=0xc034ed44 "", flags=1, sspp=0xc0729044) at /usr/src/sys/kern/subr_diskslice.c:372 #1 0xc016c7b4 in diskioctl (dev=0xc0716900, cmd=1074029316, data=0xc034ed44 "", fflag=1, p=0xc02d7e20) at /usr/src/sys/kern/subr_disk.c:221 #2 0xc014efd6 in iso_get_ssector (dev=0xc0716900, p=0xc02d7e20) at /usr/src/sys/isofs/cd9660/cd9660_vfsops.c:127 #3 0xc014f06f in iso_mountroot (mp=0xc0722600, p=0xc02d7e20) at /usr/src/sys/isofs/cd9660/cd9660_vfsops.c:161 #4 0xc014f0f4 in cd9660_mount (mp=0xc0722600, path=0x0, data=0x0, ndp=0x0, p=0xc02d7e20) at /usr/src/sys/isofs/cd9660/cd9660_vfsops.c:193 #5 0xc018c115 in vfs_mountroot_try (mountfrom=0xc034ef04 "cd9660:cd0a") at /usr/src/sys/kern/vfs_conf.c:213 #6 0xc018c2a6 in vfs_mountroot_ask () at /usr/src/sys/kern/vfs_conf.c:270 #7 0xc018bf3f in vfs_mountroot (junk=0x0) at /usr/src/sys/kern/vfs_conf.c:110 #8 0xc01528cc in mi_startup (framep=0xc034efb4) at /usr/src/sys/kern/init_main.c:219 (kgdb) list 367 struct partition *pp; 368 369 slice = dkslice(dev); 370 ssp = *sspp; 371 sp = &ssp->dss_slices[slice]; 372 lp = sp->ds_label; 373 switch (cmd) { 374 375 case DIOCGDVIRGIN: 376 lp = (struct disklabel *)data; (kgdb) p *dev $1 = {si_flags = 0, si_udev = 3840, si_hash = {le_next = 0xc03fa380, le_prev = 0xc02c36f8}, si_hlist = {slh_first = 0xc3138ec0}, si_name = '\000' <repeats 15 times>, si_drv1 = 0x0, si_drv2 = 0x0, si_devsw = 0x0, si_devfs = 0x0, si_bdevfs = 0x0, si_iosize_max = 0, __si_u = {__si_tty = {__sit_tty = 0x0}, __si_disk = {__sid_disk = 0x0, __sid_mountpoint = 0x0, __sid_bsize_phys = 0, __sid_bsize_best = 0}}} (kgdb) p ssp $2 = (struct diskslices *) 0x0 (kgdb) p *sspp $2 = (struct diskslices *) 0x0 (kgdb) up #1 0xc016c7b4 in diskioctl (dev=0xc0716a00, cmd=1074029316, data=0xc034ed44 "", fflag=1, p=0xc02d7e20) at /usr/src/sys/kern/subr_disk.c:221 221 error = dsioctl(dev, cmd, data, fflag, &dp->d_slice); (kgdb) list 216 int error; 217 dev_t pdev; 218 219 pdev = dkmodpart(dkmodslice(dev, WHOLE_DISK_SLICE), RAW_PART); 220 dp = pdev->si_disk; 221 error = dsioctl(dev, cmd, data, fflag, &dp->d_slice); 222 if (error == ENOIOCTL) 223 error = dp->d_devsw->d_ioctl(dev, cmd, data, fflag, p); 224 return (error); 225 } (kgdb) p *dp $3 = {d_flags = 0, d_dsflags = 6, d_devsw = 0xc02a31e0, d_dev = 0xc0716a80, d_slice = 0x0, d_label = {d_magic = 0, d_type = 0, d_subtype = 0, d_typename = '\000' <repeats 15 times>, d_un = {un_d_packname = '\000' <repeats 15 times>, un_b = {un_d_boot0 = 0x0, un_d_boot1 = 0x0}}, d_secsize = 0, d_nsectors = 0, d_ntracks = 0, d_ncylinders = 0, d_secpercyl = 0, d_secperunit = 0, d_sparespertrack = 0, d_sparespercyl = 0, d_acylinders = 0, d_rpm = 0, d_interleave = 0, d_trackskew = 0, d_cylskew = 0, d_headswitch = 0, d_trkseek = 0, d_flags = 0, d_drivedata = {0, 0, 0, 0, 0}, d_spare = { 0, 0, 0, 0, 0}, d_magic2 = 0, d_checksum = 0, d_npartitions = 0, d_bbsize = 0, d_sbsize = 0, d_partitions = {{p_size = 0, p_offset = 0, p_fsize = 0, p_fstype = 0 '\000', p_frag = 0 '\000', __partition_u1 = {cpg = 0, sgs = 0}}, { p_size = 0, p_offset = 0, p_fsize = 0, p_fstype = 0 '\000', p_frag = 0 '\000', __partition_u1 = {cpg = 0, sgs = 0}}, {p_size = 0, p_offset = 0, p_fsize = 0, p_fstype = 0 '\000', p_frag = 0 '\000', __partition_u1 = {cpg = 0, sgs = 0}}, { p_size = 0, p_offset = 0, p_fsize = 0, p_fstype = 0 '\000', p_frag = 0 '\000', __partition_u1 = {cpg = 0, sgs = 0}}, {p_size = 0, p_offset = 0, p_fsize = 0, p_fstype = 0 '\000', p_frag = 0 '\000', __partition_u1 = {cpg = 0, sgs = 0}}, { p_size = 0, p_offset = 0, p_fsize = 0, p_fstype = 0 '\000', p_frag = 0 '\000', __partition_u1 = {cpg = 0, sgs = 0}}, {p_size = 0, p_offset = 0, p_fsize = 0, p_fstype = 0 '\000', p_frag = 0 '\000', __partition_u1 = {cpg = 0, sgs = 0}}, { p_size = 0, p_offset = 0, p_fsize = 0, p_fstype = 0 '\000', p_frag = 0 '\000', __partition_u1 = {cpg = 0, sgs = 0}}}}} (kgdb) p dp->d_slice $4 = (struct diskslices *) 0x0 (kgdb) The d_slice passed into dsioctl() is null which is why the panic occurs. I don't know why it's null, though. Any ideas? I can provide more information from this session, just let me know what you need. I'm running sources just prior to the tagging for 4.3 release, so although the version says 4.3-RC, it is, for all intents and purposes, 4.3-RELEASE. FreeBSD 4.3-RC #0: Mon Apr 23 18:38:03 EDT 2001 root@vger.bsdhome.com:/usr/obj/usr/src/sys/ROROOT The adaptec controller and cd rom driver are probed as follows if this helps in some way: aha0 at port 0x330-0x333 irq 11 drq 5 on isa0 aha0: AHA-1542CF FW Rev. E.0 (ID=45) SCSI Host Adapter, SCSI ID 7, 16 CCBs ... cd0 at aha0 bus 0 target 5 lun 0 cd0: <TOSHIBA CD-ROM XM-5301TA 1895> Removable CD-ROM SCSI-2 device cd0: 3.300MB/s transfers cd0: cd present [67768 x 2048 byte records] Thanks, -Brian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010424003721.D84555>