From patchwork Wed Jan 25 15:43:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 9537319 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2A2B76042B for ; Wed, 25 Jan 2017 15:43:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1155D27DF9 for ; Wed, 25 Jan 2017 15:43:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03CE427FA6; Wed, 25 Jan 2017 15:43:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C04527DF9 for ; Wed, 25 Jan 2017 15:43:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750959AbdAYPnn (ORCPT ); Wed, 25 Jan 2017 10:43:43 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:43564 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbdAYPnk (ORCPT ); Wed, 25 Jan 2017 10:43:40 -0500 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v0PFhVM0029885 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Jan 2017 15:43:31 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v0PFhUck021605 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Jan 2017 15:43:30 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v0PFhUXU026395; Wed, 25 Jan 2017 15:43:30 GMT Received: from dhcp-amer-vpn-adc-anyconnect-10-154-187-238.vpn.oracle.com (/50.150.81.217) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 25 Jan 2017 07:43:29 -0800 Date: Wed, 25 Jan 2017 07:43:25 -0800 From: Liu Bo To: Marc Kleine-Budde Cc: linux-btrfs@vger.kernel.org Subject: Re: NULL pointer dereference in btrfs_async_reclaim_metadata_space Message-ID: <20170125154325.GA13419@dhcp-amer-vpn-adc-anyconnect-10-154-187-238.vpn.oracle.com> Reply-To: bo.li.liu@oracle.com References: <29d12d8d-30f6-f0d4-847e-d11edf7aa9f5@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <29d12d8d-30f6-f0d4-847e-d11edf7aa9f5@pengutronix.de> User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Jan 25, 2017 at 10:31:32AM +0100, Marc Kleine-Budde wrote: > Hello, > > I'm using debian's latest 4.9 Kernel on a 32bit armhf SMP board. The > filesystem is in raid1 mode using two harddrives. After the system > crashed (for yet unknown reason) the mounting of the raid1 failed > with the following backtrace: Since this was happening at mount stage, it seems like our fs_root is not set up yet, could you please try this debugging one? Thanks, -liubo > > [ 31.163013] BTRFS info (device sda): The free space cache file (1692078702592) is invalid. skip it > [ 31.163013] > [ 36.257271] Unable to handle kernel NULL pointer dereference at virtual address 000001dc > [ 36.265421] pgd = c0004000 > [ 36.268131] [000001dc] *pgd=00000000 > [ 36.271778] Internal error: Oops: 5 [#1] SMP ARM > [ 36.276393] Modules linked in: arc4 ath9k_htc ath9k_common ath9k_hw rt2800usb rt2x00usb rt2800lib ath rt2x00lib mac80211 cfg80211 crc_ccitt rfkill usbhid hid mcs7830 usbnet mii evdev ext4 sun4i_codec crc16 jbd2 fscrypto ecb mbcache snd_soc_core snd_pcm_dmaengine snd_pcm axp20x_usb_power snd_timer axp20x_pek ir_lirc_codec lirc_dev snd soundcore sunxi_cir sun4i_ts nvmem_sunxi_sid nvmem_core sunxi_wdt sg spi_sun4i sun4i_ss des_generic leds_gpio cpufreq_dt ip_tables x_tables autofs4 btrfs crc32c_generic xor zlib_deflate raid6_pq sd_mod axp20x_regulator realtek ahci_sunxi libahci_platform libahci sunxi ohci_platform phy_generic libata dwmac_sunxi stmmac_platform ohci_hcd musb_hdrc ehci_platform stmmac udc_core ehci_hcd i2c_mv64xxx scsi_mod usbcore phy_sun4i_usb extcon_core sunxi_mmc usb_common > [ 36.347114] CPU: 1 PID: 6 Comm: kworker/u4:0 Not tainted 4.9.0-1-armmp #1 Debian 4.9.2-2 > [ 36.355193] Hardware name: Allwinner sun7i (A20) Family > [ 36.360747] Workqueue: events_unbound btrfs_async_reclaim_metadata_space [btrfs] > [ 36.368149] task: ee8ac0c0 task.stack: ee8ec000 > [ 36.372830] PC is at can_overcommit.part.7+0x18/0x174 [btrfs] > [ 36.378695] LR is at btrfs_async_reclaim_metadata_space+0x4e4/0x884 [btrfs] > [ 36.385649] pc : [] lr : [] psr: 80070013 > [ 36.385649] sp : ee8ede10 ip : ee8ede50 fp : ee8ede4c > [ 36.397111] r10: c9bf6800 r9 : 00000000 r8 : c9bf6890 > [ 36.402328] r7 : 00000000 r6 : c9bf6898 r5 : 00000000 r4 : 00000004 > [ 36.408847] r3 : 00000000 r2 : 00200000 r1 : c9bf6800 r0 : 00000000 > [ 36.415367] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none > [ 36.422492] Control: 10c5387d Table: 49e4406a DAC: 00000051 > [ 36.428232] Process kworker/u4:0 (pid: 6, stack limit = 0xee8ec220) > [ 36.434490] Stack: (0xee8ede10 to 0xee8ee000) > [ 36.438845] de00: ee8ede94 ee8ede20 c0191798 c01c707c > [ 36.447014] de20: 00000000 00000004 00000000 c9bf6898 00000000 c9bf6890 00000000 c9bf6800 > [ 36.455184] de40: ee8eded4 ee8ede50 bf3adf20 bf3a11c8 00000002 c0114780 ee956018 ee8ac0c0 > [ 36.463353] de60: 00000000 ee8f7880 ee8ac0c0 ee8f7880 ef6d5140 00000000 eeb3c1c0 ee8ac0c0 > [ 36.471522] de80: c0bfa140 c0c05408 ee8edefc c9c23ac4 c07f3e5c c01787b8 00000000 00000000 > [ 36.479692] dea0: 00000000 c0168f68 ee8eded4 c9c23ac4 ee89e400 ee8a9800 00000000 ee8ad700 > [ 36.487861] dec0: c0ce3334 ee8ad705 ee8edf14 ee8eded8 c0169170 bf3ada48 ee8a9800 00000088 > [ 36.496030] dee0: c0c03d00 00000000 ee8ec000 ee8a9800 ee89e418 00000088 c0c03d00 ee8a9818 > [ 36.504200] df00: ee8ec000 ee89e400 ee8edf5c ee8edf18 c0169ff8 c0168fec ee8edf3c c0934934 > [ 36.512369] df20: 00000000 ee8a9990 ee8ec000 c0c4614e 00000000 00000000 ee8a8d40 ee89e400 > [ 36.520538] df40: c0169f98 00000000 00000000 00000000 ee8edfac ee8edf60 c016f94c c0169fa4 > [ 36.528707] df60: 00000000 ee8a8d40 ee89e400 00000000 00000000 ee8edf74 ee8edf74 00000000 > [ 36.536877] df80: 00000000 ee8edf84 ee8edf84 00040902 ee8a8d40 c016f850 00000000 00000000 > [ 36.545045] dfa0: 00000000 ee8edfb0 c010a2f8 c016f85c 00000000 00000000 00000000 00000000 > [ 36.553214] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > [ 36.561383] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 19238001 83218006 > [ 36.569857] [] (can_overcommit.part.7 [btrfs]) from [] (btrfs_async_reclaim_metadata_space+0x4e4/0x884 [btrfs]) > [ 36.581811] [] (btrfs_async_reclaim_metadata_space [btrfs]) from [] (process_one_work+0x190/0x49c) > [ 36.592507] [] (process_one_work) from [] (worker_thread+0x60/0x538) > [ 36.600596] [] (worker_thread) from [] (kthread+0xfc/0x114) > [ 36.607907] [] (kthread) from [] (ret_from_fork+0x14/0x3c) > [ 36.615126] Code: e24cb004 e24dd014 e52de004 e8bd4000 (e59061dc) > [ 36.621363] ---[ end trace 692c04410689c7f2 ]--- > [ 36.639082] Unable to handle kernel paging request at virtual address ffffffec > [ 36.646317] pgd = c0004000 > [ 36.649023] [ffffffec] *pgd=6fffd861, *pte=00000000, *ppte=00000000 > [ 36.655332] Internal error: Oops: 37 [#2] SMP ARM > [ 36.660033] Modules linked in: arc4 ath9k_htc ath9k_common ath9k_hw rt2800usb rt2x00usb rt2800lib ath rt2x00lib mac80211 cfg80211 crc_ccitt rfkill usbhid hid mcs7830 usbnet mii evdev ext4 sun4i_codec crc16 jbd2 fscrypto ecb mbcache snd_soc_core snd_pcm_dmaengine snd_pcm axp20x_usb_power snd_timer axp20x_pek ir_lirc_codec lirc_dev snd soundcore sunxi_cir sun4i_ts nvmem_sunxi_sid nvmem_core sunxi_wdt sg spi_sun4i sun4i_ss des_generic leds_gpio cpufreq_dt ip_tables x_tables autofs4 btrfs crc32c_generic xor zlib_deflate raid6_pq sd_mod axp20x_regulator realtek ahci_sunxi libahci_platform libahci sunxi ohci_platform phy_generic libata dwmac_sunxi stmmac_platform ohci_hcd musb_hdrc ehci_platform stmmac udc_core ehci_hcd i2c_mv64xxx scsi_mod usbcore phy_sun4i_usb extcon_core sunxi_mmc usb_common > [ 36.730749] CPU: 1 PID: 6 Comm: kworker/u4:0 Tainted: G D 4.9.0-1-armmp #1 Debian 4.9.2-2 > [ 36.740040] Hardware name: Allwinner sun7i (A20) Family > [ 36.745269] task: ee8ac0c0 task.stack: ee8ec000 > [ 36.749810] PC is at kthread_data+0x18/0x20 > [ 36.753991] LR is at wq_worker_sleeping+0x18/0xe0 > [ 36.758692] pc : [] lr : [] psr: 20070093 > [ 36.758692] sp : ee8edb08 ip : ee8edb18 fp : ee8edb14 > [ 36.770153] r10: c0c05408 r9 : c0bfa140 r8 : ee8ac0c0 > [ 36.775371] r7 : 00000000 r6 : ee8ac4ec r5 : ef6d5140 r4 : c0bfa140 > [ 36.781889] r3 : 00000000 r2 : 00000020 r1 : 00000000 r0 : ee8ac0c0 > [ 36.788409] Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none > [ 36.795620] Control: 10c5387d Table: 49a4c06a DAC: 00000051 > [ 36.801359] Process kworker/u4:0 (pid: 6, stack limit = 0xee8ec220) > [ 36.807617] Stack: (0xee8edb08 to 0xee8ee000) > [ 36.811973] db00: ee8edb2c ee8edb18 c016a578 c01705f0 c0bfa140 ef6d5140 > [ 36.820143] db20: ee8edb94 ee8edb30 c07f40a4 c016a56c eef60880 eef6088c 60070013 c03e3ef0 > [ 36.828312] db40: ee8edb6c ee8edb50 2eadb000 c017e120 c0cf5100 eef60880 ef6d5140 60070013 > [ 36.836482] db60: ee8edb8c ee8edb70 c03e4268 ee8ac0c0 ee8edbbc ee8ed7fc ee8edbbc ee8ed7fc > [ 36.844651] db80: 00000000 c0c0a10c ee8edba4 ee8edb98 c017e120 c07f3b24 ee8edbdc ee8edba8 > [ 36.852821] dba0: c01525c8 c017e094 c0cf1ca0 ee8eddc0 0000000b 00000001 bf3a11d6 ee8edbbc > [ 36.860991] dbc0: ee8edbbc 00040902 c014caf4 00000001 ee8edc74 ee8edbe0 c010f7d0 c0151e64 > [ 36.869160] dbe0: ee8ec220 0000000b c091ee08 c091ee00 00000008 bf000000 ee8ec000 00000000 > [ 36.877330] dc00: 60070113 bf3a11d8 c01b2a04 651b22c4 62633432 20343030 64343265 34313064 > [ 36.885500] dc20: 32356520 30306564 38652034 30346462 28203030 30393565 63643136 ee002029 > [ 36.893669] dc40: c011e11c 00040902 c0921514 000001dc ee8eddc0 00000005 00000000 00000000 > [ 36.901839] dc60: ee8ec000 c9bf6800 ee8edc8c ee8edc78 c0123850 c010f328 ee8eddc0 000001dc > [ 36.910009] dc80: ee8edce4 ee8edc90 c07f98ac c01237e8 00000010 ee8edca0 c0408a8c c0d33320 > [ 36.918179] dca0: eeeaa228 ee8edd0c ee8edd10 0000000e 00000000 eeeaa260 ee8edcec 00000005 > [ 36.926349] dcc0: 00000005 c0c0aba4 000001dc ee8eddc0 ee8ec000 c9bf6800 ee8edd04 ee8edce8 > [ 36.934519] dce0: c07f9b4c c07f96bc c0c0414c 00000005 c0c0aba4 000001dc ee8eddbc ee8edd08 > [ 36.942689] dd00: c010128c c07f9a9c c0183948 c0188f9c ee8ac140 c0cf5100 ef6d5178 00000001 > [ 36.950859] dd20: ee8eddc4 ee8edd30 c0188f9c c018743c 00000000 c01c8524 ee8edd74 ee8edd48 > [ 36.959028] dd40: c01c8524 c01c84b0 ef6d1500 eeeaa270 ee8edd74 ee8edd60 ee8ac140 c01c8408 > [ 36.967197] dd60: eeeaa270 00000400 00000000 ee8edd78 00000000 00000001 637cfae5 00000008 > [ 36.975367] dd80: 0000004b 00000000 40070093 00040902 ee8ede3c 00040902 bf3a11d4 80070013 > [ 36.983537] dda0: ffffffff ee8eddf4 c9bf6890 ee8ec000 ee8ede4c ee8eddc0 c07f8db8 c010123c > [ 36.991707] ddc0: 00000000 c9bf6800 00200000 00000000 00000004 00000000 c9bf6898 00000000 > [ 36.999877] dde0: c9bf6890 00000000 c9bf6800 ee8ede4c ee8ede50 ee8ede10 bf3adf20 bf3a11d4 > [ 37.008046] de00: 80070013 ffffffff 00000051 00000000 ee8ede94 ee8ede20 c0191798 c01c707c > [ 37.016215] de20: 00000000 00000004 00000000 c9bf6898 00000000 c9bf6890 00000000 c9bf6800 > [ 37.024385] de40: ee8eded4 ee8ede50 bf3adf20 bf3a11c8 00000002 c0114780 ee956018 ee8ac0c0 > [ 37.032555] de60: 00000000 ee8f7880 ee8ac0c0 ee8f7880 ef6d5140 00000000 eeb3c1c0 ee8ac0c0 > [ 37.040724] de80: c0bfa140 c0c05408 ee8edefc c9c23ac4 c07f3e5c c01787b8 00000000 00000000 > [ 37.048894] dea0: 00000000 c0168f68 ee8eded4 c9c23ac4 ee89e400 ee8a9800 00000000 ee8ad700 > [ 37.057064] dec0: c0ce3334 ee8ad705 ee8edf14 ee8eded8 c0169170 bf3ada48 ee8a9800 00000088 > [ 37.065234] dee0: c0c03d00 00000000 ee8ec000 ee8a9800 ee89e418 00000088 c0c03d00 ee8a9818 > [ 37.073403] df00: ee8ec000 ee89e400 ee8edf5c ee8edf18 c0169ff8 c0168fec ee8edf3c c0934934 > [ 37.081573] df20: 00000000 ee8a9990 ee8ec000 c0c4614e 00000000 00000000 ee8a8d40 ee89e400 > [ 37.089743] df40: c0169f98 00000000 00000000 00000000 ee8edfac ee8edf60 c016f94c c0169fa4 > [ 37.097913] df60: 00000000 ee8a8d40 ee89e400 00000000 00000000 ee8edf74 ee8edf74 00000001 > [ 37.106082] df80: 00010001 ee8edf84 ee8edf84 00040902 ee8a8d40 c016f850 00000000 00000000 > [ 37.114252] dfa0: 00000000 ee8edfb0 c010a2f8 c016f85c 00000000 00000000 00000000 00000000 > [ 37.122420] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > [ 37.130590] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 19238001 83218006 > [ 37.138778] [] (kthread_data) from [] (wq_worker_sleeping+0x18/0xe0) > [ 37.146864] [] (wq_worker_sleeping) from [] (__schedule+0x58c/0x8a8) > [ 37.154955] [] (__schedule) from [] (do_task_dead+0x98/0x9c) > [ 37.162351] [] (do_task_dead) from [] (do_exit+0x770/0xadc) > [ 37.169660] [] (do_exit) from [] (die+0x4b4/0x4d4) > [ 37.176190] [] (die) from [] (__do_kernel_fault.part.0+0x74/0x1f4) > [ 37.184106] [] (__do_kernel_fault.part.0) from [] (do_page_fault+0x1fc/0x3e0) > [ 37.192973] [] (do_page_fault) from [] (do_translation_fault+0xbc/0xc0) > [ 37.201320] [] (do_translation_fault) from [] (do_DataAbort+0x5c/0xec) > [ 37.209582] [] (do_DataAbort) from [] (__dabt_svc+0x58/0x80) > [ 37.216967] Exception stack(0xee8eddc0 to 0xee8ede08) > [ 37.222016] ddc0: 00000000 c9bf6800 00200000 00000000 00000004 00000000 c9bf6898 00000000 > [ 37.230185] dde0: c9bf6890 00000000 c9bf6800 ee8ede4c ee8ede50 ee8ede10 bf3adf20 bf3a11d4 > [ 37.238350] de00: 80070013 ffffffff > [ 37.242167] [] (__dabt_svc) from [] (can_overcommit.part.7+0x18/0x174 [btrfs]) > [ 37.251414] [] (can_overcommit.part.7 [btrfs]) from [] (btrfs_async_reclaim_metadata_space+0x4e4/0x884 [btrfs]) > [ 37.263364] [] (btrfs_async_reclaim_metadata_space [btrfs]) from [] (process_one_work+0x190/0x49c) > [ 37.274054] [] (process_one_work) from [] (worker_thread+0x60/0x538) > [ 37.282143] [] (worker_thread) from [] (kthread+0xfc/0x114) > [ 37.289454] [] (kthread) from [] (ret_from_fork+0x14/0x3c) > [ 37.296674] Code: e24cb004 e52de004 e8bd4000 e59033fc (e5130014) > [ 37.302765] ---[ end trace 692c04410689c7f3 ]--- > [ 37.307379] Fixing recursive fault but reboot is needed! > [ 57.628778] INFO: rcu_sched self-detected stall on CPU > [ 57.633944] 0-...: (4199 ticks this GP) idle=d75/140000000000001/0 softirq=4233/4233 fqs=1 > [ 57.642369] (t=4200 jiffies g=1102 c=1101 q=133) > [ 57.647171] rcu_sched kthread starved for 4198 jiffies! g1102 c1101 f0x0 RCU_GP_WAIT_FQS(3) ->state=0x1 > [ 57.656550] rcu_sched S 0 7 2 0x00000000 > [ 57.662062] [] (__schedule) from [] (schedule+0x50/0xa8) > [ 57.669111] [] (schedule) from [] (schedule_timeout+0x1f8/0x3c0) > [ 57.676856] [] (schedule_timeout) from [] (rcu_gp_kthread+0x574/0x908) > [ 57.685118] [] (rcu_gp_kthread) from [] (kthread+0xfc/0x114) > [ 57.692513] [] (kthread) from [] (ret_from_fork+0x14/0x3c) > [ 57.699735] Task dump for CPU 0: > [ 57.702959] mount R running task 0 307 1 0x00000002 > [ 57.710038] [] (unwind_backtrace) from [] (show_stack+0x20/0x24) > [ 57.717778] [] (show_stack) from [] (sched_show_task+0xb8/0x10c) > [ 57.725519] [] (sched_show_task) from [] (dump_cpu_task+0x48/0x4c) > [ 57.733435] [] (dump_cpu_task) from [] (rcu_dump_cpu_stacks+0xb8/0xd4) > [ 57.741697] [] (rcu_dump_cpu_stacks) from [] (rcu_check_callbacks+0x82c/0x990) > [ 57.750652] [] (rcu_check_callbacks) from [] (update_process_times+0x44/0x6c) > [ 57.759523] [] (update_process_times) from [] (tick_sched_handle+0x64/0x70) > [ 57.768217] [] (tick_sched_handle) from [] (tick_sched_timer+0x68/0xbc) > [ 57.776564] [] (tick_sched_timer) from [] (__hrtimer_run_queues+0x1b4/0x394) > [ 57.785344] [] (__hrtimer_run_queues) from [] (hrtimer_interrupt+0xd4/0x240) > [ 57.794126] [] (hrtimer_interrupt) from [] (arch_timer_handler_phys+0x40/0x48) > [ 57.803084] [] (arch_timer_handler_phys) from [] (handle_percpu_devid_irq+0x98/0x24c) > [ 57.812648] [] (handle_percpu_devid_irq) from [] (generic_handle_irq+0x34/0x44) > [ 57.821688] [] (generic_handle_irq) from [] (__handle_domain_irq+0x6c/0xc4) > [ 57.830380] [] (__handle_domain_irq) from [] (gic_handle_irq+0x64/0xa8) > [ 57.838728] [] (gic_handle_irq) from [] (__irq_svc+0x6c/0x90) > [ 57.846200] Exception stack(0xed99f8e8 to 0xed99f930) > [ 57.851250] f8e0: c9bf6800 00000000 00000392 00000391 c9bf6800 c9c23110 > [ 57.859420] f900: 00080000 00000000 00080000 00000000 c0c0414c ed99f944 ed99f948 ed99f938 > [ 57.867586] f920: bf3ae304 c07f86c0 800e0013 ffffffff > [ 57.872641] [] (__irq_svc) from [] (_raw_spin_lock+0x40/0x54) > [ 57.880312] [] (_raw_spin_lock) from [] (reserve_metadata_bytes+0x44/0x1138 [btrfs]) > [ 57.890044] [] (reserve_metadata_bytes [btrfs]) from [] (btrfs_block_rsv_add.part.11+0x30/0x5c [btrfs]) > [ 57.901404] [] (btrfs_block_rsv_add.part.11 [btrfs]) from [] (btrfs_block_rsv_add+0x30/0x38 [btrfs]) > [ 57.912501] [] (btrfs_block_rsv_add [btrfs]) from [] (start_transaction+0x308/0x4d0 [btrfs]) > [ 57.922906] [] (start_transaction [btrfs]) from [] (btrfs_start_transaction+0x20/0x24 [btrfs]) > [ 57.933482] [] (btrfs_start_transaction [btrfs]) from [] (btrfs_truncate+0x90/0x2b4 [btrfs]) > [ 57.943886] [] (btrfs_truncate [btrfs]) from [] (btrfs_orphan_cleanup+0x2d0/0x644 [btrfs]) > [ 57.954114] [] (btrfs_orphan_cleanup [btrfs]) from [] (btrfs_cleanup_fs_roots+0x13c/0x1bc [btrfs]) > [ 57.965037] [] (btrfs_cleanup_fs_roots [btrfs]) from [] (open_ctree+0x1e44/0x2378 [btrfs]) > [ 57.975263] [] (open_ctree [btrfs]) from [] (btrfs_mount+0xecc/0xf9c [btrfs]) > [ 57.984252] [] (btrfs_mount [btrfs]) from [] (mount_fs+0x54/0x16c) > [ 57.992172] [] (mount_fs) from [] (vfs_kern_mount+0x58/0x104) > [ 57.999773] [] (vfs_kern_mount) from [] (btrfs_mount+0x310/0xf9c [btrfs]) > [ 58.008412] [] (btrfs_mount [btrfs]) from [] (mount_fs+0x54/0x16c) > [ 58.016327] [] (mount_fs) from [] (vfs_kern_mount+0x58/0x104) > [ 58.023809] [] (vfs_kern_mount) from [] (do_mount+0x1bc/0xc54) > [ 58.031374] [] (do_mount) from [] (SyS_mount+0x9c/0xc4) > [ 58.038335] [] (SyS_mount) from [] (ret_fast_syscall+0x0/0x3c) > [ 84.073780] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 23s! [mount:307] > [ 84.080914] Modules linked in: arc4 ath9k_htc ath9k_common ath9k_hw rt2800usb rt2x00usb rt2800lib ath rt2x00lib mac80211 cfg80211 crc_ccitt rfkill usbhid hid mcs7830 usbnet mii evdev ext4 sun4i_codec crc16 jbd2 fscrypto ecb mbcache snd_soc_core snd_pcm_dmaengine snd_pcm axp20x_usb_power snd_timer axp20x_pek ir_lirc_codec lirc_dev snd soundcore sunxi_cir sun4i_ts nvmem_sunxi_sid nvmem_core sunxi_wdt sg spi_sun4i sun4i_ss des_generic leds_gpio cpufreq_dt ip_tables x_tables autofs4 btrfs crc32c_generic xor zlib_deflate raid6_pq sd_mod axp20x_regulator realtek ahci_sunxi libahci_platform libahci sunxi ohci_platform phy_generic libata dwmac_sunxi stmmac_platform ohci_hcd musb_hdrc ehci_platform stmmac udc_core ehci_hcd i2c_mv64xxx scsi_mod usbcore phy_sun4i_usb extcon_core sunxi_mmc usb_common > [ 84.151649] CPU: 0 PID: 307 Comm: mount Tainted: G D 4.9.0-1-armmp #1 Debian 4.9.2-2 > [ 84.160505] Hardware name: Allwinner sun7i (A20) Family > [ 84.165724] task: c9df87c0 task.stack: ed99e000 > [ 84.170258] PC is at _raw_spin_lock+0x40/0x54 > [ 84.174779] LR is at reserve_metadata_bytes+0x44/0x1138 [btrfs] > [ 84.180692] pc : [] lr : [] psr: 800e0013 > [ 84.180692] sp : ed99f938 ip : ed99f948 fp : ed99f944 > [ 84.192153] r10: c0c0414c r9 : 00000000 r8 : 00080000 > [ 84.197371] r7 : 00000000 r6 : 00080000 r5 : c9c23110 r4 : c9bf6800 > [ 84.203889] r3 : 00000391 r2 : 00000392 r1 : 00000000 r0 : c9bf6800 > [ 84.210408] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none > [ 84.217534] Control: 10c5387d Table: 49e4406a DAC: 00000051 > [ 84.223275] CPU: 0 PID: 307 Comm: mount Tainted: G D 4.9.0-1-armmp #1 Debian 4.9.2-2 > [ 84.232132] Hardware name: Allwinner sun7i (A20) Family > [ 84.237370] [] (unwind_backtrace) from [] (show_stack+0x20/0x24) > [ 84.245116] [] (show_stack) from [] (dump_stack+0x90/0xa4) > [ 84.252338] [] (dump_stack) from [] (show_regs+0x1c/0x20) > [ 84.259473] [] (show_regs) from [] (watchdog_timer_fn+0x248/0x2b8) > [ 84.267389] [] (watchdog_timer_fn) from [] (__hrtimer_run_queues+0x1b4/0x394) > [ 84.276255] [] (__hrtimer_run_queues) from [] (hrtimer_interrupt+0xd4/0x240) > [ 84.285036] [] (hrtimer_interrupt) from [] (arch_timer_handler_phys+0x40/0x48) > [ 84.293993] [] (arch_timer_handler_phys) from [] (handle_percpu_devid_irq+0x98/0x24c) > [ 84.303557] [] (handle_percpu_devid_irq) from [] (generic_handle_irq+0x34/0x44) > [ 84.312597] [] (generic_handle_irq) from [] (__handle_domain_irq+0x6c/0xc4) > [ 84.321289] [] (__handle_domain_irq) from [] (gic_handle_irq+0x64/0xa8) > [ 84.329637] [] (gic_handle_irq) from [] (__irq_svc+0x6c/0x90) > [ 84.337108] Exception stack(0xed99f8e8 to 0xed99f930) > [ 84.342156] f8e0: c9bf6800 00000000 00000392 00000391 c9bf6800 c9c23110 > [ 84.350325] f900: 00080000 00000000 00080000 00000000 c0c0414c ed99f944 ed99f948 ed99f938 > [ 84.358491] f920: bf3ae304 c07f86c0 800e0013 ffffffff > [ 84.363547] [] (__irq_svc) from [] (_raw_spin_lock+0x40/0x54) > [ 84.371174] [] (_raw_spin_lock) from [] (reserve_metadata_bytes+0x44/0x1138 [btrfs]) > [ 84.380896] [] (reserve_metadata_bytes [btrfs]) from [] (btrfs_block_rsv_add.part.11+0x30/0x5c [btrfs]) > [ 84.392253] [] (btrfs_block_rsv_add.part.11 [btrfs]) from [] (btrfs_block_rsv_add+0x30/0x38 [btrfs]) > [ 84.403348] [] (btrfs_block_rsv_add [btrfs]) from [] (start_transaction+0x308/0x4d0 [btrfs]) > [ 84.413750] [] (start_transaction [btrfs]) from [] (btrfs_start_transaction+0x20/0x24 [btrfs]) > [ 84.424325] [] (btrfs_start_transaction [btrfs]) from [] (btrfs_truncate+0x90/0x2b4 [btrfs]) > [ 84.434727] [] (btrfs_truncate [btrfs]) from [] (btrfs_orphan_cleanup+0x2d0/0x644 [btrfs]) > [ 84.444956] [] (btrfs_orphan_cleanup [btrfs]) from [] (btrfs_cleanup_fs_roots+0x13c/0x1bc [btrfs]) > [ 84.455877] [] (btrfs_cleanup_fs_roots [btrfs]) from [] (open_ctree+0x1e44/0x2378 [btrfs]) > [ 84.466103] [] (open_ctree [btrfs]) from [] (btrfs_mount+0xecc/0xf9c [btrfs]) > [ 84.475090] [] (btrfs_mount [btrfs]) from [] (mount_fs+0x54/0x16c) > [ 84.483008] [] (mount_fs) from [] (vfs_kern_mount+0x58/0x104) > [ 84.490606] [] (vfs_kern_mount) from [] (btrfs_mount+0x310/0xf9c [btrfs]) > [ 84.499243] [] (btrfs_mount [btrfs]) from [] (mount_fs+0x54/0x16c) > [ 84.507157] [] (mount_fs) from [] (vfs_kern_mount+0x58/0x104) > [ 84.514637] [] (vfs_kern_mount) from [] (do_mount+0x1bc/0xc54) > [ 84.522202] [] (do_mount) from [] (SyS_mount+0x9c/0xc4) > [ 84.529164] [] (SyS_mount) from [] (ret_fast_syscall+0x0/0x3c) > > regards, > Marc > -- > Pengutronix e.K. | Marc Kleine-Budde | > Industrial Linux Solutions | Phone: +49-231-2826-924 | > Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | > Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | > --- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index dcd2e79..11a3bf4 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -4978,6 +4978,12 @@ static void btrfs_async_reclaim_metadata_space(struct work_struct *work) space_info = __find_space_info(fs_info, BTRFS_BLOCK_GROUP_METADATA); spin_lock(&space_info->lock); + if (!fs_info->fs_root) { + pr_info("BTRFS: fs_info->fs_root is not set up yet %s:%d\n", __func__, __LINE__); + WARN_ON(1); + spin_unlock(&space_info->lock); + return; + } to_reclaim = btrfs_calc_reclaim_metadata_size(fs_info->fs_root, space_info); if (!to_reclaim) {