kernel bug at fs/btrfs/extent-tree.c (invalid opcode)

Till Hofmann
2013-05-04T11:57:11Z

Hello,

I have a broken btrfs file system and as far as I know, you''re
interested in bug reports since btrfs is still in development. If not,
let me know.

First, basic system information:
OS: Arch Linux
Kernel: 3.8.11
System layout:
/ btrfs
/boot ext2
/home btrfs on LUKS

subvolumes of /:

btrfs subvolume list -a /
ID 256 gen 2629 top level 5 path <FS_TREE>/__active
ID 282 gen 2626 top level 5 path <FS_TREE>/__active/__backup
ID 285 gen 5494 top level 5 path <FS_TREE>/__active/__restore

I upgraded my system and installed linux 3.8.11 last week. Before the
upgrade, I took a snapshot of / to be able to roll back. After
upgrading, my system wouldn''t reboot. I booted a live system, copied
my ro snapshot to a new subvolume and set it as default. I upgraded
again, which seemed to work fine. After booting an LTS kernel (3.0.75)
the system wouldn''t boot anymore. So basically, I have two broken
snapshots with different errors:

The original snapshot (__active) doesn''t mount anymore, neither during
boot nor from a live system. I can mount it ro though. I get the
following error when I mount with -o recovery,rw:
[  233.836936] kernel BUG at fs/btrfs/extent-tree.c:5234!
[  233.837834] invalid opcode: 0000 [#1] PREEMPT SMP
...
[  233.882508] BUG: scheduling while atomic: ls/608/0x10000003

(Full dmesg see attachment
dmesg.mount-with-recovery,rw,subvolid=5)


When I boot (and mount #285) I get the following error:
RIP: __write_lock_failed+0xd0x20
(note that I only have a screenshot because the system freezes). If I
mount from a live system, I don''t get any errors.

The bug seems somewhat reproducible because it happened twice after
uprading to 3.8.11.

I hope this bug report is helpful in a way, please let me know if you
need additional information. If not, I will play back a backup of the
partition, so I''m not too worried about data recovery. Any hints are
still appreciated.

Greetings