freebsd-questions Digest, Vol 237, Issue 16

Kayven Riese kayvey at gmail.com
Fri Oct 17 16:38:57 PDT 2008


-----------------------

>
> Message: 11
> Date: Fri, 17 Oct 2008 08:39:40 -0700
> From: "Kayven Riese" <kayvey at gmail.com>
> Subject: Re: kgdb of kernel issues FB7.0 (mangled inode)
> To: freebsd-questions at freebsd.org
> Message-ID:
>        <28b9b4180810170839q45697ca9pef7cb04c2f469008 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>

 I need to keep posting to questions because I don't know how to ask
questions.
I can't run my drive that is currently mounted with its partitions like
this:

   device name             would be mounted if "master"                is
mounted now
  /dev/da0s1
/                                                /mnt/tmp
  /dev/da0s3
/var                                           /mnt/var
  /dev/da0s4
/usr                                         /mnt/usr

I can't run this hardrive.  It is my newest.  I can mount it and I can get a
single
user prompt.  Before It crashed it would give me a character based shell,
and then
I would type "startx" and get KDE.  Now it reboots on "startx."  It had some
sort
of mangled inode (see below) but the fsck -y -f /usr that I have done in
single
user mode just now after swapon -a failed just like all the other times I
have done
fsck on it (see below) requesting 0.871 TBytes or something.  I have just
learned
about var/crash and providing that waaaay waaay at the bottom of this
transmission.

