All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* BTRFS error in __btrfs_inc_extent_ref:1935: Object already exists
@ 2013-03-31 22:15 Roman Mamedov
  2013-03-31 22:36 ` Roman Mamedov
  2013-04-02  0:46 ` Josef Bacik
  0 siblings, 2 replies; 10+ messages in thread
From: Roman Mamedov @ 2013-03-31 22:15 UTC (permalink / raw
  To: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 8598 bytes --]

Hello,

Trying to balance a 2TB filesystem on the 3.8.5 kernel:

Label: 'p2'  uuid: 01f6cc8b-d305-40e1-bac8-8fdd548f611e
	Total devices 1 FS bytes used 1.32TB
	devid    1 size 1.80TB used 1.37TB path /dev/sda2

System: total=4.00MB, used=156.00KB
Data+Metadata: total=1.37TB, used=1.32TB

I am getting a Segmentation fault in 'btrfs' utility, and following in dmesg.
What is the problem here?

[12259.667681] btrfs: relocating block group 246973202432 flags 5
[12274.481651] btrfs: found 80 extents
[12284.273736] btrfs: found 1 extents
[12290.803209] btrfs: relocating block group 245899460608 flags 5
[12298.070756] btrfs: found 48 extents
[12304.272924] btrfs: relocating block group 244825718784 flags 5
[12318.361116] btrfs: found 511 extents
[12327.932489] btrfs: found 6 extents
[12335.071480] btrfs: relocating block group 243751976960 flags 5
[12346.588372] btrfs: found 221 extents
[12357.535910] btrfs: found 2 extents
[12363.295088] btrfs: relocating block group 242678235136 flags 5
[12377.999629] btrfs: found 67 extents
[12389.909611] btrfs: found 8 extents
[12397.101725] btrfs: relocating block group 241604493312 flags 5
[12411.303919] btrfs: found 94 extents
[12418.516308] btrfs: relocating block group 240530751488 flags 5
[12432.028091] btrfs: found 176 extents
[12439.785920] btrfs: relocating block group 239457009664 flags 5
[12451.489826] ------------[ cut here ]------------
[12451.489873] WARNING: at fs/btrfs/super.c:256 __btrfs_abort_transaction+0xdf/0x100 [btrfs]()
[12451.489880] Hardware name: KS
[12451.489885] btrfs: Transaction aborted
[12451.489890] Modules linked in: nf_conntrack_ipv6(F) nf_defrag_ipv6(F) ip6t_REJECT(F) ip6table_filter(F) ip6_tables(F) ipt_REJECT(F) xt_tcpudp(F) xt_state(F) xt_limit(F) iptable_nat(F) nf_conntrack_ipv4(F) nf_defrag_ipv4(F) nf_nat_ipv4(F) nf_nat(F) nf_conntrack(F) iptable_filter(F) ip_tables(F) x_tables(F) btrfs(F) zlib_deflate(F) libcrc32c(F) w83627ehf(F) hwmon_vid(F) coretemp(F) gpio_ich(F) snd_pcm(F) i915(F) snd_timer(F) snd(F) soundcore(F) snd_page_alloc(F) microcode(F) psmouse(F) tpm_tis(F) drm_kms_helper(F) pcspkr(F) serio_raw(F) drm(F) lpc_ich(F) i2c_i801(F) r8169(F) i2c_algo_bit(F) mac_hid(F) video(F)
[12451.489981] Pid: 1053, comm: btrfs Tainted: GF            3.8.5-gnu #1
[12451.489987] Call Trace:
[12451.490006]  [<ffffffff81058bef>] warn_slowpath_common+0x7f/0xc0
[12451.490020]  [<ffffffff81058ce6>] warn_slowpath_fmt+0x46/0x50
[12451.490064]  [<ffffffffa0220b37>] ? free_extent_buffer+0x37/0x90 [btrfs]
[12451.490098]  [<ffffffffa01da01f>] __btrfs_abort_transaction+0xdf/0x100 [btrfs]
[12451.490204]  [<ffffffffa01e6d8c>] ? insert_tree_block_ref+0x4c/0x70 [btrfs]
[12451.490295]  [<ffffffffa01e9908>] __btrfs_inc_extent_ref+0x1b8/0x200 [btrfs]
[12451.490337]  [<ffffffffa02450d9>] ? btrfs_merge_delayed_refs+0x289/0x300 [btrfs]
[12451.490408]  [<ffffffffa01ef87e>] run_clustered_refs+0x9ce/0xae0 [btrfs]
[12451.490438]  [<ffffffffa01dd8bd>] ? btrfs_put_tree_mod_seq+0x10d/0x150 [btrfs]
[12451.490470]  [<ffffffffa01f32c0>] btrfs_run_delayed_refs+0xd0/0x2f0 [btrfs]
[12451.490504]  [<ffffffffa0203987>] __btrfs_end_transaction+0xf7/0x410 [btrfs]
[12451.490538]  [<ffffffffa0203cd3>] btrfs_end_transaction_throttle+0x13/0x20 [btrfs]
[12451.490576]  [<ffffffffa024bf34>] merge_reloc_root+0x274/0x500 [btrfs]
[12451.490606]  [<ffffffffa01dd32a>] ? btrfs_free_path+0x2a/0x40 [btrfs]
[12451.490698]  [<ffffffffa024c2d8>] merge_reloc_roots+0x118/0x150 [btrfs]
[12451.490741]  [<ffffffffa024c91b>] relocate_block_group+0x3db/0x640 [btrfs]
[12451.490784]  [<ffffffffa024cd45>] btrfs_relocate_block_group+0x1c5/0x300 [btrfs]
[12451.490825]  [<ffffffffa02250b5>] btrfs_relocate_chunk.isra.54+0x75/0x730 [btrfs]
[12451.490864]  [<ffffffffa021b5e1>] ? release_extent_buffer.isra.26+0x81/0xf0 [btrfs]
[12451.490904]  [<ffffffffa0220b37>] ? free_extent_buffer+0x37/0x90 [btrfs]
[12451.490945]  [<ffffffffa02294d7>] btrfs_balance+0x8e7/0xe00 [btrfs]
[12451.490988]  [<ffffffffa023135f>] btrfs_ioctl_balance+0x22f/0x570 [btrfs]
[12451.491030]  [<ffffffffa0233cb0>] btrfs_ioctl+0xee0/0x1b70 [btrfs]
[12451.491045]  [<ffffffff811a66a3>] ? user_path_at_empty+0x63/0xa0
[12451.491058]  [<ffffffff816d74a0>] ? __do_page_fault+0x240/0x540
[12451.491157]  [<ffffffff811a87d8>] do_vfs_ioctl+0x98/0x550
[12451.491182]  [<ffffffff81162173>] ? do_brk+0x1b3/0x330
[12451.491191]  [<ffffffff811a8d21>] sys_ioctl+0x91/0xb0
[12451.491201]  [<ffffffff816dbe1d>] system_call_fastpath+0x1a/0x1f
[12451.491208] ---[ end trace a10e7cae6b920c78 ]---
[12451.491217] BTRFS error (device sda2) in __btrfs_inc_extent_ref:1935: Object already exists
[12451.494408] btrfs is forced readonly
[12451.495143] ------------[ cut here ]------------
[12451.498178] Kernel BUG at ffffffffa024bdbe [verbose debug info unavailable]
[12451.498178] invalid opcode: 0000 [#1] SMP 
[12451.498178] Modules linked in: nf_conntrack_ipv6(F) nf_defrag_ipv6(F) ip6t_REJECT(F) ip6table_filter(F) ip6_tables(F) ipt_REJECT(F) xt_tcpudp(F) xt_state(F) xt_limit(F) iptable_nat(F) nf_conntrack_ipv4(F) nf_defrag_ipv4(F) nf_nat_ipv4(F) nf_nat(F) nf_conntrack(F) iptable_filter(F) ip_tables(F) x_tables(F) btrfs(F) zlib_deflate(F) libcrc32c(F) w83627ehf(F) hwmon_vid(F) coretemp(F) gpio_ich(F) snd_pcm(F) i915(F) snd_timer(F) snd(F) soundcore(F) snd_page_alloc(F) microcode(F) psmouse(F) tpm_tis(F) drm_kms_helper(F) pcspkr(F) serio_raw(F) drm(F) lpc_ich(F) i2c_i801(F) r8169(F) i2c_algo_bit(F) mac_hid(F) video(F)
[12451.498178] CPU 0 
[12451.498178] Pid: 1053, comm: btrfs Tainted: GF       W    3.8.5-gnu #1 OVH KS/D425KT
[12451.498178] RIP: 0010:[<ffffffffa024bdbe>]  [<ffffffffa024bdbe>] merge_reloc_root+0xfe/0x500 [btrfs]
[12451.498178] RSP: 0018:ffff88011c9bb998  EFLAGS: 00010206
[12451.498178] RAX: ffffffffffffffe2 RBX: ffff880114c24cf0 RCX: 0000000000000002
[12451.498178] RDX: 0000000000000000 RSI: ffff88012976e000 RDI: ffff88011a987800
[12451.498178] RBP: ffff88011c9bba58 R08: ffffea00047430c0 R09: 0000000000000000
[12451.498178] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88011a066000
[12451.498178] R13: ffffffffffffffe2 R14: ffff88011a987800 R15: ffff880119ade800
[12451.498178] FS:  00007f116b017760(0000) GS:ffff88012fc00000(0000) knlGS:0000000000000000
[12451.498178] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[12451.498178] CR2: ffffffffff600400 CR3: 0000000119fed000 CR4: 00000000000007f0
[12451.498178] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[12451.498178] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[12451.498178] Process btrfs (pid: 1053, threadinfo ffff88011c9ba000, task ffff880128231740)
[12451.498178] Stack:
[12451.498178]  ffff880100000002 ffffffffa01dd32a ffff880119ade000 0000000000000000
[12451.498178]  000000021c9bba58 0000e00000000001 ffff88011c9bb9d8 000774ff81350f5b
[12451.498178]  00006c0000000000 080d000000000068 006c000000000000 74000000003cba70
[12451.498178] Call Trace:
[12451.498178]  [<ffffffffa01dd32a>] ? btrfs_free_path+0x2a/0x40 [btrfs]
[12451.498178]  [<ffffffffa024c2d8>] merge_reloc_roots+0x118/0x150 [btrfs]
[12451.498178]  [<ffffffffa024c91b>] relocate_block_group+0x3db/0x640 [btrfs]
[12451.498178]  [<ffffffffa024cd45>] btrfs_relocate_block_group+0x1c5/0x300 [btrfs]
[12451.498178]  [<ffffffffa02250b5>] btrfs_relocate_chunk.isra.54+0x75/0x730 [btrfs]
[12451.498178]  [<ffffffffa021b5e1>] ? release_extent_buffer.isra.26+0x81/0xf0 [btrfs]
[12451.498178]  [<ffffffffa0220b37>] ? free_extent_buffer+0x37/0x90 [btrfs]
[12451.498178]  [<ffffffffa02294d7>] btrfs_balance+0x8e7/0xe00 [btrfs]
[12451.498178]  [<ffffffffa023135f>] btrfs_ioctl_balance+0x22f/0x570 [btrfs]
[12451.498178]  [<ffffffffa0233cb0>] btrfs_ioctl+0xee0/0x1b70 [btrfs]
[12451.498178]  [<ffffffff811a66a3>] ? user_path_at_empty+0x63/0xa0
[12451.498178]  [<ffffffff816d74a0>] ? __do_page_fault+0x240/0x540
[12451.498178]  [<ffffffff811a87d8>] do_vfs_ioctl+0x98/0x550
[12451.498178]  [<ffffffff81162173>] ? do_brk+0x1b3/0x330
[12451.498178]  [<ffffffff811a8d21>] sys_ioctl+0x91/0xb0
[12451.498178]  [<ffffffff816dbe1d>] system_call_fastpath+0x1a/0x1f
[12451.498178] Code: 00 00 4c 89 f7 49 89 45 40 49 8b 74 24 18 e8 6a 1d fa ff 85 c0 74 16 83 f8 f5 75 0f 4c 89 f6 4c 89 ef e8 b6 6f fb ff 85 c0 74 b2 <0f> 0b 8b 45 cc 48 8d 55 cc 48 89 de 4c 89 ff 89 85 64 ff ff ff 
[12451.498178] RIP  [<ffffffffa024bdbe>] merge_reloc_root+0xfe/0x500 [btrfs]
[12451.498178]  RSP <ffff88011c9bb998>
[12451.740494] ---[ end trace a10e7cae6b920c79 ]---

-- 
With respect,
Roman

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BTRFS error in __btrfs_inc_extent_ref:1935: Object already exists
  2013-03-31 22:15 BTRFS error in __btrfs_inc_extent_ref:1935: Object already exists Roman Mamedov
@ 2013-03-31 22:36 ` Roman Mamedov
  2013-04-01  8:12   ` Roman Mamedov
  2013-04-02  0:46 ` Josef Bacik
  1 sibling, 1 reply; 10+ messages in thread
From: Roman Mamedov @ 2013-03-31 22:36 UTC (permalink / raw
  To: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 6618 bytes --]

Hello,

After a reboot the filesystem now does not mount at all, with similar messages.

[   66.874267] Btrfs loaded
[   66.876222] device label p2 devid 1 transid 22985 /dev/sda2
[   66.878175] btrfs: use lzo compression
[   66.878185] btrfs: disk space caching is enabled
[   79.112680] ------------[ cut here ]------------
[   79.112713] WARNING: at fs/btrfs/super.c:256 __btrfs_abort_transaction+0xdf/0x100 [btrfs]()
[   79.112717] Hardware name: KS
[   79.112721] btrfs: Transaction aborted
[   79.112724] Modules linked in: btrfs(F) zlib_deflate(F) libcrc32c(F) nf_conntrack_ipv6(F) nf_defrag_ipv6(F) ip6t_REJECT(F) ip6table_filter(F) ip6_tables(F) ipt_REJECT(F) xt_tcpudp(F) xt_state(F) xt_limit(F) iptable_nat(F) nf_conntrack_ipv4(F) nf_defrag_ipv4(F) nf_nat_ipv4(F) nf_nat(F) nf_conntrack(F) iptable_filter(F) ip_tables(F) x_tables(F) w83627ehf(F) hwmon_vid(F) coretemp(F) gpio_ich(F) i915(F) snd_pcm(F) snd_timer(F) tpm_tis(F) drm_kms_helper(F) microcode(F) snd(F) soundcore(F) drm(F) snd_page_alloc(F) psmouse(F) pcspkr(F) r8169(F) mac_hid(F) i2c_algo_bit(F) i2c_i801(F) serio_raw(F) lpc_ich(F) video(F)
[   79.112793] Pid: 1037, comm: mount Tainted: GF            3.8.5-gnu #1
[   79.112796] Call Trace:
[   79.112810]  [<ffffffff81058bef>] warn_slowpath_common+0x7f/0xc0
[   79.112818]  [<ffffffff81058ce6>] warn_slowpath_fmt+0x46/0x50
[   79.112848]  [<ffffffffa028db37>] ? free_extent_buffer+0x37/0x90 [btrfs]
[   79.112870]  [<ffffffffa024701f>] __btrfs_abort_transaction+0xdf/0x100 [btrfs]
[   79.112893]  [<ffffffffa0253d8c>] ? insert_tree_block_ref+0x4c/0x70 [btrfs]
[   79.112916]  [<ffffffffa0256908>] __btrfs_inc_extent_ref+0x1b8/0x200 [btrfs]
[   79.112947]  [<ffffffffa02b20d9>] ? btrfs_merge_delayed_refs+0x289/0x300 [btrfs]
[   79.112971]  [<ffffffffa025c87e>] run_clustered_refs+0x9ce/0xae0 [btrfs]
[   79.112994]  [<ffffffffa024a8bd>] ? btrfs_put_tree_mod_seq+0x10d/0x150 [btrfs]
[   79.113018]  [<ffffffffa02602c0>] btrfs_run_delayed_refs+0xd0/0x2f0 [btrfs]
[   79.113045]  [<ffffffffa0270987>] __btrfs_end_transaction+0xf7/0x410 [btrfs]
[   79.113072]  [<ffffffffa0270cd3>] btrfs_end_transaction_throttle+0x13/0x20 [btrfs]
[   79.113102]  [<ffffffffa02b8f34>] merge_reloc_root+0x274/0x500 [btrfs]
[   79.113125]  [<ffffffffa024a32a>] ? btrfs_free_path+0x2a/0x40 [btrfs]
[   79.113155]  [<ffffffffa02b92d8>] merge_reloc_roots+0x118/0x150 [btrfs]
[   79.113186]  [<ffffffffa02ba22b>] btrfs_recover_relocation+0x3ab/0x400 [btrfs]
[   79.113212]  [<ffffffffa026e472>] open_ctree+0x1c52/0x1d70 [btrfs]
[   79.113235]  [<ffffffffa0246bbb>] btrfs_mount+0x57b/0x670 [btrfs]
[   79.113245]  [<ffffffff8119aa53>] mount_fs+0x43/0x1b0
[   79.113252]  [<ffffffff811b5226>] vfs_kern_mount+0x76/0x120
[   79.113260]  [<ffffffff811b748d>] do_mount+0x1fd/0xa40
[   79.113267]  [<ffffffff811b70fa>] ? copy_mount_options+0x3a/0x180
[   79.113274]  [<ffffffff811b7d60>] sys_mount+0x90/0xe0
[   79.113283]  [<ffffffff816dbe1d>] system_call_fastpath+0x1a/0x1f
[   79.113288] ---[ end trace abe4f5e37903fe08 ]---
[   79.113294] BTRFS error (device sda2) in __btrfs_inc_extent_ref:1935: Object already exists
[   79.115793] ------------[ cut here ]------------
[   79.116014] Kernel BUG at ffffffffa02b8dbe [verbose debug info unavailable]
[   79.116014] invalid opcode: 0000 [#1] SMP 
[   79.116014] Modules linked in: btrfs(F) zlib_deflate(F) libcrc32c(F) nf_conntrack_ipv6(F) nf_defrag_ipv6(F) ip6t_REJECT(F) ip6table_filter(F) ip6_tables(F) ipt_REJECT(F) xt_tcpudp(F) xt_state(F) xt_limit(F) iptable_nat(F) nf_conntrack_ipv4(F) nf_defrag_ipv4(F) nf_nat_ipv4(F) nf_nat(F) nf_conntrack(F) iptable_filter(F) ip_tables(F) x_tables(F) w83627ehf(F) hwmon_vid(F) coretemp(F) gpio_ich(F) i915(F) snd_pcm(F) snd_timer(F) tpm_tis(F) drm_kms_helper(F) microcode(F) snd(F) soundcore(F) drm(F) snd_page_alloc(F) psmouse(F) pcspkr(F) r8169(F) mac_hid(F) i2c_algo_bit(F) i2c_i801(F) serio_raw(F) lpc_ich(F) video(F)
[   79.116014] CPU 1 
[   79.116014] Pid: 1037, comm: mount Tainted: GF       W    3.8.5-gnu #1 OVH KS/D425KT
[   79.116014] RIP: 0010:[<ffffffffa02b8dbe>]  [<ffffffffa02b8dbe>] merge_reloc_root+0xfe/0x500 [btrfs]
[   79.116014] RSP: 0018:ffff88011eef1a08  EFLAGS: 00010202
[   79.116014] RAX: ffffffffffffffef RBX: ffff8801204e6ea0 RCX: 0000000000000064
[   79.116014] RDX: 0000000000000063 RSI: ffff8801205ba980 RDI: 000000000001bdc0
[   79.116014] RBP: ffff88011eef1ac8 R08: ffffea0004816e80 R09: 0000000000000000
[   79.116014] R10: 0000000000000000 R11: ffffffff81850668 R12: ffff88011ff24800
[   79.116014] R13: ffffffffffffffef R14: ffff88012765f800 R15: ffff880127cbf000
[   79.116014] FS:  00007f0025e1c7e0(0000) GS:ffff88012fc80000(0000) knlGS:0000000000000000
[   79.116014] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   79.116014] CR2: ffffffffff600400 CR3: 000000011edf9000 CR4: 00000000000007e0
[   79.116014] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   79.116014] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[   79.116014] Process mount (pid: 1037, threadinfo ffff88011eef0000, task ffff880129311740)
[   79.116014] Stack:
[   79.116014]  ffff880100000002 ffffffffa024a32a ffff88012765f000 0000000000000000
[   79.116014]  000000021eef1ac8 0000e00000000001 ffff88011eef1a48 000774ff81350f5b
[   79.116014]  00006c0000000000 080d000000000068 006c000000000000 74000000003cba70
[   79.116014] Call Trace:
[   79.116014]  [<ffffffffa024a32a>] ? btrfs_free_path+0x2a/0x40 [btrfs]
[   79.116014]  [<ffffffffa02b92d8>] merge_reloc_roots+0x118/0x150 [btrfs]
[   79.116014]  [<ffffffffa02ba22b>] btrfs_recover_relocation+0x3ab/0x400 [btrfs]
[   79.116014]  [<ffffffffa026e472>] open_ctree+0x1c52/0x1d70 [btrfs]
[   79.116014]  [<ffffffffa0246bbb>] btrfs_mount+0x57b/0x670 [btrfs]
[   79.116014]  [<ffffffff8119aa53>] mount_fs+0x43/0x1b0
[   79.116014]  [<ffffffff811b5226>] vfs_kern_mount+0x76/0x120
[   79.116014]  [<ffffffff811b748d>] do_mount+0x1fd/0xa40
[   79.116014]  [<ffffffff811b70fa>] ? copy_mount_options+0x3a/0x180
[   79.116014]  [<ffffffff811b7d60>] sys_mount+0x90/0xe0
[   79.116014]  [<ffffffff816dbe1d>] system_call_fastpath+0x1a/0x1f
[   79.116014] Code: 00 00 4c 89 f7 49 89 45 40 49 8b 74 24 18 e8 6a 1d fa ff 85 c0 74 16 83 f8 f5 75 0f 4c 89 f6 4c 89 ef e8 b6 6f fb ff 85 c0 74 b2 <0f> 0b 8b 45 cc 48 8d 55 cc 48 89 de 4c 89 ff 89 85 64 ff ff ff 
[   79.116014] RIP  [<ffffffffa02b8dbe>] merge_reloc_root+0xfe/0x500 [btrfs]
[   79.116014]  RSP <ffff88011eef1a08>
[   79.264721] ---[ end trace abe4f5e37903fe09 ]---

-- 
With respect,
Roman

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BTRFS error in __btrfs_inc_extent_ref:1935: Object already exists
  2013-03-31 22:36 ` Roman Mamedov
@ 2013-04-01  8:12   ` Roman Mamedov
  2013-04-01 13:31     ` Josef Bacik
  2013-04-01 23:00     ` anand jain
  0 siblings, 2 replies; 10+ messages in thread
From: Roman Mamedov @ 2013-04-01  8:12 UTC (permalink / raw
  To: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 1393 bytes --]

On Mon, 1 Apr 2013 04:36:05 +0600
Roman Mamedov <rm@romanrm.ru> wrote:

> Hello,
> 
> After a reboot the filesystem now does not mount at all, with similar messages.

So thinking this was an isolated incident, I foolishly continued setting up
scheduled balance on other systems with btrfs that I have.

And got into exactly the same situation on another machine!!

Trying to balance this with -dusage=5, on kernel 3.8.5:

Data: total=215.01GB, used=141.76GB
System, DUP: total=32.00MB, used=32.00KB
System: total=4.00MB, used=0.00
Metadata, DUP: total=9.38GB, used=1.09GB

Same messages, "Object already exists".

While I currently left the previously mentioned 2TB FS in an unmounted broken
state, still waiting for any response from you on how to properly recover from
this problem, in this new case I needed to restore the machine as soon as
possible.

I tried btrfsck --repair, it corrected a lot of errors, but in the end gave up
with a message saying that it can't repair the filesystem; then I did
btrfs-zero-log. After this the FS started mounting successfully again.

Not sure if I got any data corruption as a result, but this is the root FS
and /home, and the machine successfully booted up with no data lost in any of
the apps that were active just before the crash (e.g browser, IM and IRC
clients), so probably not.

-- 
With respect,
Roman

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BTRFS error in __btrfs_inc_extent_ref:1935: Object already exists
  2013-04-01  8:12   ` Roman Mamedov
@ 2013-04-01 13:31     ` Josef Bacik
  2013-04-01 13:45       ` Chris Kastorff
  2013-04-01 15:16       ` Roman Mamedov
  2013-04-01 23:00     ` anand jain
  1 sibling, 2 replies; 10+ messages in thread
From: Josef Bacik @ 2013-04-01 13:31 UTC (permalink / raw
  To: Roman Mamedov; +Cc: linux-btrfs@vger.kernel.org

On Mon, Apr 01, 2013 at 02:12:07AM -0600, Roman Mamedov wrote:
> On Mon, 1 Apr 2013 04:36:05 +0600
> Roman Mamedov <rm@romanrm.ru> wrote:
> 
> > Hello,
> > 
> > After a reboot the filesystem now does not mount at all, with similar messages.
> 
> So thinking this was an isolated incident, I foolishly continued setting up
> scheduled balance on other systems with btrfs that I have.
> 
> And got into exactly the same situation on another machine!!
> 
> Trying to balance this with -dusage=5, on kernel 3.8.5:
> 
> Data: total=215.01GB, used=141.76GB
> System, DUP: total=32.00MB, used=32.00KB
> System: total=4.00MB, used=0.00
> Metadata, DUP: total=9.38GB, used=1.09GB
> 
> Same messages, "Object already exists".
> 
> While I currently left the previously mentioned 2TB FS in an unmounted broken
> state, still waiting for any response from you on how to properly recover from
> this problem, in this new case I needed to restore the machine as soon as
> possible.
> 
> I tried btrfsck --repair, it corrected a lot of errors, but in the end gave up
> with a message saying that it can't repair the filesystem; then I did
> btrfs-zero-log. After this the FS started mounting successfully again.
> 
> Not sure if I got any data corruption as a result, but this is the root FS
> and /home, and the machine successfully booted up with no data lost in any of
> the apps that were active just before the crash (e.g browser, IM and IRC
> clients), so probably not.
> 

Can you capture an image of these broken file systems the next time it happens?
You'll need to clone the progs here

git://github.com/josefbacik/btrfs-progs.git

and build and then run

btrfs-image -w /dev/whatever blah.img

and then upload blah.img up somewhere I can pull it down.  You can use the -t
and -c options too, but the -w is the most important since you have extent tree
corruption.  Thanks,

Josef

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BTRFS error in __btrfs_inc_extent_ref:1935: Object already exists
  2013-04-01 13:31     ` Josef Bacik
@ 2013-04-01 13:45       ` Chris Kastorff
  2013-04-01 13:51         ` Josef Bacik
  2013-04-01 15:16       ` Roman Mamedov
  1 sibling, 1 reply; 10+ messages in thread
From: Chris Kastorff @ 2013-04-01 13:45 UTC (permalink / raw
  To: Josef Bacik; +Cc: Roman Mamedov, linux-btrfs@vger.kernel.org

I have a (larger, 7x2TB at RAID10) filesystem that was recently hit by
this. Same story; filesystem works normally, balance start, works for
a while, then fails with similar stack traces and remounts read-only,
after a reboot does not mount at all with similar error messages and
stack traces.

The FS is still in that state. I'll grab an image and mail a link
privately. I don't need to do anything special for btrfs-image on a
multi-device fs, right?

Kernel version is 3.8.4-1-ARCH (archlinux.)

On Mon, Apr 1, 2013 at 6:31 AM, Josef Bacik <jbacik@fusionio.com> wrote:
> On Mon, Apr 01, 2013 at 02:12:07AM -0600, Roman Mamedov wrote:
>> On Mon, 1 Apr 2013 04:36:05 +0600
>> Roman Mamedov <rm@romanrm.ru> wrote:
>>
>> > Hello,
>> >
>> > After a reboot the filesystem now does not mount at all, with similar messages.
>>
>> So thinking this was an isolated incident, I foolishly continued setting up
>> scheduled balance on other systems with btrfs that I have.
>>
>> And got into exactly the same situation on another machine!!
>>
>> Trying to balance this with -dusage=5, on kernel 3.8.5:
>>
>> Data: total=215.01GB, used=141.76GB
>> System, DUP: total=32.00MB, used=32.00KB
>> System: total=4.00MB, used=0.00
>> Metadata, DUP: total=9.38GB, used=1.09GB
>>
>> Same messages, "Object already exists".
>>
>> While I currently left the previously mentioned 2TB FS in an unmounted broken
>> state, still waiting for any response from you on how to properly recover from
>> this problem, in this new case I needed to restore the machine as soon as
>> possible.
>>
>> I tried btrfsck --repair, it corrected a lot of errors, but in the end gave up
>> with a message saying that it can't repair the filesystem; then I did
>> btrfs-zero-log. After this the FS started mounting successfully again.
>>
>> Not sure if I got any data corruption as a result, but this is the root FS
>> and /home, and the machine successfully booted up with no data lost in any of
>> the apps that were active just before the crash (e.g browser, IM and IRC
>> clients), so probably not.
>>
>
> Can you capture an image of these broken file systems the next time it happens?
> You'll need to clone the progs here
>
> git://github.com/josefbacik/btrfs-progs.git
>
> and build and then run
>
> btrfs-image -w /dev/whatever blah.img
>
> and then upload blah.img up somewhere I can pull it down.  You can use the -t
> and -c options too, but the -w is the most important since you have extent tree
> corruption.  Thanks,
>
> Josef
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BTRFS error in __btrfs_inc_extent_ref:1935: Object already exists
  2013-04-01 13:45       ` Chris Kastorff
@ 2013-04-01 13:51         ` Josef Bacik
  0 siblings, 0 replies; 10+ messages in thread
From: Josef Bacik @ 2013-04-01 13:51 UTC (permalink / raw
  To: Chris Kastorff; +Cc: Josef Bacik, Roman Mamedov, linux-btrfs@vger.kernel.org

On Mon, Apr 01, 2013 at 07:45:16AM -0600, Chris Kastorff wrote:
> I have a (larger, 7x2TB at RAID10) filesystem that was recently hit by
> this. Same story; filesystem works normally, balance start, works for
> a while, then fails with similar stack traces and remounts read-only,
> after a reboot does not mount at all with similar error messages and
> stack traces.
> 
> The FS is still in that state. I'll grab an image and mail a link
> privately. I don't need to do anything special for btrfs-image on a
> multi-device fs, right?
> 

Right it will grab stuff from whatever mirror it's on and put it in the image.
Make sure to use -w, if the extent tree is corrupt the -w will make sure it
actually grabs all of the file system.  Thanks,

Josef

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BTRFS error in __btrfs_inc_extent_ref:1935: Object already exists
  2013-04-01 13:31     ` Josef Bacik
  2013-04-01 13:45       ` Chris Kastorff
@ 2013-04-01 15:16       ` Roman Mamedov
  1 sibling, 0 replies; 10+ messages in thread
From: Roman Mamedov @ 2013-04-01 15:16 UTC (permalink / raw
  To: Josef Bacik; +Cc: linux-btrfs@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 608 bytes --]

On Mon, 1 Apr 2013 09:31:10 -0400
Josef Bacik <jbacik@fusionio.com> wrote:

> Can you capture an image of these broken file systems the next time it happens?
> You'll need to clone the progs here
> 
> git://github.com/josefbacik/btrfs-progs.git
> 
> and build and then run
> 
> btrfs-image -w /dev/whatever blah.img
> 
> and then upload blah.img up somewhere I can pull it down.  You can use the -t
> and -c options too, but the -w is the most important since you have extent tree
> corruption.  Thanks,

Hello,

I have sent the link privately to your E-Mail.

-- 
With respect,
Roman

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BTRFS error in __btrfs_inc_extent_ref:1935: Object already exists
  2013-04-01  8:12   ` Roman Mamedov
  2013-04-01 13:31     ` Josef Bacik
@ 2013-04-01 23:00     ` anand jain
  1 sibling, 0 replies; 10+ messages in thread
From: anand jain @ 2013-04-01 23:00 UTC (permalink / raw
  To: Roman Mamedov; +Cc: linux-btrfs


> I tried btrfsck --repair,

  I am not indicating this is the cause but, kindly note that
  btrfsck --repair has a bug which it will let kernel to reset
  the uuid of the root.

  the fix is at:

[PATCH] btrfs-progs: root_item generation_v2 is out of sync after btrfsck

Thanks, Anand

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BTRFS error in __btrfs_inc_extent_ref:1935: Object already exists
  2013-03-31 22:15 BTRFS error in __btrfs_inc_extent_ref:1935: Object already exists Roman Mamedov
  2013-03-31 22:36 ` Roman Mamedov
@ 2013-04-02  0:46 ` Josef Bacik
  2013-04-02  5:21   ` Roman Mamedov
  1 sibling, 1 reply; 10+ messages in thread
From: Josef Bacik @ 2013-04-02  0:46 UTC (permalink / raw
  To: Roman Mamedov; +Cc: linux-btrfs@vger.kernel.org

On Sun, Mar 31, 2013 at 04:15:40PM -0600, Roman Mamedov wrote:
> Hello,
> 
> Trying to balance a 2TB filesystem on the 3.8.5 kernel:
> 
> Label: 'p2'  uuid: 01f6cc8b-d305-40e1-bac8-8fdd548f611e
> 	Total devices 1 FS bytes used 1.32TB
> 	devid    1 size 1.80TB used 1.37TB path /dev/sda2
> 
> System: total=4.00MB, used=156.00KB
> Data+Metadata: total=1.37TB, used=1.32TB
> 
> I am getting a Segmentation fault in 'btrfs' utility, and following in dmesg.
> What is the problem here?
> 

I just posted a patch for this bug, I can mount your image now without it
panicing and it passes fsck on either side of the mount.  Let me know if it
doesn't work for you.  Thanks,

Josef

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BTRFS error in __btrfs_inc_extent_ref:1935: Object already exists
  2013-04-02  0:46 ` Josef Bacik
@ 2013-04-02  5:21   ` Roman Mamedov
  0 siblings, 0 replies; 10+ messages in thread
From: Roman Mamedov @ 2013-04-02  5:21 UTC (permalink / raw
  To: Josef Bacik; +Cc: linux-btrfs@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 353 bytes --]

On Mon, 1 Apr 2013 20:46:45 -0400
Josef Bacik <jbacik@fusionio.com> wrote:

> I just posted a patch for this bug, I can mount your image now without it
> panicing and it passes fsck on either side of the mount.  Let me know if it
> doesn't work for you.  Thanks,

Thank you, it now mounted and works without issues.

-- 
With respect,
Roman

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-04-02  5:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-31 22:15 BTRFS error in __btrfs_inc_extent_ref:1935: Object already exists Roman Mamedov
2013-03-31 22:36 ` Roman Mamedov
2013-04-01  8:12   ` Roman Mamedov
2013-04-01 13:31     ` Josef Bacik
2013-04-01 13:45       ` Chris Kastorff
2013-04-01 13:51         ` Josef Bacik
2013-04-01 15:16       ` Roman Mamedov
2013-04-01 23:00     ` anand jain
2013-04-02  0:46 ` Josef Bacik
2013-04-02  5:21   ` Roman Mamedov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.