Date: Sun, 27 Apr 2008 18:07:33 -0700 From: Garrett Cooper <yanefbsd@gmail.com> To: Garrett Cooper <yanefbsd@gmail.com> Cc: current@freebsd.org Subject: Re: Panic on attempt to kern_stat / mount bad fs Message-ID: <078878C9-2A7C-4B14-81F6-0E7F9D305305@gmail.com> In-Reply-To: <17A30EF3-B488-494B-94C2-5108EC6EF07A@gmail.com> References: <17A30EF3-B488-494B-94C2-5108EC6EF07A@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 27, 2008, at 5:52 PM, Garrett Cooper wrote: > Trying to use more of my harddisk, I formatted 2 labels I previously =20= > fdisked on my machine (note that there wasn't a modification in MBRs =20= > or slices, just partitions). > > Later on, I was recompiling my kernel and world recently and my =20 > machine took a nose dive (panicked) partway through. The machine =20 > rebooted by itself (to my surprise) and subsequently panicked again =20= > attempting to mount one of the newly formatted filesystems. > > I quickly logged in locally, removed the 1/2 filesystems from my =20 > fstab automount list and rebooted yet again. After that, and once I =20= > removed background_fsck_enable=3DYES from rc.conf, everything appears =20= > to be smooth sailing (knock on wood). > > I have 2 vmcore's that I can debug with: one from the first panic =20 > and another from the 2nd panic. > > (I had to rebuild the kernel after I removed apcupsd as I have a USB =20= > kbd and apcupsd provides uhid -- well, sort of...). > > optimus# uname -a > FreeBSD optimus 8.0-CURRENT FreeBSD 8.0-CURRENT #14: Sun Apr 27 =20 > 17:09:22 PDT 2008 root@optimus:/usr/obj/usr/src/sys/OPTIMUS i386 > > I'll provide more info when requested. > > Thanks, > -Garrett Looks like there might be some missing error checking logic in the fs =20= area: optimus# kgdb -c /var/crash/vmcore.0 /boot/kernel.old/kernel kgdb: kvm_nlist(_stopped_cpus): kgdb: kvm_nlist(_stoppcbs): [GDB will not be able to debug user-mode threads: /usr/lib/=20 libthread_db.so: Undefined symbol "ps_pglobal_lookup"] GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and =20 you are welcome to change it and/or distribute copies of it under certain =20 conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for =20 details. This GDB was configured as "i386-marcel-freebsd". Unread portion of the kernel message buffer: panic: ufs_dirbad: /scratch: bad dir ino 2 at offset 0: mangled entry Uptime: 9d16h44m22s Physical memory: 2038 MB Dumping 250 MB: 235 219 203 187 171 155 139 123 107 91 75 59 43 27 11 #0 doadump () at pcpu.h:195 195 pcpu.h: No such file or directory. in pcpu.h (kgdb) up 10 #10 0xc062c17b in kern_stat (td=3D0xc53c5000, path=3D0xbfbfe2d4 <Address = =20 0xbfbfe2d4 out of bounds>, pathseg=3DUIO_USERSPACE, sbp=3D0xe7debc18) at = /=20 usr/src/sys/kern/vfs_syscalls.c:2109 2109 if ((error =3D namei(&nd)) !=3D 0) (kgdb) bt #0 doadump () at pcpu.h:195 #1 0xc05b52c5 in boot (howto=3D260) at /usr/src/sys/kern/=20 kern_shutdown.c:409 #2 0xc05b54d4 in panic (fmt=3DVariable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:563 #3 0xc06e2b97 in ufs_dirbad (ip=3D0x0, offset=3D0, how=3D0xc0795460 =20 "mangled entry") at /usr/src/sys/ufs/ufs/ufs_lookup.c:598 #4 0xc06e3b5c in ufs_lookup (ap=3D0xe7deba04) at /usr/src/sys/ufs/ufs/=20= ufs_lookup.c:288 #5 0xc0750f02 in VOP_CACHEDLOOKUP_APV (vop=3D0xc07d0360, a=3D0xe7deba04) = =20 at vnode_if.c:153 #6 0xc0618390 in vfs_cache_lookup (ap=3D0xe7deba84) at vnode_if.h:83 #7 0xc07528d1 in VOP_LOOKUP_APV (vop=3D0xc07d0880, a=3D0xe7deba84) at =20= vnode_if.c:99 #8 0xc061e4fc in lookup (ndp=3D0xe7debba8) at vnode_if.h:57 #9 0xc061f143 in namei (ndp=3D0xe7debba8) at /usr/src/sys/kern/=20 vfs_lookup.c:219 #10 0xc062c17b in kern_stat (td=3D0xc53c5000, path=3D0xbfbfe2d4 <Address = =20 0xbfbfe2d4 out of bounds>, pathseg=3DUIO_USERSPACE, sbp=3D0xe7debc18) at = /=20 usr/src/sys/kern/vfs_syscalls.c:2109 #11 0xc062c315 in stat (td=3D0xc53c5000, uap=3D0xe7debcfc) at = /usr/src/sys/=20 kern/vfs_syscalls.c:2093 #12 0xc073c423 in syscall (frame=3D0xe7debd38) at = /usr/src/sys/i386/i386/=20 trap.c:1008 #13 0xc0726b60 in Xint0x80_syscall () at /usr/src/sys/i386/i386/=20 exception.s:196 #14 0x00000033 in ?? () Previous frame inner to this frame (corrupt stack?) (kgdb) up #11 0xc062c315 in stat (td=3D0xc53c5000, uap=3D0xe7debcfc) at = /usr/src/sys/=20 kern/vfs_syscalls.c:2093 2093 error =3D kern_stat(td, uap->path, UIO_USERSPACE, &sb); (kgdb) p *uap $1 =3D {path_l_ =3D 0xe7debcfc "?=E2=BF=BF?=D8=BF?Z", path =3D = 0xbfbfe2d4 <Address =20 0xbfbfe2d4 out of bounds>, path_r_ =3D 0xe7debd00 "?=D8=BF?Z", ub_l_ =3D = =20 0xe7debd00 "?=D8=BF?Z", ub =3D 0xbfbfd8d4, ub_r_ =3D 0xe7debd04 "Z"} (kgdb)=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?078878C9-2A7C-4B14-81F6-0E7F9D305305>