>
> > I wasn't sure if I should have edited this.
> > ------------------------------
> >
> > Message: 29
> > Date: Thu, 16 Oct 2008 18:48:31 -0700
> > From: "Kayven Riese" <kayvey at gmail.com>
> > Subject: kgdb of kernel issues FB7.
> > To: freebsd-questions at freebsd.org, california71_lv at hotmail.com,
> >        stan at cs.sfsu.edu
> > Message-ID:
> >        <28b9b4180810161848ua342669l9cbaeaa61b357407 at mail.gmail.com>
> > 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     root at dessler.cse.buffalo.edu:/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
> > Makefile        recoverdisk.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
> > Makefile                recoverdisk.1           recoverdisk.c
> > recoverdisk             recoverdisk.1.gz        recoverdisk.o
> > # ./recoverdisk
> > usage: recoverdisk [-r worklist] [-w worklist] source-drive [destination]
> > # ./recoverdisk /dev/da0s4
> >        start    size           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.  Type "show warranty" for
> details.
> > This GDB was configured as "i386-marcel-freebsd".
> >
> > Unread portion of the kernel message buffer:
> > dev = ad0s4d, block = 1, fs = /usr
> > panic: ffs_blkfree: freeing free block
> > cpuid = 0
> > Uptime: 8m2s
> > Physical memory: 1010 MB
> > Dumping 78 MB: 63 47 31 15
> >
> > #0  0x00000000 in ?? ()
> > (kgdb)
> >
> > ::sigh::
>
>
> # kgdb /mnt/nexstar/obj/usr/src/sys/KV_KERN/kernel.debug vmcore.0
> [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.  Type "show warranty" for details.
> This GDB was configured as "i386-marcel-freebsd".
>
> Unread portion of the kernel message buffer:
> panic: ufs_dirbad: /usr: bad dir ino 9750624 at offset 28160: mangled entry
> cpuid = 0
> Uptime: 5m6s
> Physical memory: 1010 MB
> Dumping 149 MB: 134 118 102 86 70 54 38 22 6
>
> #0  0x00000000 in ?? ()
> (kgdb)
>
>
> >
> >
> >
> >
> > I  was figuring I would try again, but right now I am running the
> > intermediary (120GB) HD..
> > let me reacquaint you with my disks:
> >
> >  relative age          capacity        dual boot?        partition 1
> >        partition 2                   notes
> >    oldest                  60GB               yes               FreeBSD
> 6.2
> >             Vista                   makes the
> >
> > gnome (operational)      (broken)               clunking noises
> >
> >   intermediate         120GB             yes                Vista
> >           FreeBSD (6.3?)
> >
> >  (running now)            (broken)
> >
> >    newest                160GB             no               FreeBSD 7.0
> >           n/a                     subject of this
> >
> KDE
> > (won't start)                                         question
> >
> >
> >
> >   - Accept and Award
> > Points<
> >
> http://www.experts-exchange.com/Storage/Hard_Drives/splitPoints.jsp?qid=23798083&aid=22692235
> > >



# cat /mnt/tmp/etc/fstab
# Device                Mountpoint      FStype  Options         Dump
Pass#
/dev/ad0s2b             none            swap    sw              0       0
/dev/ad0s1a             /               ufs     rw              1       1
/dev/ad0s4d             /usr            ufs     rw              2       2
/dev/ad0s3d             /var            ufs     rw              2       2
/dev/cd0                /cdrom          cd9660  ro,noauto       0       0
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0
/dev/da0s1              /mnt/pix        msdosfs ro,noauto       0       0
# mount /dev/da0s3 /mnt/var
# mount /dev/da0s4 /mnt/usr
# cd /mnt/usr/obj/src/sys/
cd: no such file or directory: /mnt/usr/obj/src/sys/
# cd /mnt/usr/obj/usr/src/sys/KV_KERN
# ls /mnt/var/crash
bounds          info.2          info.8          vmcore.11       vmcore.6
info.0          info.3          info.9          vmcore.12       vmcore.7
info.1          info.4          minfree         vmcore.2        vmcore.8
info.10         info.5          vmcore.0        vmcore.3        vmcore.9
info.11         info.6          vmcore.1        vmcore.4
info.12         info.7          vmcore.10       vmcore.5
# set -o vi
# cat /mnt/var/crash/info.0
Dump header from device /dev/ad0s2b
  Architecture: i386
  Architecture Version: 2
  Dump Length: 156418048B (149 MB)
  Blocksize: 512
  Dumptime: Tue Sep 16 20:43:27 2008
  Hostname: kv_bsd.sfsu.edu
  Magic: FreeBSD Kernel Dump
  Version String: FreeBSD 7.0-RELEASE #0: Sun Jun 22 10:42:15 PDT 2008
    root at kv_bsd.sfsu.edu:/usr/obj/usr/src/sys/KV_KERN
  Panic String: ufs_dirbad: /usr: bad dir ino 9750624 at offset 28160:
mangled entry
  Dump Parity: 2465829192
  Bounds: 0
  Dump Status: good
#
# cat /mnt/var/crash/info.1
Dump header from device /dev/ad0s2b
  Architecture: i386
  Architecture Version: 2
  Dump Length: 112631808B (107 MB)
  Blocksize: 512
  Dumptime: Tue Sep 16 21:17:42 2008
  Hostname: kv_bsd.sfsu.edu
  Magic: FreeBSD Kernel Dump
  Version String: FreeBSD 7.0-RELEASE #0: Sun Jun 22 10:42:15 PDT 2008
    root at kv_bsd.sfsu.edu:/usr/obj/usr/src/sys/KV_KERN
  Panic String: ufs_dirbad: /usr: bad dir ino 9750624 at offset 28160:
mangled entry
  Dump Parity: 2875290951
  Bounds: 1
  Dump Status: good
#

# cat /mnt/var/crash/info.2
Dump header from device /dev/ad0s2b
  Architecture: i386
  Architecture Version: 2
  Dump Length: 72953856B (69 MB)
  Blocksize: 512
  Dumptime: Sat Oct  4 11:04:21 2008
  Hostname: kv_bsd.sfsu.edu
  Magic: FreeBSD Kernel Dump
  Version String: FreeBSD 7.0-RELEASE #0: Sun Jun 22 10:42:15 PDT 2008
    root at kv_bsd.sfsu.edu:/usr/obj/usr/src/sys/KV_KERN
  Panic String: ffs_blkfree: freeing free block
  Dump Parity: 1973457018
  Bounds: 2
  Dump Status: good
#

It looks like the rest of the infos all say that.






>
> >
> > *----------------------------------------------------------*
> >   Kayven Riese, BSCS, MS (Physiology and Biophysics)
> >   (415) 902 5513 cellular
> >   http://kayve.net
> >   Webmaster http://ChessYoga.org
> > *----------------------------------------------------------*
> >
> >
> >
>
>
> ------------------------------
>
>


More information about the freebsd-questions mailing list