Re: Oops with a degraded volume
On 09/15/2012 10:17 PM, Antoine Sirinelli wrote: Hi, I have experienced a very reproducible Oops within the btrfs driver. On a linux 3.5.4, if I mount a volume with the option degraded because one of the device is missing, I would get an Oops when I unmount it (or even before). You can see attached the kernel log. Thanks for the report. And this has been fixed by commit 99f5944b8477914406173b47b4f261356286730b Btrfs: do not strdup non existent strings You can find this commit in 3.6.0-rc5. :) thanks, liubo Here is how I create my btrfs volume: # mkfs.btrfs /dev/vdb /dev/vdc # mount /dev/vdb /mnt # dd if=/dev/zero of=/mnt/zeros count=1M # umount /mnt # shutdown -h now I am then wiping one volume (/dev/vdc) and restarting the system. To get a crash, here is what I am doing: # mount -o degraded /dev/vdb /mnt # umount /mnt I recognise the volume is not usable after having erased one drive but I would expect no to crash the kernel in such circumstances. I am not an expert, I am just reporting a crash from an user point of view. Antoine -- 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: Oops with a degraded volume
On Mon, Sep 17, 2012 at 02:46:00PM +0800, Liu Bo wrote: On 09/15/2012 10:17 PM, Antoine Sirinelli wrote: I have experienced a very reproducible Oops within the btrfs driver. On a linux 3.5.4, if I mount a volume with the option degraded because one of the device is missing, I would get an Oops when I unmount it (or even before). You can see attached the kernel log. Thanks for the report. And this has been fixed by commit 99f5944b8477914406173b47b4f261356286730b Btrfs: do not strdup non existent strings You can find this commit in 3.6.0-rc5. :) That's right, I have done the same test with rc6 and it does not crash anymore. Many thanks, Antoine signature.asc Description: Digital signature
Oops with a degraded volume
Hi, I have experienced a very reproducible Oops within the btrfs driver. On a linux 3.5.4, if I mount a volume with the option degraded because one of the device is missing, I would get an Oops when I unmount it (or even before). You can see attached the kernel log. Here is how I create my btrfs volume: # mkfs.btrfs /dev/vdb /dev/vdc # mount /dev/vdb /mnt # dd if=/dev/zero of=/mnt/zeros count=1M # umount /mnt # shutdown -h now I am then wiping one volume (/dev/vdc) and restarting the system. To get a crash, here is what I am doing: # mount -o degraded /dev/vdb /mnt # umount /mnt I recognise the volume is not usable after having erased one drive but I would expect no to crash the kernel in such circumstances. I am not an expert, I am just reporting a crash from an user point of view. Antoine [ 15.171761] btrfs: error reading free space cache [ 15.171969] btrfs: failed to load free space cache for block group 29360128 [ 15.173078] btrfs: error reading free space cache [ 15.173587] btrfs: failed to load free space cache for block group 351404032 [ 15.175348] btrfs: error reading free space cache [ 15.175734] btrfs: failed to load free space cache for block group 136708096 [ 15.181790] btrfs: error reading free space cache [ 15.182240] btrfs: failed to load free space cache for block group 566099968 [ 15.189808] btrfs: error reading free space cache [ 15.190270] btrfs: failed to load free space cache for block group 780795904 [ 15.485925] BUG: unable to handle kernel NULL pointer dereference at 0010 [ 15.487131] IP: [a014018f] rcu_string_strdup.constprop.64+0xd/0x3d [btrfs] [ 15.487915] PGD 37218067 PUD 3732e067 PMD 0 [ 15.489022] Oops: [#1] SMP [ 15.489132] CPU 0 [ 15.489132] Modules linked in:[ 15.489132] netconsole configfs nfsd nfs nfs_acl auth_rpcgss fscache lockd sunrpc loop joydev hid_generic usbhid hid microcode virtio_balloon snd_pcm snd_page_alloc snd_timer processor psmouse serio_raw i2c_piix4 thermal_sys i2c_core snd soundcore pcspkr evdev button ext4 crc16 jbd2 mbcache btrfs crc32c libcrc32c zlib_deflate sg sr_mod cdrom ata_generic virtio_net virtio_blk floppy ata_piix uhci_hcd ehci_hcd libata usbcore scsi_mod virtio_pci virtio_ring virtio usb_common [last unloaded: scsi_wait_scan] [ 15.489132] Pid: 2255, comm: umount Not tainted 3.5.4 #2 Bochs Bochs [ 15.489132] RIP: 0010:[a014018f] [a014018f] rcu_string_strdup.constprop.64+0xd/0x3d [btrfs] [ 15.489132] RSP: 0018:880037213dd8 EFLAGS: 00010286 [ 15.489132] RAX: RBX: 88003747cc00 RCX: [ 15.489132] RDX: 01d8 RSI: 88003747cdd8 RDI: 0010 [ 15.489132] RBP: 880037356900 R08: 0050 R09: 0800 [ 15.489132] R10: 880037628a38 R11: 8800376289f0 R12: 0010 [ 15.489132] R13: 880037356958 R14: 880037356978 R15: 880037213f38 [ 15.489132] FS: 7fbc72b877e0() GS:88003fc0() knlGS: [ 15.489132] CS: 0010 DS: ES: CR0: 8005003b [ 15.489132] CR2: 0010 CR3: 3b8c7000 CR4: 06f0 [ 15.489132] DR0: DR1: DR2: [ 15.489132] DR3: DR6: 0ff0 DR7: 0400 [ 15.489132] Process umount (pid: 2255, threadinfo 880037212000, task 8800376289f0) [ 15.489132] Stack: [ 15.489132] 88003747cc00 880037356900 88003747ca00 a01406af [ 15.489132] 880037356900 a0168230 88003b6801e0 [ 15.489132] 88003b6801c0 a0141931 88003759e000 88003ca85400 [ 15.489132] Call Trace: [ 15.489132] [a01406af] ? __btrfs_close_devices+0xb1/0x192 [btrfs] [ 15.489132] [a0141931] ? btrfs_close_devices+0x1d/0x70 [btrfs] [ 15.489132] [a011da62] ? close_ctree+0x2a3/0x2d4 [btrfs] [ 15.489132] [81112833] ? dispose_list+0x27/0x31 [ 15.489132] [811134c7] ? evict_inodes+0xe7/0xf4 [ 15.489132] [811018f5] ? generic_shutdown_super+0x4d/0xc5 [ 15.489132] [811019d3] ? kill_anon_super+0x9/0x11 [ 15.489132] [a0100697] ? btrfs_kill_super+0xd/0x13 [btrfs] [ 15.489132] [811014a8] ? deactivate_locked_super+0x1c/0x4a [ 15.489132] [81116483] ? sys_umount+0x304/0x31f [ 15.489132] [81049a91] ? __set_current_blocked+0x2d/0x43 [ 15.489132] [81363a39] ? system_call_fastpath+0x16/0x1b [ 15.489132] Code: eb 05 bd f4 ff ff ff 48 83 c4 38 89 e8 5b 5d 41 5c 41 5d c3 be 50 80 00 00 e9 90 19 fb e0 41 54 31 c0 48 83 c9 ff 49 89 fc 55 53 f2 ae 48 89 cb 48 f7 d3 48 8d 7b 10 e8 d8 ff ff ff 48 85 c0 48 [ 15.489132] RIP [a014018f] rcu_string_strdup.constprop.64+0xd/0x3d [btrfs] [ 15.489132] RSP 880037213dd8 [ 15.489132] CR2: 0010 [ 15.545817] ---[ end trace ae1b95a7dc8c0612