[Btrfs-devel] Crash with reusing fs; on big volumes

Jan Engelhardt jengelh at computergmbh.de
Sat Jan 19 08:26:08 PST 2008


Hi,


so I just tried this...

17:08 localhost:~/btr/btrfs-progs-0.11 # mdadm -C /dev/md0 -fe 1.0 -l 
linear -n 59 /dev/sd[b-z] /dev/sda[a-z] /dev/sdb[a-h]
mdadm: array /dev/md0 started.

17:09 localhost:~/btr/btrfs-progs-0.11 # fdisk -l /dev/md0

Disk /dev/md0: 60183.2 GB, 60183225368576 bytes
2 heads, 4 sectors/track, -1 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table

16:54 localhost:~/btr/btrfs-progs-0.11 # ./mkfs.btrfs /dev/md0
fs created on /dev/md0 nodesize 16384 leafsize 16384 sectorsize 4096 
bytes 60183225368576

17:09 localhost:~/btr/btrfs-progs-0.11 # mount -t btrfs /dev/md0 /mnt

17:09 localhost:~/btr/btrfs-progs-0.11 # df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda3      xfs    7.3G  1.1G  6.2G  16% /
udev         tmpfs     62M  316K   62M   1% /dev
ichi:/home     nfs    199G  163G   37G  82% /home
/dev/md0     btrfs     55T  7.5M   55T   1% /mnt

Looking good. So far.

17:16 localhost:~/btr/btrfs-progs-0.11 # mdadm -C /dev/md0 -fe 1.0 -l 
linear -n 16 /dev/sd[b-q]
mdadm: array /dev/md0 started.

17:16 localhost:~/btr/btrfs-progs-0.11 # ./mkfs.btrfs /dev/md0
fs created on /dev/md0 nodesize 16384 leafsize 16384 sectorsize 4096 
bytes 16320874676224
17:16 localhost:~/btr/btrfs-progs-0.11 # mount -t btrfs /dev/md0 /mnt
Segmentation fault


I have experienced this crash before (what I wrote yesterday in IRC).
To reproduce, create a volume, mkfs.btrfs on it, mount, umount, shrink 
the volume, mkfs again, mount -> crash.
(Just what I have presented here.)

The actual size of the device does not seem to matter. Yesterday I 
had the md sized with 9 TB, then 21 TB, went back to 16 (crash). Went 
back to 8 (ok - huh?), went up to 9 (crash). Then tried 59 now (ok), 58 
(still ok), 16 (crash).

I suppose btrfs unfortunately reuses some of the old values that are 
still on disk. Kernel oops:


