Re: kgdb of kernel issues FB7.0 (mangled inode)
I wasn't sure if I should have edited this. -- Message: 29 Date: Thu, 16 Oct 2008 18:48:31 -0700 From: Kayven Riese [EMAIL PROTECTED] Subject: kgdb of kernel issues FB7. To: freebsd-questions@freebsd.org, [EMAIL PROTECTED], [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 I was running my FreeBSD 7.0-RELEASE (160GB HD) on this laptop: http://www.monkeyview.net/id/965/fsck/dmesg/PB12001901.vhtml Right now I am swapped out http://www.monkeyview.net/id/965/fsck/torrent/p5120212.vhtml but I have the problem disk mounted using this: http://www.monkeyview.net/id/965/fsck/torrent/p5120226.vhtml This is a much older disk with 60GB and $ uname -a FreeBSD 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 UTC 2007 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP i386 $ It makes clunking sounds sometimes, but for the most part it seems to run fine. Some diagnostics on the 160GB HD FB 7.0 that have been done: # mount /dev/da0s4 /mnt/usr # fsck_ufs -y /mnt/usr ** /dev/da0s4 (NO WRITE) ** Last Mounted on /mnt/usr ** Phase 1 - Check Blocks and Sizes INCORRECT BLOCK COUNT I=2779162 (4 should be 0) CORRECT? no fsck_ufs: cannot alloc 871186332 bytes for inoinfo # I have been told that doing fsck while mounted is a very bad thing, but I did fsck before the above depicted instantiation of the fsck command and after this and it always did the same thing. I have done fsck using the argument /dev/da0s4, I have done fsck in single user mode (the 160GB hard boots a character based shell, but crashes and reboots during startx) and always the fsck looks the same. My configuration of the 160GB is a little goofy, in my estimation, just to explain. I currently have three hard drives representing all the times I have installed FreeBSD, two of them are dual booted with MS Vista, and this latest one with 160GB has FreeBSD all to itself, but when I was creating it, I mistook partitions for slices so I configured 4 partitions, leaving some of the disk unallocated thinking that would be good for that 10% utilization thing. I mount three partitions on /, /var, and /usr; respectively and the last one as swap. I learned the vi editor in 1985 and tend to recount the flavor of unix as evax but at this point I wonder if this evax concept is mistaken. I have done a bunch of c programming in university courses, but also spent some time doing molecular biology but they had me on a SUN SPARCstation I guess. Didn't mess with that source code. Anyway. Sorry for not being concise. I thought maybe my background might be useful information. I was told to do another diagnostic, alleged to pin the disk down as having no bad sectors: # dd if=/dev/da0 bs=65536 of=/dev/null 2442045+1 records in 2442045+1 records out 160041885696 bytes transferred in 5718.122211 secs (27988539 bytes/sec) # echo $? 0 # I was told that the fact that it returns 0 was good. I also tried the port called recoverdisk, but that was taking extremely long. I accidently disconnected the USB port # /usr/src/tools/tools/recoverdisk zsh: permission denied: /usr/src/tools/tools/recoverdisk # set -o vi # ls /usr/src/tools/tools/recoverdisk Makefilerecoverdisk.1 recoverdisk.c # cd /usr/src/tools/tools/recoverdisk # make Warning: Object directory not changed from original /usr/src/tools/tools/recoverdisk cc -O2 -fno-strict-aliasing -pipe -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c recoverdisk.c cc -O2 -fno-strict-aliasing -pipe -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -o recoverdisk recoverdisk.o gzip -cn recoverdisk.1 recoverdisk.1.gz # ls Makefilerecoverdisk.1 recoverdisk.c recoverdisk recoverdisk.1.gzrecoverdisk.o # ./recoverdisk usage: recoverdisk [-r worklist] [-w worklist] source-drive [destination] # ./recoverdisk /dev/da0s4 startsize len state done remaining% done 590348288 1048576 134551002112 0 590348288 134551002112 0.0043684 It had run for perhaps half an hour and still was only 0.3% done or so. finally, the guy downstairs told me to debug the kernel so I found this page: http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-gdb.html and after mounting the /usr partition I am here: -rw-r--r-- 1 root wheel 21360 Jun 22 10:30 yarrow.o # kgdb
kgdb of kernel issues FB7.0
I was running my FreeBSD 7.0-RELEASE (160GB HD) on this laptop: http://www.monkeyview.net/id/965/fsck/dmesg/PB12001901.vhtml Right now I am swapped out http://www.monkeyview.net/id/965/fsck/torrent/p5120212.vhtml but I have the problem disk mounted using this: http://www.monkeyview.net/id/965/fsck/torrent/p5120226.vhtml This is a much older disk with 60GB and $ uname -a FreeBSD 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 UTC 2007 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP i386 $ It makes clunking sounds sometimes, but for the most part it seems to run fine. Some diagnostics on the 160GB HD FB 7.0 that have been done: # mount /dev/da0s4 /mnt/usr # fsck_ufs -y /mnt/usr ** /dev/da0s4 (NO WRITE) ** Last Mounted on /mnt/usr ** Phase 1 - Check Blocks and Sizes INCORRECT BLOCK COUNT I=2779162 (4 should be 0) CORRECT? no fsck_ufs: cannot alloc 871186332 bytes for inoinfo # I have been told that doing fsck while mounted is a very bad thing, but I did fsck before the above depicted instantiation of the fsck command and after this and it always did the same thing. I have done fsck using the argument /dev/da0s4, I have done fsck in single user mode (the 160GB hard boots a character based shell, but crashes and reboots during startx) and always the fsck looks the same. My configuration of the 160GB is a little goofy, in my estimation, just to explain. I currently have three hard drives representing all the times I have installed FreeBSD, two of them are dual booted with MS Vista, and this latest one with 160GB has FreeBSD all to itself, but when I was creating it, I mistook partitions for slices so I configured 4 partitions, leaving some of the disk unallocated thinking that would be good for that 10% utilization thing. I mount three partitions on /, /var, and /usr; respectively and the last one as swap. I learned the vi editor in 1985 and tend to recount the flavor of unix as evax but at this point I wonder if this evax concept is mistaken. I have done a bunch of c programming in university courses, but also spent some time doing molecular biology but they had me on a SUN SPARCstation I guess. Didn't mess with that source code. Anyway. Sorry for not being concise. I thought maybe my background might be useful information. I was told to do another diagnostic, alleged to pin the disk down as having no bad sectors: # dd if=/dev/da0 bs=65536 of=/dev/null 2442045+1 records in 2442045+1 records out 160041885696 bytes transferred in 5718.122211 secs (27988539 bytes/sec) # echo $? 0 # I was told that the fact that it returns 0 was good. I also tried the port called recoverdisk, but that was taking extremely long. I accidently disconnected the USB port # /usr/src/tools/tools/recoverdisk zsh: permission denied: /usr/src/tools/tools/recoverdisk # set -o vi # ls /usr/src/tools/tools/recoverdisk Makefilerecoverdisk.1 recoverdisk.c # cd /usr/src/tools/tools/recoverdisk # make Warning: Object directory not changed from original /usr/src/tools/tools/recoverdisk cc -O2 -fno-strict-aliasing -pipe -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c recoverdisk.c cc -O2 -fno-strict-aliasing -pipe -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -o recoverdisk recoverdisk.o gzip -cn recoverdisk.1 recoverdisk.1.gz # ls Makefilerecoverdisk.1 recoverdisk.c recoverdisk recoverdisk.1.gzrecoverdisk.o # ./recoverdisk usage: recoverdisk [-r worklist] [-w worklist] source-drive [destination] # ./recoverdisk /dev/da0s4 startsize len state done remaining% done 590348288 1048576 134551002112 0 590348288 134551002112 0.0043684 It had run for perhaps half an hour and still was only 0.3% done or so. finally, the guy downstairs told me to debug the kernel so I found this page: http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-gdb.html and after mounting the /usr partition I am here: -rw-r--r-- 1 root wheel 21360 Jun 22 10:30 yarrow.o # kgdb /mnt/nexstar/obj/usr/src/sys/KV_KERN/kernel.debug vmcore.12 [GDB will not be able to debug user-mode threads: /usr/lib/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 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.