hi,
I just put a fix in for the core dump here - db/freesp.c now
does the same thing as db/check.c when it can't read one of
the blocks in a btree. as to why it can't, I'm not sure yet,
but at least now we'll be able to see which block and which
allocation group the problem is, and it will attempt to keep
going instead of dying.
thanks.
On Mon, Aug 27, 2001 at 09:16:47PM +0200, Fran?ois Dupoux wrote:
> Hi,
>
> I had a segfault with xfs_db compiled from xfsprogs-1.3.5.src.tar.gz.
> Kernel 2.4.9, Redhat-7.1
>
> The segfault happens when I run the command "freesp -d -s" with "xfs_db -x
> /dev/hdc5".
> This partition was formatted by mkfs.xfs. This is a 14.16 GB partition,
> with 5.34 GB used.
>
> duron750:/home/dupoux# xfs_db -x /dev/hdc5
> xfs_db: freesp -d -s
> 0 43730 1
> 0 43731 1
> 0 43732 1
> 0 43733 1
> 0 43734 1
> 0 43735 1
> Segmentation fault (core dumped)
>
> --------------- gdb /sbin/xfs_db core -------------------
> GNU gdb 5.0rh-5 Red Hat Linux 7.1
> Copyright 2001 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-redhat-linux"...
> Core was generated by `xfs_db -x /dev/hdc5'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /lib/i686/libc.so.6...done.
> Loaded symbols for /lib/i686/libc.so.6
> Reading symbols from /lib/ld-linux.so.2...done.
> Loaded symbols for /lib/ld-linux.so.2
> #0 scanfunc_bno (ablock=0x0, typ=TYP_BNOBT, level=0, agf=0x80ab5e0) at
> /usr/include/linux/byteorder/swab.h:132
> 132 {
> --------------------------------------------------------
>
> ------------ informations about /dev/hdc5 -------------
> Block size....................4096 bytes
> Total blocks count............3710999
> Used blocks count.............1400933
> Free blocks count.............2310066
> Space usage:..................37 %
> Total space:..................14.16 GB
> Used space....................5.34 GB
> Free space....................8.81 GB
> Bitmap size...................453.00 KB
> Allocation Group count:.......15
> Blocks per Allocation Group...262144
> Allocation Group size:........1.00 GB
> --------------------------------------------------------
>
> You can download the core file from http://www.partimage.org/misc/core.gz
> It seems that the "freelist" is working, and it segfault at beginning of
> reading
> the btree (the BNO one).
>
> Here is the beginning of the result I d'like to obtain:
> ---------------------------------------------------------
> addToHist: 0 43730 1
> addToHist: 0 43731 1
> addToHist: 0 43732 1
> addToHist: 0 43733 1
> addToHist: 0 43734 1
> addToHist: 0 43735 1
> addToHist: 0 12 1
> addToHist: 0 54 247
> addToHist: 0 325 89
> addToHist: 0 566 25
> addToHist: 0 628 821
> addToHist: 0 1465 11
> addToHist: 0 1813 159
> addToHist: 0 1976 1
> ......
> ---------------------------------------------------------
>
> The partition was very fragmented. There is no problem when reading files
> from the mount point. (I am using the patch XFS-2001-08-19 for 2.4.9). Here
> is how
> I made this 14 GB partition:
> mkfs.xfs /dev/hdc5
> mount /dev/hdc5 /mnt/ess
> cd /mnt/ess
> createdata -d6 .
> mv a r
> mv b s
> createdata -d6 .
> umount /mnt/ess
>
> createdata is a small program which creates a lot of files of a random size,
> with random data. It
> fills the partition. When there is no space left, it erases a lot of files
> (it keeps 1 file for 6 files
> when the option -d6 is used). It's very useful to make a fragmented file
> system. You can download the source
> code on http://www.partimage.org/misc/createdata.cpp.
>
> I already had the same problem, after formatting and filling this partition
> with the same method (other random files)
>
> thanks
>
--
Nathan
|