From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF303C3600B for ; Fri, 28 Mar 2025 01:45:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2945A280127; Thu, 27 Mar 2025 21:44:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 24498280120; Thu, 27 Mar 2025 21:44:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 10C9A280127; Thu, 27 Mar 2025 21:44:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id E697E280120 for ; Thu, 27 Mar 2025 21:44:58 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 80401AC9AF for ; Fri, 28 Mar 2025 01:44:59 +0000 (UTC) X-FDA: 83269266318.19.FDF1CE5 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf26.hostedemail.com (Postfix) with ESMTP id DE5F0140009 for ; Fri, 28 Mar 2025 01:44:57 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=aak77eVx; spf=pass (imf26.hostedemail.com: domain of mcgrof@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=mcgrof@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743126298; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=YDKJ9LXw4+5nvvDZu63r4RB5vvnevb0BexazxOk9DGQ=; b=UAZ7hkhwl1PMDjWeDvoMXak+8DgV3gVUlsETOZjhAAA6rLNFskghhxw1gH2wOXHOPrjTdH PnaygHNHs9KEH0ux1eNAIHfKRpdubYhXq3ivt76s7T14i/0WQdTOQ/DRA126MJlGJ/zZjC wmTu+74LCdMKSKxPFEP1bt+GDshKelM= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=aak77eVx; spf=pass (imf26.hostedemail.com: domain of mcgrof@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=mcgrof@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743126298; a=rsa-sha256; cv=none; b=WHJv3UuCw4q1wM5CvHNbHbUcTb+Sze9HRY1VoBVOxqVzQJvtzigg5NR1gIW6NOXESqczsE 9ogNRTusVPQ3KaNCblTsZ0AMOFmXOtTcEUbz6NtRAdIzcQa5waRi4dCDytbHJHvfs5pvye PwOpRy8SQUVSD0so0h46xoXe8rF1ILU= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 3199FA40558; Fri, 28 Mar 2025 01:39:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CD72C4CEDD; Fri, 28 Mar 2025 01:44:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743126296; bh=nmX44Vf41ol4npyO99GzzC0pNas8m8Ih6yuWRheOadE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aak77eVxgOs5jMI+fjhFIE+Ao8wo47UiPu5Gj+hZto6CkK81IzKyILDwcqP9AirtZ 9UysemMxSpd0C19m3nQEnirDtkxmNOYeN0r89WwrGnctr863l379xBLJJpCuYugSDW Un+zBxdUIzi8RFIWw4QuyDRMpd+bVGICq9n5hr2gItcy3f6C2QwkubP5t08yQDDFDV xAJIhc3Jqfi7bT7FKQ6FkUPeV5KHyNuu/5YMevspDCl8I9lzRRRVBLA9N3X1DY2+Ft I4hG40QMjJsr2ceJV2sGODVTN8ldHrgaNdTrbxfqPyQAqPQqA004KVKAcVziEcwmPt jqipjAMDnvEuw== Date: Thu, 27 Mar 2025 18:44:54 -0700 From: Luis Chamberlain To: Oliver Sang Cc: Johannes Weiner , Matthew Wilcox , Jan Kara , David Hildenbrand , Alistair Popple , linux-mm@kvack.org, Christian Brauner , Hannes Reinecke , oe-lkp@lists.linux.dev, lkp@intel.com, John Garry , linux-block@vger.kernel.org, ltp@lists.linux.it, Pankaj Raghav , Daniel Gomez , David Bueso Subject: Re: [linux-next:master] [block/bdev] 3c20917120: BUG:sleeping_function_called_from_invalid_context_at_mm/util.c Message-ID: References: <20250322231440.GA1894930@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: DE5F0140009 X-Stat-Signature: rrrweheu7u5upuce6bewt86tebhhq86k X-Rspam-User: X-Rspamd-Server: rspam12 X-HE-Tag: 1743126297-431799 X-HE-Meta: U2FsdGVkX1/x/kFvU7fGPBGKeZcVfe+46tykFr051WZsO/Q/RMScS+MdSTm9DZ3zDok7gM/dlSIUrLGgEjJRlxs7E7mvfwhdge1bUMl4zbMbjwtcNkBG8AaLJYwDI14ec2YzX0aO7TWg/frrfoaNeJkzPfQc+vHQIDwHne3s1q3BJ4U4WBI1vqb51FzJnYXaW+W9oXPHeyLVlrNzxAqC5iNRujcsoBomjImRozN6gvZxwE7PeMWNJB0xFGIZfcOJHXKDDFuTtfK86vQBjlIAutp+jb7EN+/nspt5U5fm5Ei6bsny5m8B85oiO+5ws5idvNNdv9DelHzBCIJUSoKjeT8MlxEb9i0RLOftCPh3ke8H3gM9CtQ1NN7llwZT4D0AJc5NUVBu67Gy6FomT9SZMDC5tCSu6hgzpidu0zBX3c63+V/G9G5Sad3nO1pWsY1+NrXuOVvolSaFySv4x1iEi4ixKufE82qErDVd2BwEGiY3mdALPu+PP5U0EMX8o45U4RTxZtygIrE8pZVYL12qROjXm4gMXwiaHAgAW4j0/D6I2aHURXXYLDlMaxoG31BxqIar9Xa0RagRdzayb3USZXcdwj9MpZZXYPdra8dNIXa6+DAoYmxlvY7oR6T0I+b8dGowZXsmdzMbXw2us9W1YFGql0aTTfC5cQC7vtoianEX94Qgza6X3LWowhteZM9yOsAAYBOFvNQz5XStqeb7hG5iYrKnRP8Hv085I8D6e/EhS95U/qEAElhh1ECjOVCFQ4m0gUD8uJk7R+syK8Xaj+0/Zo8dbZU/TfFSyGLmYPugM20j5WRW8DvLOjjSr/F/QzntDfNxXEtXqfy0bNjfUv0k4+2zVdTEI67ExcQ+c51kytX0Da1pGXhsmRKJpE9M0ys2IqH1/DADE8gRjq+8pAjZYA7o/qLFP1UxMGmUssGMiO3Z52eFCDqTolFIBHScpgud+OvtV23psJpXR+z BpNLILko yC6rA/4YeXECoULaMvi+A2aXrlWuJuyjX2LlXgWOoIBMTAqLDI+vE/hIoSinn35Rjv9Znr+z6xDSic3+sNeYu4Ld0uL9lZJ2DIiAzraMj3p8rSH0qI2MrUgMtciME0scI64u0isjfe8E5Ir7XIsDo6eRjlQx7ZvZFDlkyFzivqF28KOEy3IIUlKxQxY8hjketMCpIFfvrg8kMAF3ABsEEFtk1JvNb2HNULK0fit3kQa3s+KexxDLNZ4qx2F+SBNoLPR4zHovrfrVe9GfI2yc58A2f9n1yRFr0i3LZDh1sOmcEurM4+7i+kUVL4SuCC7RjNL9zk+7vJ9rMYQbynkZ/uYWPuw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Tue, Mar 25, 2025 at 02:52:49PM +0800, Oliver Sang wrote: > hi, Luis, > > On Sun, Mar 23, 2025 at 12:07:27AM -0700, Luis Chamberlain wrote: > > On Sat, Mar 22, 2025 at 06:02:13PM -0700, Luis Chamberlain wrote: > > > On Sat, Mar 22, 2025 at 07:14:40PM -0400, Johannes Weiner wrote: > > > > Hey Luis, > > > > > > > > This looks like the same issue the bot reported here: > > > > > > > > https://lore.kernel.org/all/20250321135524.GA1888695@cmpxchg.org/ > > > > > > > > There is a fix for it queued in next-20250318 and later. Could you > > > > please double check with your reproducer against a more recent next? > > > > > > Confirmed, at least it's been 30 minutes and no crashes now where as > > > before it would crash in 1 minute. I'll let it soak for 2.5 hours in > > > the hopes I can trigger the warning originally reported by this thread. > > > > > > Even though from code inspection I see how the kernel warning would > > > trigger I just want to force trigger it on a test, and I can't yet. > > > > Survied 5 hours now. This certainly fixed that crash. > > > > As for the kernel warning, I can't yet reproduce that, so trying to > > run generic/750 forever and looping > > ./testcases/kernel/syscalls/close_range/close_range01 > > and yet nothing. > > > > Oliver can you reproduce the kernel warning on next-20250321 ? > > the issue still exists on > 9388ec571cb1ad (tag: next-20250321, linux-next/master) Add linux-next specific files for 20250321 > > but randomly (reproduced 7 times in 12 runs, then ltp.close_range01 also failed. > on another 5 times, the issue cannot be reproduced then ltp.close_range01 pass) OK I narrowed down a reproducer to requiring the patch below diff --git a/mm/util.c b/mm/util.c index 448117da071f..3585bdb8700a 100644 --- a/mm/util.c +++ b/mm/util.c @@ -735,6 +735,8 @@ int folio_mc_copy(struct folio *dst, struct folio *src) long nr = folio_nr_pages(src); long i = 0; + might_sleep(); + for (;;) { if (copy_mc_highpage(folio_page(dst, i), folio_page(src, i))) return -EHWPOISON; And then just running: dd if=/dev/zero of=/dev/vde bs=1024M count=1024 For some reason a kernel with the following didn't trigger it so the above patch is needed CONFIG_PROVE_LOCKING=y CONFIG_DEBUG_SPINLOCK=y CONFIG_ACPI_SLEEP=y It may have to do with my preemtpion settings: CONFIG_PREEMPT_BUILD=y CONFIG_ARCH_HAS_PREEMPT_LAZY=y # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_LAZY is not set CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=y CONFIG_PREEMPT_DYNAMIC=y CONFIG_PREEMPT_RCU=y And so now to see how we should fix it. LUis