Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Oct 2000 12:33:37 -0500
From:      "Jeffrey J. Mountin" <jeff-ml@mountin.net>
To:        stable@FreeBSD.ORG
Subject:   md panic
Message-ID:  <4.3.2.20001016120244.00b5ccc0@207.227.119.2>

next in thread | raw e-mail | index | archive | help
Scenario:

Needed a larger md mount.  Added the following line to the kernel config:

options     MD_NSECT=40000

Rebuilt
reboot

Here's the interesting part, after the reboot, when md is configured and 
mounted there is no problem, other than it only having 20,000 sectors and 
not 40,000.  Guess I forgot to MAKEDEV...

umount /tmp_ports
kldunload md
sh MAKEDEV md0
kldload md
disklabel -r -w md0 auto
newfs /dev/md0c
Panic!

#!/bin/sh

if [ -e /dev/md0 -a -e /dev/md0c ]; then
         disklabel -r -w md0 auto && \
         newfs /dev/md0c && \
         mount /dev/md0c /tmp_ports && \
         chmod 1777 /tmp_ports
         echo -n ' MDs'
fi

/boot/loader.conf has 'md_load="YES"'


Most likely there is no need to unload the kld, but figure it can't hurt or 
can it?

Here is the trace:

 > gdb -k
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd".
(kgdb) symbol-file localMP.debug
Reading symbols from localMP.debug...done.
(kgdb) exec-file /var/crash/kernel.3
(kgdb) core-file /var/crash/vmcore.3
SMP 2 cpus
IdlePTD 2904064
initial pcb at 24e760
panicstr: from debugger
panic messages:
---
panic: freeing with unknown type (MD sectors)
mp_lock = 00000001; cpuid = 0; lapic.id = 00000000
panic: from debugger
mp_lock = 00000002; cpuid = 0; lapic.id = 00000000
boot() called on cpu#0
Uptime: 3m4s

dumping to dev #ad/0x20001, offset 45056
dump ata0: resetting devices .. done
128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 
109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 
87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 
62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 
37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 
12 11 10 9 8 7 6 5 4 3 2 1
---
#0  boot (howto=260) at ../../kern/kern_shutdown.c:302
302                     dumppcb.pcb_cr3 = rcr3();
(kgdb) bt
#0  boot (howto=260) at ../../kern/kern_shutdown.c:302
#1  0xc014f3d5 in panic (fmt=0xc0208854 "from debugger") at 
../../kern/kern_shutdown.c:552
#2  0xc012b105 in db_panic (addr=-1071777028, have_addr=0, count=-1, 
modif=0xc9d9abd0 "") at ../../ddb/db_command.c:433
#3  0xc012b0a5 in db_command (last_cmdp=0xc0231abc, cmd_table=0xc023191c, 
aux_cmd_tablep=0xc024ab08)
     at ../../ddb/db_command.c:333
#4  0xc012b16a in db_command_loop () at ../../ddb/db_command.c:455
#5  0xc012d277 in db_trap (type=3, code=0) at ../../ddb/db_trap.c:71
#6  0xc01df841 in kdb_trap (type=3, code=0, regs=0xc9d9ace0) at 
../../i386/i386/db_interface.c:158
#7  0xc01f1cb8 in trap (frame={tf_fs = -908525544, tf_es = -1071710192, 
tf_ds = -919076848, tf_edi = -1056513980,
       tf_esi = 256, tf_ebp = -908481240, tf_isp = -908481268, tf_ebx = 
-1071588352, tf_edx = -1, tf_ecx = 1660944538,
       tf_eax = 18, tf_trapno = 3, tf_err = 0, tf_eip = -1071777028, tf_cs 
= 8, tf_eflags = 598, tf_esp = -1071493693,
       tf_ss = -1071585262}) at ../../i386/i386/trap.c:569
#8  0xc01dfafc in Debugger (msg=0xc020e812 "panic") at machine/cpufunc.h:64
#9  0xc014f3cc in panic (fmt=0xc020dc00 "freeing with unknown type (%s)") 
at ../../kern/kern_shutdown.c:550
#10 0xc014ab9f in free (addr=0xc1083000, type=0xc02b0620) at 
../../kern/kern_malloc.c:302
#11 0xc02aef29 in ?? ()
#12 0xc02aec5c in ?? ()
#13 0xc0158895 in diskstrategy (bp=0xc3817dd8) at ../../kern/subr_disk.c:207
#14 0xc014b9af in physio (dev=0xc0ff3900, uio=0xc9d9aed8, ioflag=1) at 
../../kern/kern_physio.c:111
#15 0xc01853f9 in spec_write (ap=0xc9d9ae68) at 
../../miscfs/specfs/spec_vnops.c:281
#16 0xc01b4358 in ufsspec_write (ap=0xc9d9ae68) at 
../../ufs/ufs/ufs_vnops.c:1855
#17 0xc01b483d in ufs_vnoperatespec (ap=0xc9d9ae68) at 
../../ufs/ufs/ufs_vnops.c:2303
#18 0xc01818bc in vn_write (fp=0xc10a7d40, uio=0xc9d9aed8, cred=0xc1007780, 
flags=0, p=0xc937e560) at vnode_if.h:363
#19 0xc015ce6d in dofilewrite (p=0xc937e560, fp=0xc10a7d40, fd=3, 
buf=0x8091320, nbyte=8192, offset=-1, flags=0)
     at ../../sys/file.h:159
#20 0xc015cd53 in write (p=0xc937e560, uap=0xc9d9af80) at 
../../kern/sys_generic.c:310
#21 0xc01f26f5 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47, 
tf_edi = 134812448, tf_esi = 8192,
       tf_ebp = -1077940040, tf_isp = -908480556, tf_ebx = 16, tf_edx = 0, 
tf_ecx = 0, tf_eax = 4, tf_trapno = 12,
       tf_err = 2, tf_eip = 134620416, tf_cs = 31, tf_eflags = 643, tf_esp 
= -1077940100, tf_ss = 47})
     at ../../i386/i386/trap.c:1150
#22 0xc01e020b in Xint0x80_syscall ()
#23 0x804b29d in ?? ()
#24 0x804919b in ?? ()
#25 0x8048139 in ?? ()
(kgdb)


This is with -stable built on the 9th, but am pulling sources and will be 
rebuilding to try once more.

Jeff Mountin - jeff@mountin.net
Systems/Network Administrator
FreeBSD - the power to serve



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?4.3.2.20001016120244.00b5ccc0>