linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Oliver Sang <oliver.sang@intel.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Matthew Wilcox <willy@infradead.org>, Jan Kara <jack@suse.cz>,
	David Hildenbrand <david@redhat.com>,
	Alistair Popple <apopple@nvidia.com>,
	linux-mm@kvack.org, Christian Brauner <brauner@kernel.org>,
	Hannes Reinecke <hare@suse.de>,
	oe-lkp@lists.linux.dev, lkp@intel.com,
	John Garry <john.g.garry@oracle.com>,
	linux-block@vger.kernel.org, ltp@lists.linux.it,
	Pankaj Raghav <p.raghav@samsung.com>,
	Daniel Gomez <da.gomez@samsung.com>,
	David Bueso <dave@stgolabs.net>
Subject: Re: [linux-next:master] [block/bdev]  3c20917120: BUG:sleeping_function_called_from_invalid_context_at_mm/util.c
Date: Thu, 27 Mar 2025 18:44:54 -0700	[thread overview]
Message-ID: <Z-X_FiXDTSvRSksp@bombadil.infradead.org> (raw)
In-Reply-To: <Z+JSwb8BT0tZrSrx@xsang-OptiPlex-9020>

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




  reply	other threads:[~2025-03-28  1:45 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202503101536.27099c77-lkp@intel.com>
     [not found] ` <20250311-testphasen-behelfen-09b950bbecbf@brauner>
     [not found]   ` <Z9kEdPLNT8SOyOQT@xsang-OptiPlex-9020>
2025-03-18  8:15     ` Luis Chamberlain
2025-03-18 14:37       ` Matthew Wilcox
2025-03-18 23:17         ` Luis Chamberlain
2025-03-19  2:58           ` Matthew Wilcox
2025-03-19 16:55             ` Luis Chamberlain
2025-03-19 19:16               ` Luis Chamberlain
2025-03-19 19:24                 ` Matthew Wilcox
2025-03-20 12:11                   ` Luis Chamberlain
2025-03-20 12:18                     ` Luis Chamberlain
2025-03-22 23:14                     ` Johannes Weiner
2025-03-23  1:02                       ` Luis Chamberlain
2025-03-23  7:07                         ` Luis Chamberlain
2025-03-25  6:52                           ` Oliver Sang
2025-03-28  1:44                             ` Luis Chamberlain [this message]
2025-03-28  4:21                               ` Luis Chamberlain
2025-03-28  9:47                                 ` Luis Chamberlain
2025-03-28 19:09                                   ` Luis Chamberlain
2025-03-29  0:08                                     ` Luis Chamberlain
2025-03-29  1:06                                       ` Luis Chamberlain
2025-03-31  7:45                                       ` Sebastian Andrzej Siewior
2025-04-08 16:43                                         ` Darrick J. Wong
2025-04-08 17:06                                           ` Luis Chamberlain
2025-04-08 17:24                                             ` Luis Chamberlain
2025-04-08 17:48                                               ` Darrick J. Wong
2025-04-08 17:51                                                 ` Matthew Wilcox
2025-04-08 18:02                                                   ` Darrick J. Wong
2025-04-08 18:51                                                     ` Matthew Wilcox
2025-04-08 19:13                                                       ` Luis Chamberlain
2025-04-08 19:13                                                       ` Luis Chamberlain
2025-04-08 18:06                                                 ` Luis Chamberlain
2025-03-20  1:24       ` Lai, Yi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z-X_FiXDTSvRSksp@bombadil.infradead.org \
    --to=mcgrof@kernel.org \
    --cc=apopple@nvidia.com \
    --cc=brauner@kernel.org \
    --cc=da.gomez@samsung.com \
    --cc=dave@stgolabs.net \
    --cc=david@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=hare@suse.de \
    --cc=jack@suse.cz \
    --cc=john.g.garry@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=ltp@lists.linux.it \
    --cc=oe-lkp@lists.linux.dev \
    --cc=oliver.sang@intel.com \
    --cc=p.raghav@samsung.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox