From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomas Carnecky Subject: Re: Bug in btrfs_rename (kernel BUG at fs/btrfs/inode.c:5595!) Date: Wed, 13 Jan 2010 21:11:59 +0100 Message-ID: <4B4E290F.9010100@gmail.com> References: <4B4E1A5D.1070203@gmail.com> <20100113201317.GC2774@dhcp231-156.rdu.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Cc: linux-btrfs@vger.kernel.org To: Josef Bacik Return-path: In-Reply-To: <20100113201317.GC2774@dhcp231-156.rdu.redhat.com> List-ID: On 1/13/10 9:13 PM, Josef Bacik wrote: > On Wed, Jan 13, 2010 at 08:09:17PM +0100, Tomas Carnecky wrote: >> I was running v2.6.33-rc2-187-g08d869a and everything was ok. Today I >> decided to update the kernel (to v2.6.33-rc4) and a minute or two after >> logging into the gnome desktop this kernel bug appeared in dmesg. I then >> went back to the old kernel but the bug didn't disappear, not even after >> running btrfsck on the filesystem. >> > Ok will you please run with this patch? It shouldn't panic your box, since it > seems ret is -EEXIST. Just watch your logs for > > OH NO, ORPHAN ENTRY ALREADY EXISTS FOR > > and then look up and find all occurances of > > Btrfs: orphan add > > with the stack trace and send it back to me so I can verify that nothing heinous > is happening. I assume we're just racing with unlink/rename so all that needs > to be done is to take that BUG_ON out, but it would be nice to know for sure. Btrfs: orphan add 3021394 Pid: 2029, comm: gdm Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_unlink+0xfb/0x120 [] ? inode_permission+0x70/0x90 [] vfs_unlink+0x83/0xf0 [] ? lookup_hash+0x30/0x40 [] do_unlinkat+0x183/0x1c0 [] ? __up_write+0xe5/0x150 [] sys_unlink+0x11/0x20 [] system_call_fastpath+0x16/0x1b Btrfs: orphan add 3021395 Pid: 2029, comm: gdm Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_unlink+0xfb/0x120 [] ? inode_permission+0x70/0x90 [] vfs_unlink+0x83/0xf0 [] ? lookup_hash+0x30/0x40 [] do_unlinkat+0x183/0x1c0 [] ? __up_write+0xe5/0x150 [] sys_unlink+0x11/0x20 [] system_call_fastpath+0x16/0x1b Btrfs: orphan add 3021384 Pid: 2029, comm: gdm Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_unlink+0xfb/0x120 [] ? inode_permission+0x70/0x90 [] vfs_unlink+0x83/0xf0 [] ? lookup_hash+0x30/0x40 [] do_unlinkat+0x183/0x1c0 [] ? __put_cred+0x37/0x50 [] ? commit_creds+0xb2/0x120 [] ? sys_setresuid+0x150/0x160 [] sys_unlink+0x11/0x20 [] system_call_fastpath+0x16/0x1b Btrfs: orphan add 3021385 Pid: 2345, comm: gdm Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_rename+0x4c0/0x590 [] vfs_rename+0x3da/0x420 [] sys_renameat+0x23e/0x270 [] ? handle_mm_fault+0x188/0x840 [] ? up_read+0x9/0x10 [] ? do_page_fault+0x141/0x2e0 [] sys_rename+0x16/0x20 [] system_call_fastpath+0x16/0x1b Btrfs: orphan add 1891 Pid: 2357, comm: dbus-launch Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_setattr+0xf3/0x270 [] notify_change+0x104/0x2e0 [] do_truncate+0x5f/0x90 [] ? get_write_access+0x3c/0x60 [] do_filp_open+0x99a/0xf00 [] ? __lookup_hash+0xed/0x150 [] ? alloc_fd+0xf2/0x140 [] do_sys_open+0x64/0x140 [] ? math_state_restore+0x2c/0x50 [] sys_open+0x1b/0x20 [] system_call_fastpath+0x16/0x1b Btrfs: orphan add 3021399 Pid: 2345, comm: gnome-session Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_unlink+0xfb/0x120 [] ? inode_permission+0x70/0x90 [] vfs_unlink+0x83/0xf0 [] ? lookup_hash+0x30/0x40 [] do_unlinkat+0x183/0x1c0 [] ? __up_write+0xe5/0x150 [] sys_unlink+0x11/0x20 [] system_call_fastpath+0x16/0x1b Btrfs: orphan add 3021400 Pid: 2368, comm: gconf-sanity-ch Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_unlink+0xfb/0x120 [] ? inode_permission+0x70/0x90 [] vfs_unlink+0x83/0xf0 [] ? lookup_hash+0x30/0x40 [] do_unlinkat+0x183/0x1c0 [] ? fput+0x1d/0x30 [] ? filp_close+0x4d/0x80 [] sys_unlink+0x11/0x20 [] system_call_fastpath+0x16/0x1b CE: hpet increasing min_delta_ns to 15000 nsec Btrfs: orphan add 3021401 Pid: 2374, comm: gconfd-2 Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_unlink+0xfb/0x120 [] ? inode_permission+0x70/0x90 [] vfs_unlink+0x83/0xf0 [] ? lookup_hash+0x30/0x40 [] do_unlinkat+0x183/0x1c0 [] ? up_read+0x9/0x10 [] ? do_page_fault+0x141/0x2e0 [] sys_unlink+0x11/0x20 [] system_call_fastpath+0x16/0x1b Btrfs: orphan add 3021402 Pid: 2429, comm: gpg Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_unlink+0xfb/0x120 [] ? inode_permission+0x70/0x90 [] vfs_unlink+0x83/0xf0 [] ? lookup_hash+0x30/0x40 [] do_unlinkat+0x183/0x1c0 [] ? up_read+0x9/0x10 [] ? do_page_fault+0x141/0x2e0 [] sys_unlink+0x11/0x20 [] system_call_fastpath+0x16/0x1b Btrfs: orphan add 3021403 Pid: 2436, comm: gpg Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_unlink+0xfb/0x120 [] ? inode_permission+0x70/0x90 [] vfs_unlink+0x83/0xf0 [] ? lookup_hash+0x30/0x40 [] do_unlinkat+0x183/0x1c0 [] ? up_read+0x9/0x10 [] ? do_page_fault+0x141/0x2e0 [] sys_unlink+0x11/0x20 [] system_call_fastpath+0x16/0x1b Btrfs: orphan add 3021404 Pid: 2374, comm: gconfd-2 Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_unlink+0xfb/0x120 [] ? inode_permission+0x70/0x90 [] vfs_unlink+0x83/0xf0 [] ? lookup_hash+0x30/0x40 [] do_unlinkat+0x183/0x1c0 [] ? fput+0x1d/0x30 [] ? filp_close+0x4d/0x80 [] sys_unlink+0x11/0x20 [] system_call_fastpath+0x16/0x1b Btrfs: orphan add 3021392 Pid: 2374, comm: gconfd-2 Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_unlink+0xfb/0x120 [] ? inode_permission+0x70/0x90 [] vfs_unlink+0x83/0xf0 [] ? lookup_hash+0x30/0x40 [] do_unlinkat+0x183/0x1c0 [] ? call_rcu+0x10/0x20 [] ? __put_cred+0x37/0x50 [] ? sys_faccessat+0x19a/0x1d0 [] sys_unlink+0x11/0x20 [] system_call_fastpath+0x16/0x1b Btrfs: orphan add 3021396 Pid: 2522, comm: xauth Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_unlink+0xfb/0x120 [] ? inode_permission+0x70/0x90 [] vfs_unlink+0x83/0xf0 [] ? lookup_hash+0x30/0x40 [] do_unlinkat+0x183/0x1c0 [] ? __up_write+0xe5/0x150 [] sys_unlink+0x11/0x20 [] system_call_fastpath+0x16/0x1b Btrfs: orphan add 3021406 Pid: 2522, comm: xauth Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_unlink+0xfb/0x120 [] ? inode_permission+0x70/0x90 [] vfs_unlink+0x83/0xf0 [] ? lookup_hash+0x30/0x40 [] do_unlinkat+0x183/0x1c0 [] ? __up_write+0xe5/0x150 [] sys_unlink+0x11/0x20 [] system_call_fastpath+0x16/0x1b Btrfs: orphan add 11796 Pid: 2445, comm: nautilus Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_setattr+0xf3/0x270 [] notify_change+0x104/0x2e0 [] ? __d_lookup+0xfa/0x140 [] do_truncate+0x5f/0x90 [] ? get_write_access+0x3c/0x60 [] do_filp_open+0x99a/0xf00 [] ? pollwake+0x0/0x60 [] ? autoremove_wake_function+0x0/0x40 [] ? alloc_fd+0xf2/0x140 [] do_sys_open+0x64/0x140 [] sys_open+0x1b/0x20 [] system_call_fastpath+0x16/0x1b Btrfs: orphan add 3021266 Pid: 2374, comm: gconfd-2 Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_rename+0x4c0/0x590 [] vfs_rename+0x3da/0x420 [] sys_renameat+0x23e/0x270 [] ? _atomic_dec_and_lock+0x6b/0x90 [] ? mntput_no_expire+0x24/0xf0 [] ? sys_fchmodat+0x78/0x100 [] ? path_put+0x2c/0x40 [] sys_rename+0x16/0x20 [] system_call_fastpath+0x16/0x1b OH NO, ORPHAN ENTRY ALREADY EXISTS FOR 3021266 Btrfs: orphan add 3021267 Pid: 2374, comm: gconfd-2 Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_rename+0x4c0/0x590 [] vfs_rename+0x3da/0x420 [] sys_renameat+0x23e/0x270 [] ? _atomic_dec_and_lock+0x6b/0x90 [] ? mntput_no_expire+0x24/0xf0 [] ? sys_fchmodat+0x78/0x100 [] ? path_put+0x2c/0x40 [] sys_rename+0x16/0x20 [] system_call_fastpath+0x16/0x1b OH NO, ORPHAN ENTRY ALREADY EXISTS FOR 3021267 Btrfs: orphan add 3021268 Pid: 2374, comm: gconfd-2 Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_rename+0x4c0/0x590 [] vfs_rename+0x3da/0x420 [] sys_renameat+0x23e/0x270 [] ? _atomic_dec_and_lock+0x6b/0x90 [] ? mntput_no_expire+0x24/0xf0 [] ? sys_fchmodat+0x78/0x100 [] ? path_put+0x2c/0x40 [] sys_rename+0x16/0x20 [] system_call_fastpath+0x16/0x1b OH NO, ORPHAN ENTRY ALREADY EXISTS FOR 3021268 Btrfs: orphan add 3021269 Pid: 2374, comm: gconfd-2 Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_rename+0x4c0/0x590 [] vfs_rename+0x3da/0x420 [] sys_renameat+0x23e/0x270 [] ? _atomic_dec_and_lock+0x6b/0x90 [] ? mntput_no_expire+0x24/0xf0 [] ? sys_fchmodat+0x78/0x100 [] ? path_put+0x2c/0x40 [] sys_rename+0x16/0x20 [] system_call_fastpath+0x16/0x1b OH NO, ORPHAN ENTRY ALREADY EXISTS FOR 3021269 Btrfs: orphan add 3021271 Pid: 2502, comm: gvfsd-metadata Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_rename+0x4c0/0x590 [] vfs_rename+0x3da/0x420 [] sys_renameat+0x23e/0x270 [] ? handle_mm_fault+0x188/0x840 [] ? do_sys_open+0x103/0x140 [] sys_rename+0x16/0x20 [] system_call_fastpath+0x16/0x1b OH NO, ORPHAN ENTRY ALREADY EXISTS FOR 3021271 Btrfs: orphan add 3021272 Pid: 2502, comm: gvfsd-metadata Not tainted 2.6.33-rc2-00202-g63ebcc6-dirty #15 Call Trace: [] btrfs_orphan_add+0xcb/0xf0 [] btrfs_unlink+0xfb/0x120 [] ? inode_permission+0x70/0x90 [] vfs_unlink+0x83/0xf0 [] ? lookup_hash+0x30/0x40 [] do_unlinkat+0x183/0x1c0 [] ? up_read+0x9/0x10 [] ? do_page_fault+0x141/0x2e0 [] sys_unlink+0x11/0x20 [] system_call_fastpath+0x16/0x1b OH NO, ORPHAN ENTRY ALREADY EXISTS FOR 3021272