Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5288884rwl; Wed, 28 Dec 2022 16:27:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXt48wzFPYzIpori6GwIn8rqTM0CKiqyPh3WMsuLP6jLA57BZfdoofRCv0fYG+Z+8Zm7dvE/ X-Received: by 2002:a17:907:1710:b0:7c0:c36d:f5df with SMTP id le16-20020a170907171000b007c0c36df5dfmr29295771ejc.70.1672273628896; Wed, 28 Dec 2022 16:27:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672273628; cv=none; d=google.com; s=arc-20160816; b=xhxleNf05HJbYjA3bhq0LPF0oFetu1gBxQBvsqvkdaYHSuBLf8O5SCLeYisNlcFEub c34AGawDTlrdn7OO6wvjFsiAqqFDRwdFAeEni6PUlizkMRaOWIXcNNr1OtBadkPdNpzw vOt3dO/1jbT1XiG9XB8LU13sAleMkjQhgJSXTS0UjVPLE4WmdsNOkFBriJg+gFfeYnyH Ip7R3koDzIV9SBkiMgdfDggVm+xIKeWSuFk066HmTHtEV/A2gtdlM49BJwMUOFXngJ1A tWxBffwVZuOW8EJFaSPAsCLS/vSO4kCg5klT3pzfN28rEQFLtE62CB5Wwmdh9IBp40Gd HrEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id; bh=htvBGtDOU4AIy5MwVsKtwMDVVSnXNUDUEDzudAMa6tM=; b=hgxo4ZQLlFEb5rWcCa0PlcCbkx/2WP+8KhG6Mmt+z7T3kri8xmEtn+a0//Zf0qZD8j L3uDtKHqId/jzha5+/XAF0DWFdPMVsiZtxN+stw7Ha2V3CJhCiP5gjAUt8vnvhmoBh3I 9UR6p8PK1ETNWbw2Q8TwL8B2EaYEYQ9O7s7OXH6haucno40NArMB8A0Vk7iDQYQ3Y28F is1w1fCwM9ny+SE3/jF2nRSlscpCyPGGwbXKFbqpVVrLFIZzAtPvGjlFT/upIanuAGFd zqP+qc31YwN+6p4aCaWZc//zo1dCWYUuzXIzj6uY4WhR/bN1bsMbnjRTfzMQ3v3hf9AT fYLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dp21-20020a170906c15500b007add6c835a9si14462342ejc.867.2022.12.28.16.26.52; Wed, 28 Dec 2022 16:27:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232081AbiL1Xbc (ORCPT + 62 others); Wed, 28 Dec 2022 18:31:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230388AbiL1Xba (ORCPT ); Wed, 28 Dec 2022 18:31:30 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 189BC120A0; Wed, 28 Dec 2022 15:31:27 -0800 (PST) Received: from [0.0.0.0] ([149.28.201.231]) by mail.gmx.net (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MGz1V-1p77Oq2UeR-00E8eV; Thu, 29 Dec 2022 00:31:24 +0100 Message-ID: Date: Thu, 29 Dec 2022 07:31:19 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [6.2][regression] after commit 947a629988f191807d2d22ba63ae18259bb645c5 btrfs volume periodical forced switch to readonly after a lot of disk writes Content-Language: en-US To: Mikhail Gavrilov Cc: Qu Wenruo , dsterba@suse.com, Btrfs BTRFS , Linux List Kernel Mailing References: <0036622d-53f7-eaba-f720-6dd9bdca28ad@gmx.com> <41734bdb-2df0-6596-01b6-76a7dfd05d64@gmx.com> <24cd64b2-4536-372c-91af-b425d2f6efd4@gmx.com> <7d2edc1d-922b-763c-3122-0a6f81c3454e@suse.com> From: Qu Wenruo In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:75GTRrNIXSkNZvdMHGc/sIewK3l57YwPMpp1qaLWwtaRMYu9aHk chI0zS2yp0eRqcNOrhhnkx+Qu8NBL37GuM+K6rjNNmHiTBl6eHPP8V5mWX3sqhp7kRCq8Lx OsaGOOPVkABej8dlH87/NIWJCHMaL7e5Va69YbbMlEmMT3IGwCkvB+MrsOOZAEPKZLLp3EF 7h9vGIC4r8ev7GJh00G+A== UI-OutboundReport: notjunk:1;M01:P0:wXZ0lqy6jEo=;tKVnIQHnC4qsVsXWTsWSBqG0LdH XQtSQpQZ8KpwBPu7owXD65VTLViw+uHUEh3L5dUmLUiRkAvIxI1KHRrvyaJlTatnQrtaErUZv DFYthMfHxrQwFkds/xakvRFqEdDFIkVYb6rQ3bb+DP64YixIxoqMTulS1zMJvq7jBV+vbdt62 8z2KmY5UHroubRF+CV/okes+mGToGKSppz058GbQR5nR1nrhN+4Gmuueg5sFYd3IcP9ZlAplm /bD85mkuGI6aHVoLgsFyLuJMfqPlxKVLNsEI6sIOOCz2MwDv5R+mCb69XrsOPCxKscOqPe7tW S5J1brIvwKf2L2tHrQphClQvgXFD0XXnXhC5J3sTQBjyRtk5vRUh4n905HebNKHdbhpnP/3qe mvl2RcnObEPNm8KlGXRO+K5rvIQwKFWYeg/Mjf54o2jg9KLBZlDxflURYxcix47MqVd/Xm+b3 bWkRsavxyLyyfT4r6LpMZdbnFMgHIihG2k06Rr975iSqv8fpC0tR5W01UiyOTa48HSelFAKeO eFQ9q3Rx7E08wxDTtokrugB7Y3jSxLmiBLUUYSwCgpX5Sfg9d5vlmfpbDoyQo92w59813koRe RFNRXV4BJqaw+UVluEfm31OLJIPHMQOB08yW3Gdq65jdnAXAHNqLuZT+3qCVs8EqriixLYphd hKBrbkjb7m6BrSOFnEGS4tWpbmBAkAfMGoBzMyRT93kQsUj++yEoN2Wea/ah9pIox4wrUfnjl j40meOmy2sxUACRuXg6E/Gp5cwqFzTOyOTIhktPx7lXXFl5Tg+GDUYz6Vzg1p98O3iGT6Msy2 +QSckSwjVKhY2oVjupWo7jb8EVugEONObDFL+hgIIft0+7aTFgoc8dUZHFCCn/U7SLO9edOjV VoCS8RjKAwlhBswTxDVT3jUBun/XgESuu1yiPRcaqN6X8ndjNoMkZjGN8WDKAknk78737tVIE uyolg1luxUU/9aNkP/AuQhya4CM= X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM, NICE_REPLY_A,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/12/28 22:12, Mikhail Gavrilov wrote: > On Wed, Dec 28, 2022 at 6:08 AM Qu Wenruo wrote: >> >> From the very first dmesg with calltrack, it already shows the >> submit_one_bio() is called from submit_extent_page(), which means cases >> cross stripe boundary, and has no parent_check populated at all. >> >> And since you're using RAID0 on two NVMEs, it matches the symptom, while >> most tests done here are using single device (DUP and SINGLE), thus no >> stripe boundary cases at all. >> (In fact it should still be possible to trigger on SINGLE, but way too >> hard to trigger) >> >> With proper root cause found, this version should mostly handle the >> regression correctly. >> >> This version should mostly be the formal one I'd later send to the >> mailing list. >> >> I can not thank you more for all the testing you have provided, it not >> only pinned down the bug, but also proves I'm a total idiot... > > I have already written over 1.6Tb of data to disk and there are no > hints of errors. > For me, this is a sign that the problem has been fixed. > Tested-by: Mikhail Gavrilov > > ❯ dmesg | grep -i btrfs > [ 0.000000] Linux version > 6.2.0-rc1-1b929c02afd37871d5afb9d498426f83432e71c2-btrfs-fix+ > (mikhail@mikhail-laptop) (gcc (GCC) 12.2.1 20221121 (Red Hat > 12.2.1-4), GNU ld version 2.39-6.fc38) #7 SMP PREEMPT_DYNAMIC Wed Dec > 28 10:00:39 +05 2022 > [ 0.000000] Command line: > BOOT_IMAGE=(hd0,gpt1)/@root/boot/vmlinuz-6.2.0-rc1-1b929c02afd37871d5afb9d498426f83432e71c2-btrfs-fix+ > root=UUID=40e0b5d2-df54-46e0-b6f4-2f868296271d ro > rootflags=subvol=@root > resume=UUID=db79988f-6b70-4b52-84f5-3e505471c85e log_buf_len=16M > sysrq_always_enabled=1 nmi_watchdog=1 > amdgpu.lockup_timeout=-1,-1,-1,-1 > [ 0.154567] Kernel command line: > BOOT_IMAGE=(hd0,gpt1)/@root/boot/vmlinuz-6.2.0-rc1-1b929c02afd37871d5afb9d498426f83432e71c2-btrfs-fix+ > root=UUID=40e0b5d2-df54-46e0-b6f4-2f868296271d ro > rootflags=subvol=@root > resume=UUID=db79988f-6b70-4b52-84f5-3e505471c85e log_buf_len=16M > sysrq_always_enabled=1 nmi_watchdog=1 > amdgpu.lockup_timeout=-1,-1,-1,-1 > [ 0.154654] Unknown kernel command line parameters > "BOOT_IMAGE=(hd0,gpt1)/@root/boot/vmlinuz-6.2.0-rc1-1b929c02afd37871d5afb9d498426f83432e71c2-btrfs-fix+", > will be passed to user space. > [ 4.496766] usb usb2: Manufacturer: Linux > 6.2.0-rc1-1b929c02afd37871d5afb9d498426f83432e71c2-btrfs-fix+ xhci-hcd > [ 4.498963] usb usb1: Manufacturer: Linux > 6.2.0-rc1-1b929c02afd37871d5afb9d498426f83432e71c2-btrfs-fix+ xhci-hcd > [ 4.500665] usb usb3: Manufacturer: Linux > 6.2.0-rc1-1b929c02afd37871d5afb9d498426f83432e71c2-btrfs-fix+ xhci-hcd > [ 4.501851] usb usb4: Manufacturer: Linux > 6.2.0-rc1-1b929c02afd37871d5afb9d498426f83432e71c2-btrfs-fix+ xhci-hcd > [ 4.735212] Btrfs loaded, crc32c=crc32c-generic, assert=on, > zoned=yes, fsverity=yes > [ 5.223368] > BOOT_IMAGE=(hd0,gpt1)/@root/boot/vmlinuz-6.2.0-rc1-1b929c02afd37871d5afb9d498426f83432e71c2-btrfs-fix+ > [ 6.923453] BTRFS: device label fedora_localhost-live devid 2 > transid 652981 /dev/nvme1n1p1 scanned by systemd-udevd (448) > [ 6.974412] BTRFS: device label fedora_localhost-live devid 1 > transid 652981 /dev/nvme0n1p3 scanned by systemd-udevd (484) > [ 11.113437] CPU: 15 PID: 478 Comm: systemd-udevd Tainted: G > L 6.2.0-rc1-1b929c02afd37871d5afb9d498426f83432e71c2-btrfs-fix+ > #7 > [ 11.221359] CPU: 15 PID: 478 Comm: systemd-udevd Tainted: G > W L 6.2.0-rc1-1b929c02afd37871d5afb9d498426f83432e71c2-btrfs-fix+ > #7 > [ 13.731015] BTRFS info (device nvme0n1p3): using crc32c > (crc32c-intel) checksum algorithm > [ 13.731147] BTRFS info (device nvme0n1p3): using free space tree > [ 14.328439] BTRFS info (device nvme0n1p3): enabling ssd optimizations > [ 14.328469] BTRFS info (device nvme0n1p3): auto enabling async discard > [ 16.592713] BTRFS info (device nvme0n1p3: state M): use zstd > compression, level 1 > [11691.071176] CPU: 11 PID: 2068 Comm: gnome-shell Tainted: G W > L 6.2.0-rc1-1b929c02afd37871d5afb9d498426f83432e71c2-btrfs-fix+ > #7 > > > > As I mentioned at the first message I also have a computer where the > btrfs partition is located on a slow HDD. > When I update the container (podman pull), the system becomes > unresposible for half an hour, which is how long it takes to update > the container. > I do not expect any super-speed from the HDD, I just would like to do > something else with this computer. Yes, at least watching videos on > youtube. Is there anything that can be done here or is there nothing > that we can do? Are you using qgroup? If so it may be worthy trying disabling qgroup. But for newer kernel, qgroup hang should only happen when dropping large snapshot, I don't know if podman pull would cause older snapshots to be deleted... Thanks, Qu > [46944.301588] INFO: task btrfs-transacti:1184 blocked for more than > 122 seconds. > [46944.301825] Tainted: G W L ------- --- > 6.2.0-0.rc1.14.fc38.x86_64+debug #1 > [46944.301829] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" > disables this message. > [46944.301832] task:btrfs-transacti state:D stack:12000 pid:1184 > ppid:2 flags:0x00004000 > [46944.301840] Call Trace: > [46944.301843] > [46944.301851] __schedule+0x50c/0x1780 > [46944.301863] ? _raw_spin_unlock_irqrestore+0x30/0x60 > [46944.301876] schedule+0x5d/0xe0 > [46944.301881] wait_current_trans+0x110/0x170 > [46944.301888] ? __pfx_autoremove_wake_function+0x10/0x10 > [46944.301895] start_transaction+0x36c/0x680 > [46944.301904] transaction_kthread+0xb6/0x1b0 > [46944.301912] ? __pfx_transaction_kthread+0x10/0x10 > [46944.301916] kthread+0xf5/0x120 > [46944.301920] ? __pfx_kthread+0x10/0x10 > [46944.301926] ret_from_fork+0x2c/0x50 > [46944.301941] > > > I attached a full kernel log from this machine. > I can start a separate thread if it makes sense. > Sorry for oftop. > > > -- > Best Regards, > Mike Gavrilov.