Bug 12549
Summary: | kernel crash on using btrfs | ||
---|---|---|---|
Product: | File System | Reporter: | Andrey Sipin (andrey) |
Component: | btrfs | Assignee: | Chris Mason (chris.mason) |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | alan, jbacik, kernel |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.29-r2 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Andrey Sipin
2009-01-27 01:32:22 UTC
Josef is chasing this one, we should have a patch this week. This bug #12549 might be coalesced with bug #12555. Sincerely, Valentin QUEQUET I reproduced the bug with 2.6.29-rc6. Step to reproduce: - Create 1GB btrfs volume - Mount it with -o compress - Copy 2 times compiled kernel tree - Copy 1 time uncompile kernel tree (disk usage about 71%) - Try to read/copy the all files in btrfs filesystem to another location Now I'm trying if the bug exist by copying only 1 time the compiled kernel tree (disk usage about 30%). [73829.662671] ------------[ cut here ]------------ [73829.662678] kernel BUG at fs/btrfs/extent-tree.c:3190! [73829.662684] invalid opcode: 0000 [#1] [73829.662690] last sysfs file: /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/resource [73829.662696] Modules linked in: fschmd fscpos i2c_dev ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 iptable_filter ip_tables x_tables snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_pcm_oss snd_mixer_oss rfcomm l2cap bluetooth nfsd lockd auth_rpcgss sunrpc exportfs ipv6 nls_iso8859_1 nls_cp437 vfat fat lp pcspkr psmouse fuse sg usb_storage usblp sbp2 snd_sbawe snd_opl3_lib snd_sb16_dsp snd_sb16_csp snd_sb_common snd_mpu401_uart ns558 evdev container parport_pc parport rtc_cmos rtc_core rtc_lib snd_emu10k1 snd_rawmidi serio_raw thermal snd_ac97_codec ac97_bus processor button thermal_sys hwmon snd_pcm snd_seq_device snd_timer snd_page_alloc snd_util_mem 8139too mii snd_hwdep snd ohci1394 soundcore i2c_piix4 emu10k1_gp ehci_hcd gameport i2c_core intel_agp ieee1394 uhci_hcd shpchp agpgart [73829.662813] [73829.662820] Pid: 3929, comm: cp Tainted: G W (2.6.29-rc6se #2) [73829.662826] EIP: 0060:[<c027e302>] EFLAGS: 00010257 CPU: 0 [73829.662847] EIP is at __btrfs_reserve_extent+0x2c2/0x410 [73829.662853] EAX: dd8c4ac8 EBX: dd8c4ac0 ECX: ffffffff EDX: 00000001 [73829.662859] ESI: dd8c4a40 EDI: dd8c4ac8 EBP: c0f897f0 ESP: c0f89790 [73829.662866] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068 [73829.662873] Process cp (pid: 3929, ti=c0f88000 task=c7a22360 task.ti=c0f88000) [73829.662878] Stack: [73829.662882] c0598654 27400000 00000000 03200000 00000000 03110000 00000000 000ef000 [73829.662893] 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000024 [73829.662905] 00000000 dd944c00 c4ff2060 00000024 00000000 00000002 00000000 dd944c00 [73829.662918] Call Trace: [73829.662924] [<c0281428>] ? btrfs_alloc_extent+0x78/0x120 [73829.662936] [<c0281578>] ? btrfs_alloc_free_block+0xa8/0xf0 [73829.662947] [<c027549e>] ? __btrfs_cow_block+0x21e/0x960 [73829.662956] [<c01607ea>] ? free_hot_page+0xa/0x10 [73829.662970] [<c02a8479>] ? map_extent_buffer+0xb9/0xc0 [73829.662987] [<c0163412>] ? activate_page+0x132/0x150 [73829.663000] [<c0276228>] ? btrfs_cow_block+0x178/0x240 [73829.663008] [<c0279477>] ? btrfs_search_slot+0x197/0x8d0 [73829.663017] [<c02bdbbe>] ? btrfs_remove_free_space_lock+0x1e/0x30 [73829.663034] [<c027a121>] ? btrfs_insert_empty_items+0x61/0x410 [73829.663044] [<c028113a>] ? __btrfs_alloc_reserved_extent+0xca/0x340 [73829.663054] [<c028147f>] ? btrfs_alloc_extent+0xcf/0x120 [73829.663064] [<c0281578>] ? btrfs_alloc_free_block+0xa8/0xf0 [73829.663074] [<c027549e>] ? __btrfs_cow_block+0x21e/0x960 [73829.663082] [<c02aa37d>] ? unlock_extent+0x3d/0x50 [73829.663092] [<c02aa8ef>] ? __extent_read_full_page+0x55f/0x860 [73829.663101] [<c02a8479>] ? map_extent_buffer+0xb9/0xc0 [73829.663110] [<c0276228>] ? btrfs_cow_block+0x178/0x240 [73829.663119] [<c0279477>] ? btrfs_search_slot+0x197/0x8d0 [73829.663128] [<c028ae36>] ? btrfs_lookup_inode+0x36/0xb0 [73829.663141] [<c0294cb5>] ? btrfs_update_inode+0x45/0xd0 [73829.663156] [<c0295d1e>] ? btrfs_dirty_inode+0x4e/0x70 [73829.663164] [<c01992bc>] ? __mark_inode_dirty+0x2c/0x150 [73829.663178] [<c016307c>] ? ondemand_readahead+0xbc/0x150 [73829.663186] [<c0191cfb>] ? touch_atime+0xbb/0xf0 [73829.663199] [<c015d454>] ? generic_file_aio_read+0x564/0x5e0 [73829.663208] [<c024f1e6>] ? jfs_open+0x16/0xa0 [73829.663218] [<c018090c>] ? do_sync_read+0xcc/0x110 [73829.663238] [<c01354d0>] ? autoremove_wake_function+0x0/0x40 [73829.663248] [<c02cadbf>] ? security_file_permission+0xf/0x20 [73829.663267] [<c01809a7>] ? rw_verify_area+0x57/0xc0 [73829.663275] [<c0181114>] ? vfs_read+0x94/0x130 [73829.663284] [<c0180840>] ? do_sync_read+0x0/0x110 [73829.663292] [<c018148d>] ? sys_read+0x3d/0x70 [73829.663300] [<c0103ada>] ? syscall_call+0x7/0xb [73829.663313] Code: 4d 0c e8 d2 f1 03 00 8b b6 80 00 00 00 83 c6 80 8b 86 80 00 00 00 0f 18 00 90 8d 86 80 00 00 00 39 d8 75 85 89 f8 e8 0e a9 eb ff <0f> 0b eb fe 8b 55 e4 8b 82 24 01 00 00 8b 50 20 c7 44 24 10 00 [73829.663373] EIP: [<c027e302>] __btrfs_reserve_extent+0x2c2/0x410 SS:ESP 0068:c0f89790 [73829.663389] ---[ end trace 3f5ff6f07f3b1174 ]--- Do you happen to have the messages that came before the ---[ cut here ]--- part of that? I'd like to see if its a true -ENOSPC or not. Either way thank you for the reproducer, I will add it to my test script. I tried 2.6.29-rc7, same problem: [ 126.544527] btrfs: use compression [ 166.548940] btrfs: disabling barriers on dev /dev/loop0 [ 627.983608] btrfs searching for 4096 bytes, num_bytes 4096, loop 2, allowed_alloc 1 [ 627.983614] btrfs allocation failed flags 36, wanted 4096 [ 627.983617] space_info has 65536 free, is full [ 627.983621] space_info total=161021952, pinned=4755456, delalloc=0, may_use=0, used=156200960 [ 627.983625] block group 29360128 has 53673984 bytes, 50446336 used 3162112 pinned 0 reserved [ 627.983629] 0 blocks of free space at or bigger than bytes is [ 627.983633] block group 297730048 has 53673984 bytes, 52871168 used 802816 pinned 0 reserved [ 627.983636] 0 blocks of free space at or bigger than bytes is [ 627.983640] block group 566099968 has 53673984 bytes, 52883456 used 790528 pinned 0 reserved [ 627.983643] 0 blocks of free space at or bigger than bytes is [ 627.983683] ------------[ cut here ]------------ [ 627.983688] kernel BUG at fs/btrfs/extent-tree.c:3412! [ 627.983691] invalid opcode: 0000 [#1] SMP Detailed step to reproduce: - Create 1GB file system + First case: - Mount with -o compress option - untar 4 times (in different directories) linux-2.6.28.tar.bz2 (usage 50%) - go to the root mount point, do "tar cf - . | cat > /dev/null" + Second case: - Mount normally (without compression) - untar 2 times (in different directories) linux-2.6.28.tar.bz2 (usage 65%) - go to the root mount point, do "tar cf - . | cat > /dev/null" + Third case: - Mount with -o compress option - untar 6 times (in different directories) linux-2.6.28.tar.bz2 (usage up to 77%, then kernel BUG). When reading files with tar, the used space grows by 40-50 MB and then it returns to the original size (it do this many times). If this is still seen on modern kernels then please re-open/update |