Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1475745rwb; Wed, 26 Jul 2023 13:08:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlGtCMfeOSC1WU1QnbNSYG140E4vuNCcG2lz40Cs5w6aFv7Rr8xxOKwGLOCq4gKWbMXswUCX X-Received: by 2002:a17:902:7c98:b0:1bb:993e:f748 with SMTP id y24-20020a1709027c9800b001bb993ef748mr2829556pll.67.1690402105820; Wed, 26 Jul 2023 13:08:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690402105; cv=none; d=google.com; s=arc-20160816; b=sZT8YfrqvHMS1kbyDcYgsSVRS9R29+aj1ohfewIDd0U5q44w+faGKoHEqsLOHsr9d2 N3Jo6AoF1+shNArMcAU/XNpQnIq/lkXR1k6JAjaZSCjtvs2P4gw73pg4SOYDRVIy+AEe Nk7fkD9e38nuuQgKtRgCWi3JNUmFBgo8QFwKWwNxdnKQNR0+r2eZkOwkIgONQAXxiwZx XKS4z6VAcwlPfRm8/bCCaJS7iHm5YPFpoK3iA6jJjhmg9Re0KfVkbRW3+FxsQdxAYo+m IsC5EiYKYAkU89rkWu8Nnc4ALHjnpBBz+c01kUuHO+SdrVw4DjHAQphEOEHkKetrGmnk U24Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=7f1qxe+nsWg+W9Z0H2K567+nQnYT0vl2apEw8vfFYwA=; fh=6dHzgD2G7JimISXhJNumRw5wpQOLZEJCNQHm9IzgqSI=; b=JMJyF57ZoosuOyNryDSA7iHFQYOU5k/QCTuXXn3YoEszV7ZCAmSu+gntTKSMeYW9bu Kn0GMEL0za7L8cw2DNr3sbfN49YmFLmTaARV1t7ZC6seTGCsLRN2PWlEc4ftsHpTaupW YuO+eLd/uPjozr92AMMx4hfhyvcp9s7kcG2XNPR52ThEU9DD9+ZVJOsEwfDdatPJkidv RqGvaM1exdT1YV9xgVs5YuN0mh4s54OXkXhpIXivYmrKURJZy/5oZHOl4YAw9MJ1KZa5 Zm0e+Lt6dex1Ah3pfVsUgeM48gTOgIapfpbWzNl/TwEEXm4h/dqyV7L9IOVTDqgtXlIJ s/EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=SVgBXvcr; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e6-20020a170902cf4600b001b8a4519706si13086027plg.19.2023.07.26.13.07.45; Wed, 26 Jul 2023 13:08:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=SVgBXvcr; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230143AbjGZTau (ORCPT + 99 others); Wed, 26 Jul 2023 15:30:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229907AbjGZTat (ORCPT ); Wed, 26 Jul 2023 15:30:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0C7010DB; Wed, 26 Jul 2023 12:30:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 36D6861CB1; Wed, 26 Jul 2023 19:30:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBEC3C433C8; Wed, 26 Jul 2023 19:30:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1690399847; bh=RV8tXL7RQ7wnolCqR1y4PyPALTKooCyEOhzhJRXcm/I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SVgBXvcrYNhex0+1z06NCyli0sUblvDQ90P7N/xe5kJ0+Q0OeP9lBlMuWohBd599E X0HwNQlpDq4CCkcsveKBraRfvaJNSyGF5bPHYv15pSAWcbsia2p99BVqHMVZ9ZvqOY 0doZpYRXWnSGvBupT8LtftvO3Yru9jMJIrV7gPkQ= Date: Wed, 26 Jul 2023 12:30:46 -0700 From: Andrew Morton To: Ming Lei Cc: David Howells , linux-block , "Theodore Ts'o" , Song Liu , Christoph Hellwig , Alasdair Kergon , linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, dm-devel@redhat.com, linux-ext4@vger.kernel.org, Ming Lei Subject: Re: [dm-devel] Processes hung in "D" state in ext4, mm, md and dmcrypt Message-Id: <20230726123046.a001b6963da19ca883045271@linux-foundation.org> In-Reply-To: References: <4919.1690365747@warthog.procyon.org.uk> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-ext4@vger.kernel.org On Wed, 26 Jul 2023 23:29:51 +0800 Ming Lei wrote: > On Wed, Jul 26, 2023 at 6:02 PM David Howells wrote: > > > > Hi, > > > > With 6.5-rc2 (6.5.0-0.rc2.20230721gitf7e3a1bafdea.20.fc39.x86_64), I'm seeing > > a bunch of processes getting stuck in the D state on my desktop after a few > > hours of reading email and compiling stuff. It's happened every day this week > > so far and I managed to grab stack traces of the stuck processes this morning > > (see attached). > > > > There are two blockdevs involved below, /dev/md2 and /dev/md3. md3 is a raid1 > > array with two partitions with an ext4 partition on it. md2 is similar but > > it's dm-crypted and ext4 is on top of that. > > > ... > > > ===117547=== > > PID TTY STAT TIME COMMAND > > 117547 ? D 5:12 [kworker/u16:8+flush-9:3] > > [<0>] blk_mq_get_tag+0x11e/0x2b0 > > [<0>] __blk_mq_alloc_requests+0x1bc/0x350 > > [<0>] blk_mq_submit_bio+0x2c7/0x680 > > [<0>] __submit_bio+0x8b/0x170 > > [<0>] submit_bio_noacct_nocheck+0x159/0x370 > > [<0>] __block_write_full_folio+0x1e1/0x400 > > [<0>] writepage_cb+0x1a/0x70 > > [<0>] write_cache_pages+0x144/0x3b0 > > [<0>] do_writepages+0x164/0x1e0 > > [<0>] __writeback_single_inode+0x3d/0x360 > > [<0>] writeback_sb_inodes+0x1ed/0x4b0 > > [<0>] __writeback_inodes_wb+0x4c/0xf0 > > [<0>] wb_writeback+0x298/0x310 > > [<0>] wb_workfn+0x35b/0x510 > > [<0>] process_one_work+0x1de/0x3f0 > > [<0>] worker_thread+0x51/0x390 > > [<0>] kthread+0xe5/0x120 > > [<0>] ret_from_fork+0x31/0x50 > > [<0>] ret_from_fork_asm+0x1b/0x30 > > BTW, -rc3 fixes one similar issue on the above code path, so please try -rc3. > > 106397376c03 sbitmap: fix batching wakeup That patch really needs a Fixes:, please. And consideration for a -stable backport. Looking at what has changed recently in sbitmap, it seems unlikely that 106397376c03 fixes an issue that just appeared in 6.5-rcX. But maybe the issue you have identified has recently become easier to hit; we'll see.