kernel BUG at fs/btrfs/send.c:1482

2015-12-31 Thread Stephen R. van den Berg
I'm running 4.4.0-rc7.
This exact problem was present on 4.0.5 and 4.3.3 too though.

I do a "btrfs send /var/lib/lxc/template64/rootfs", that generates
the following error consistently at the same file, over and over again:

Dec 29 14:49:04 argo kernel: kernel BUG at fs/btrfs/send.c:1482!
Dec 29 14:49:04 argo kernel: Modules linked in: nfsd
Dec 29 14:49:04 argo kernel: task: 880041295c40 ti: 88010423c000 
task.ti: 88010423c000
Dec 29 14:49:04 argo kernel: RSP: 0018:88010423fb20  EFLAGS: 00010202
Dec 29 14:49:04 argo kernel: RDX: 0001 RSI:  RDI: 

Dec 29 14:49:04 argo kernel: R10: 88019d53b5e0 R11:  R12: 
8801b35ac510
Dec 29 14:49:04 argo kernel: FS:  7fac9113f8c0() 
GS:88022fd8() knlGS:
Dec 29 14:49:04 argo kernel: CR2: 7f99ba308520 CR3: 000154a4 CR4: 
001006e0
Dec 29 14:49:04 argo kernel: 81ed 0009b15a a1ff 

Dec 29 14:49:04 argo kernel: 0009b15a  1a03 
8801baf2e800
Dec 29 14:49:04 argo kernel: [] 
send_create_inode_if_needed+0x30/0x49
Dec 29 14:49:04 argo kernel: [] ? btrfs_item_key+0x19/0x1b
Dec 29 14:49:04 argo kernel: [] 
btrfs_compare_trees+0x2f2/0x4fe
Dec 29 14:49:04 argo kernel: [] btrfs_ioctl_send+0x846/0xce5
Dec 29 14:49:04 argo kernel: [] ? 
try_to_freeze_unsafe+0x9/0x32
Dec 29 14:49:04 argo kernel: [] ? _raw_spin_lock_irq+0xf/0x11
Dec 29 14:49:04 argo kernel: [] ? ptrace_do_notify+0x84/0x95
Dec 29 14:49:04 argo kernel: [] SyS_ioctl+0x43/0x61
Dec 29 14:49:04 argo kernel: RIP  [] 
send_create_inode+0x1ce/0x30d


On the receiving end, I have a "btrfs receive" which takes the above stream as
input, and *always* reports this:

receiving snapshot 20151230-141324.1451484804.965085668@argo 
uuid=53df0616-5715-ad40-ae81-78a023860fe0, ctransid=649684 parent_
uuid=d3f807da-1e9d-aa4d-ab01-77ce5e2fbcd7, parent_ctransid=649735
utimes 
rename bin -> o257-379784-0
mkdir o257-34888-0
rename o257-34888-0 -> bin
utimes 
chown bin - uid=0, gid=0
chmod bin - mode=0755
utimes bin
rmdir boot
ERROR: rmdir boot failed. No such file or directory
mkdir o258-34888-0
rename o258-34888-0 -> boot
utimes 
chown boot - uid=0, gid=0
chmod boot - mode=0755
utimes boot
rename dev -> o259-379784-0
mkdir o259-34888-0
rename o259-34888-0 -> dev
... rest of the logging follows as normal...
... then we get ...
rmdir media
mkdir o264-34888-0
rename o264-34888-0 -> media
utimes 
chown media - uid=0, gid=0
chmod media - mode=0755
utimes media
rmdir mnt
ERROR: rmdir mnt failed. No such file or directory
rmdir opt
mkdir o266-34888-0
rename o266-34888-0 -> opt
utimes 
... continues as normal ...

It then still creates lots of files, until it encounters the sudden EOF
due to the sending side experiencing the kernel bug and abruptly halting
the send.

Since the problem is consistently and easily reproducible, I can immediately
try any proposed patches or fixes (or provide more insight into the
subvolume this problem occurs with).
Numerous other subvolumes in the same BTRFS partition work flawlessly
using btrfs send/receive.

The sending partition is RAID0 with two 512GB SSD drives.  The receiving
partition is RAID1 with 6 6TB HDD drives.
-- 
Stephen.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kernel BUG at fs/btrfs/send.c:1482

2015-12-31 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote:
>I'm running 4.4.0-rc7.
>This exact problem was present on 4.0.5 and 4.3.3 too though.

>I do a "btrfs send /var/lib/lxc/template64/rootfs", that generates
>the following error consistently at the same file, over and over again:

>Dec 29 14:49:04 argo kernel: kernel BUG at fs/btrfs/send.c:1482!

Ok, found part of the solution.
The kernel bug was being triggered by symbolic links in that
subvolume that have an empty target.  It is unknown how
these ever ended up on that partition.

The partitions have been created using regular btrfs.
The only strange thing that might have happened, is that I ran duperemove
over those partitions afterward.
-- 
Stephen.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html