Return-Path: Received: from frost.carfax.org.uk ([85.119.82.111]:39195 "EHLO frost.carfax.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752300AbdCMJSw (ORCPT ); Mon, 13 Mar 2017 05:18:52 -0400 Date: Mon, 13 Mar 2017 09:18:49 +0000 From: Hugo Mills To: Qu Wenruo Cc: Btrfs mailing list Subject: Re: Oops in btrfs_recover_relocation, kernel 4.8.1 Message-ID: <20170313091849.GE11714@carfax.org.uk> References: <20170310122337.GQ29429@carfax.org.uk> <8fb44084-87e6-2970-447f-776b17bce254@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zaRBsRFn0XYhEU69" In-Reply-To: <8fb44084-87e6-2970-447f-776b17bce254@cn.fujitsu.com> Sender: linux-btrfs-owner@vger.kernel.org List-ID: --zaRBsRFn0XYhEU69 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 13, 2017 at 10:22:04AM +0800, Qu Wenruo wrote: > > > At 03/10/2017 08:23 PM, Hugo Mills wrote: > > Does anyone recall seeing this oops before? Is it something that > >can be fixed with a newer kernel? (I'm on a USB stick for this, so a > >new kernel is a major undertaking, and I'd like some reasonable > >expectation of success if I do it). > > Yes, v4.10 has the fix for the bug. > > > > Background: I'm rebuilding a dead server. I needed to reduce the > >device count on this FS to 6. Stupidly, I attached one device using an > >external USB case, and the USB connection reset during the device > >delete (within a few seconds). I can mount the FS -o ro,recovery, but > >using -o recovery on its own causes the oops below. If I can recover > >in-place, that would save me a *lot* of time in restoring backups. > > > > Also... qgroups, WTH? I've *never* enabled qgroups on this FS. > > Did you use any auto-backup system? Yes -- my own, which doesn't enable qgroups. > Quite a lot of them will enable qgroup. > > Anyway, after mounting with v4.10 kernel, you can easily find out if > qgroup is enabled. They aren't: hrm@amelia:/media $ sudo btrfs qgroup show /media/btrfs/amelia/ ERROR: can't perform the search - No such file or directory ERROR: can't list qgroups: No such file or directory Anyway, it's all working now with a 4.10 kernel. Thanks for the reply. Hugo. > Thanks, > Qu > > > > > For what it's worth, the FS passes btrfs check --readonly with no > >errors reported. (btrfs --version is 4.7.3). > > > > Hugo. > > > >[ 566.852589] BTRFS warning (device sdh1): 'recovery' is deprecated, use 'usebackuproot' instead > >[ 566.852591] BTRFS info (device sdh1): trying to use backup root at mount time > >[ 566.852592] BTRFS info (device sdh1): disk space caching is enabled > >[ 566.922803] BTRFS info (device sdh1): bdev /dev/sdh1 errs: wr 0, rd 20, flush 0, corrupt 0, gen 0 > >[ 578.715616] BUG: unable to handle kernel paging request at fffffffffffffe50 > >[ 578.715619] IP: [] qgroup_fix_relocated_data_extents+0x2b/0x2c0 [btrfs] > >[ 578.715638] PGD 2f400f067 PUD 2f4011067 PMD 0 > >[ 578.715640] Oops: 0000 [#1] > >[ 578.715642] Modules linked in: cpufreq_userspace(E) cpufreq_powersave(E) cpufreq_conservative(E) kvm_amd(E) kvm(E) irqbypass(E) crc32_pclmul(E) efi_pstore(E) ghash_clmulni_intel(E) pcspkr(E) serio_raw(E) efivars(E) fam15h_power(E) k10temp(E) btrfs(E) acpi_cpufreq(E) tpm_tis(E) tpm_tis_core(E) tpm(E) sp5100_tco(E) sg(E) snd_hda_codec_realtek(E) snd_hda_codec_hdmi(E) snd_hda_codec_generic(E) snd_hda_intel(E) 9p(E) snd_hda_codec(E) 9pnet(E) snd_hda_core(E) fscache(E) snd_hwdep(E) snd_pcm(E) snd_timer(E) snd(E) soundcore(E) shpchp(E) ib_iser(E) rdma_cm(E) iw_cm(E) ib_cm(E) ib_core(E) configfs(E) iscsi_tcp(E) libiscsi_tcp(E) libiscsi(E) scsi_transport_iscsi(E) fuse(E) evdev(E) aoe(E) efivarfs(E) ip_tables(E) x_tables(E) autofs4(E) loop(E) overlay(E) nls_utf8(E) isofs(E) raid10(E) raid456(E) async_raid6_recov(E) > >[ 578.715663] async_memcpy(E) async_pq(E) async_xor(E) async_tx(E) xor(E) raid6_pq(E) libcrc32c(E) crc32c_generic(E) raid0(E) multipath(E) linear(E) dm_mirror(E) dm_region_hash(E) dm_log(E) dm_mod(E) raid1(E) md_mod(E) sd_mod(E) hid_generic(E) usbhid(E) hid(E) uas(E) usb_storage(E) crc32c_intel(E) aesni_intel(E) aes_x86_64(E) glue_helper(E) lrw(E) gf128mul(E) ablk_helper(E) cryptd(E) ohci_pci(E) ahci(E) libahci(E) sata_sil24(E) i2c_piix4(E) r8169(E) mii(E) ehci_pci(E) ohci_hcd(E) ehci_hcd(E) libata(E) scsi_mod(E) radeon(E) i2c_algo_bit(E) drm_kms_helper(E) xhci_pci(E) xhci_hcd(E) usbcore(E) usb_common(E) ttm(E) drm(E) button(E) > >[ 578.715684] CPU: 0 PID: 3532 Comm: mount Tainted: G E 4.8.0-1-grml-amd64 #1 Debian 4.8.15-1+grml.1 > >[ 578.715684] Hardware name: Gigabyte Technology Co., Ltd. To be filled by O.E.M./970A-DS3P, BIOS FD 02/26/2016 > >[ 578.715686] task: ffff8fd7ead82fc0 task.stack: ffff8fd7db15c000 > >[ 578.715687] RIP: 0010:[] [] qgroup_fix_relocated_data_extents+0x2b/0x2c0 [btrfs] > >[ 578.715699] RSP: 0018:ffff8fd7db15fa08 EFLAGS: 00010246 > >[ 578.715700] RAX: ffff8fd7db133800 RBX: ffff8fd7e30c79a0 RCX: 0000000000000000 > >[ 578.715701] RDX: ffff8fd7ddb5cd10 RSI: ffff8fd7dc6b5000 RDI: ffff8fd7ddb5cc80 > >[ 578.715701] RBP: ffff8fd7e7445000 R08: 0000000000000000 R09: ffff8fd7ddb5cc80 > >[ 578.715702] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8fd7db15faa0 > >[ 578.715703] R13: ffff8fd7dc6b5000 R14: 0000000000000000 R15: ffff8fd7ddb5cc80 > >[ 578.715704] FS: 00007f23cd67f480(0000) GS:ffffffffbca35000(0000) knlGS:0000000000000000 > >[ 578.715705] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > >[ 578.715706] CR2: fffffffffffffe50 CR3: 000000042302f000 CR4: 00000000000406b0 > >[ 578.715707] Stack: > >[ 578.715707] 0000000000000000 0000000000000801 ffff8fd7ddb5cc80 0000000000000801 > >[ 578.715710] ffff8fd7ddb5cc80 ffffffffc0a24c44 0000000000000000 0000000000000000 > >[ 578.715711] ffff8f00db15fa40 0000000036d3c76a ffff8fd7e30c79a0 ffff8fd7e7445000 > >[ 578.715713] Call Trace: > >[ 578.715726] [] ? start_transaction+0x94/0x4c0 [btrfs] > >[ 578.715738] [] ? btrfs_recover_relocation+0x2e8/0x420 [btrfs] > >[ 578.715750] [] ? open_ctree+0x2158/0x2680 [btrfs] > >[ 578.715752] [] ? snprintf+0x49/0x60 > >[ 578.715762] [] ? btrfs_mount+0xd26/0xe70 [btrfs] > >[ 578.715765] [] ? lookup_fast+0x52/0x300 > >[ 578.715767] [] ? mount_fs+0x36/0x170 > >[ 578.715770] [] ? kstrdup+0x45/0x50 > >[ 578.715772] [] ? vfs_kern_mount+0x5f/0x100 > >[ 578.715781] [] ? btrfs_mount+0x1bc/0xe70 [btrfs] > >[ 578.715784] [] ? ida_get_new_above+0x1e4/0x210 > >[ 578.715786] [] ? mount_fs+0x36/0x170 > >[ 578.715788] [] ? kstrdup+0x45/0x50 > >[ 578.715790] [] ? vfs_kern_mount+0x5f/0x100 > >[ 578.715791] [] ? __get_fs_type+0x1c/0x30 > >[ 578.715793] [] ? do_mount+0x1dc/0xbb0 > >[ 578.715794] [] ? SyS_mount+0x84/0xc0 > >[ 578.715797] [] ? entry_SYSCALL_64_fastpath+0x1a/0xa4 > >[ 578.715798] Code: 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 48 83 ec 50 4c 8b 76 10 65 48 8b 04 25 28 00 00 00 48 89 44 24 48 31 c0 48 8b 46 08 <49> 8b ae 50 fe ff ff 48 8b 98 f0 01 00 00 31 c0 f6 83 78 0a 00 > >[ 578.715816] RIP [] qgroup_fix_relocated_data_extents+0x2b/0x2c0 [btrfs] > >[ 578.715828] RSP > >[ 578.715828] CR2: fffffffffffffe50 > >[ 578.715830] ---[ end trace 3153f530aca9e6aa ]--- > > > > -- Hugo Mills | O tempura! O moresushi! hugo@... carfax.org.uk | http://carfax.org.uk/ | PGP: E2AB1DE4 | --zaRBsRFn0XYhEU69 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJYxmP4AAoJEFheFHXiqx3kVVIP/RZ7XS/BJSpDcKB1FbGab/pn 05wJJ8eKtv9l4jWft0NTrl+sOGJRaa1C3IG3oIawOucSRWhp719NvXSMLfMjqNFQ kjKpjH2QbKZwhw6Ath+eYmPwSgyrcZoF4vpU0KVponRQVqiLb9VRoGXcNzckxr5J rdy/KXErnrPtvuW/xLPJJbelK6v4JLp0U4YAfJp2GT+finRW9oDCEtc6ptIK8a8Q sS6/O4BxYv0lDBKWgb9OnLFdOggh796DahFoboG/LLQ0CW/ic6lAVWl9Bd55VHWe +JedL24pSewviESh/RuE9jg4ly0vFa/xlUJmHxdRwHHU8kdRUTmb0inTu7RBj/sB K8zUck8aST4XfF4uSkcdnyMehtLX7TK+W/jz+xNE0W7jHs6yFsoW4mhXQxhVMjDo WImmbW7Eg9QwnAWOk4ay9+GHNpNQLQEZ4rkOYEV3lcivRTY+o0w/NyYy5n16ZLdK NP83OsXSi36lpERxLHG5nO5pXbf2IHVGdSFWOs8XFFU5HXSVXXReMtn2ts0/X+Vd xCAJM3Qyo/h43tcqbVKlLrXN9qZythV/sORiFbU7lhbgITnFBkogU+FhdeKonQTp QbMTMIdnWJ/WepgzS+sdOWnqmhiYt+p4+yOsQz6LAOcAxla/gIuESrDenaCjykdO 3d1+nI2olPasH6r2QGqZ =KJcP -----END PGP SIGNATURE----- --zaRBsRFn0XYhEU69--