[ 1793.880206] failed to allocate bio nr -310378755
[ 1793.880567] BUG: unable to handle kernel NULL pointer dereference at 
virtual address 0000000c
[ 1793.880620]  printing eip:
[ 1793.880646] c01aaecd
[ 1793.880674] *pde = 00000000
[ 1793.881017] Oops: 0000 [#1]
[ 1793.881062] SMP 
[ 1793.881148] last sysfs file: /block/md0/md/array_state
[ 1793.881444] Modules linked in: btrfs libcrc32c linear md_mod ipv6 nfs 
lockd nfs_acl sunrpc af_packet iptable_filter ip_tables x_tables 
nf_conntrack_ipv4 nf_conntrack nfnetlink nf_defrag_ipv4 fuse loop dm_mod 
rtc_cmos parport_pc parport rtc_core floppy rtc_lib pcnet32 mii ac 
container intel_agp agpgart button shpchp i2c_piix4 sr_mod pci_hotplug 
cdrom i2c_core sg sd_mod edd xfs fan mptspi mptscsih mptbase 
scsi_transport_spi ata_piix libata scsi_mod thermal processor
[ 1793.881888] CPU:    0
[ 1793.881893] EIP:    0060:[<c01aaecd>]    Tainted: G       N VLI
[ 1793.881896] EFLAGS: 00010292   (2.6.23.14-ccj63-regular #1)
[ 1793.882490] EIP is at bio_add_page+0xd/0x50
[ 1793.882532] eax: 00000000   ebx: 00000000   ecx: 00001000   edx: 
c109ee80
[ 1793.882561] esi: ed7ffefd   edi: ed7ffefd   ebp: c26dbcd0   esp: 
c26dbbdc
[ 1793.882588] ds: 007b   es: 007b   fs: 00d8  gs: 0033  ss: 0068
[ 1793.882625] Process mount (pid: 4654, ti=c26da000 task=c51a2980 
task.ti=c26da000)
[ 1793.882655] Stack: c26dbcd0 c012a0fb c8c85eb8 00000000 ed7ffefd 
c8c78cc7 00000000 ed7ffefd 
[ 1793.882767]        c8c7bbb0 c11b9200 00000000 00001000 00000020 
00000000 c109ee80 c3caadfc 
[ 1793.882794]        00000000 00000000 00000020 00000000 00001000 
00000000 c8c7ace4 00000020 
[ 1793.882827] Call Trace:
[ 1793.883098]  [<c012a0fb>] printk+0x1b/0x20
[ 1793.883313]  [<c8c78cc7>] submit_extent_page+0xe7/0x1d0 [btrfs]
[ 1793.883745]  [<c8c7bbb0>] end_bio_extent_readpage+0x0/0x250 [btrfs]
[ 1793.883790]  [<c8c7ace4>] __extent_read_full_page+0x3c4/0x5d0 [btrfs]
[ 1793.883830]  [<c8c7bbb0>] end_bio_extent_readpage+0x0/0x250 [btrfs]
[ 1793.883863]  [<c8c6cdf0>] btree_get_extent+0x0/0x100 [btrfs]
[ 1793.883905]  [<c8c7af08>] extent_read_full_page+0x18/0x30 [btrfs]
[ 1793.883937]  [<c8c7c5c7>] read_extent_buffer_pages+0xb7/0x290 [btrfs]
[ 1793.883973]  [<c8c6c5d4>] read_tree_block+0x54/0x180 [btrfs]
[ 1793.884002]  [<c8c6fb4f>] btrfs_alloc_inode+0xf/0x50 [btrfs]
[ 1793.884029]  [<c01991a1>] alloc_inode+0xd1/0x190
[ 1793.884074]  [<c8c6c2ce>] __setup_root+0xfe/0x130 [btrfs]
[ 1793.884104]  [<c8c6dac6>] open_ctree+0x376/0x540 [btrfs]
[ 1793.884136]  [<c8c5d64b>] btrfs_fill_super+0x4b/0x160 [btrfs]
[ 1793.884165]  [<c8c5d252>] btrfs_get_sb_bdev+0x152/0x1a0 [btrfs]
[ 1793.884192]  [<c018f5a5>] link_path_walk+0x65/0xc0
[ 1793.884207]  [<c8c5d5cc>] btrfs_get_sb+0x5c/0x90 [btrfs]
[ 1793.884232]  [<c8c5d600>] btrfs_fill_super+0x0/0x160 [btrfs]
[ 1793.884261]  [<c0187358>] vfs_kern_mount+0xa8/0x130
[ 1793.884300]  [<c018743d>] do_kern_mount+0x3d/0xe0
[ 1793.884335]  [<c019cce4>] do_mount+0x5e4/0x720
[ 1793.884353]  [<c016307f>] find_lock_page+0x2f/0xd0
[ 1793.884422]  [<c0165486>] filemap_fault+0x216/0x420
[ 1793.884436]  [<c0171f64>] handle_mm_fault+0x654/0x860
[ 1793.884470]  [<c0167c11>] __alloc_pages+0x61/0x370
[ 1793.884482]  [<c0302240>] do_page_fault+0x0/0x720
[ 1793.884528]  [<c019b5e0>] copy_mount_options+0x40/0x140
[ 1793.884544]  [<c019d397>] sys_mount+0x77/0xb0
[ 1793.884557]  [<c01042d2>] sysenter_past_esp+0x6b/0xa9
[ 1793.884643]  =======================
[ 1793.884693] Code: 00 c1 e9 0c 39 d0 7e 02 89 d0 39 c8 7e 02 89 c8 f3 
c3 8d b6 00 00 00 00 8d bf 00 00 00 00 83 ec 14 89 5c 24 0c 89 c3 89 74 
24 10 <8b> 40 0c 89 d6 8b 40 5c 8b 40 38 0f b7 90 38 01 00 00 89 0c 24 
[ 1793.884939] EIP: [<c01aaecd>] bio_add_page+0xd/0x50 SS:ESP 
0068:c26dbbdc



More information about the Btrfs-devel mailing list