All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Liam R. Howlett" <Liam.Howlett@Oracle.com>
To: David Howells <dhowells@redhat.com>
Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org
Subject: Re: kernel BUG at lib/maple_tree.c:1237!
Date: Tue, 19 Mar 2024 15:56:56 -0400	[thread overview]
Message-ID: <20240319195656.ziyj6yrnwyijgk5f@revolver> (raw)
In-Reply-To: <932184.1710871728@warthog.procyon.org.uk>

* David Howells <dhowells@redhat.com> [240319 14:09]:
> Hi Liam,
> 
> I managed to trigger a bug in the maple-tree.  I don't know that it's
> definitely your bug as I had a process stuck in the D state, but I don't
> believe it was doing anything that modified maple trees at the time, just
> waiting for PG_writeback on a folio.  Anyway, I was running the generic/130
> xfstest and pressed ctrl-C and got a bunch of oopses (see attached).
> 
> Unfortunately, I can't do anything to try and get more information as anything
> that tries to clone() gets another oops.
> 
> The RIP is mas_alloc_nodes+0x55/0x16e:
> 
> 	mas_set_alloc_req(mas, 0);
> 	if (mas->mas_flags & MA_STATE_PREALLOC) {
> 		if (allocated)
> 			return;
> 		BUG_ON(!allocated);  <------- 1237
> 		WARN_ON(!allocated);
> 	}
> 
> The base kernel is at commit bf3a69c6861f plus some of my patches, none of
> which alter the maple-tree code or MM code.
> 

How can we be stuck in D state on a BUG_ON()?

If this is a maple tree bug, then it's in the calculations done for
preallocation.  The last time that changed was in December in commit
4249f13c11be8b8b7bf93204185e150c3bdc968d.  Could you try reverting this
change?

From the trace, this is failing on loading a binary. Could you please
try changing BUG_ON() to MAS_BUG_ON(mas, !allocated) to get more
information?

I ran generic/130 here and it worked in my testing.  Does this happen
without your patches?  Maybe the changes you make are causing something
to happen more frequently?

Thanks,
Liam


  reply	other threads:[~2024-03-19 19:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 18:08 kernel BUG at lib/maple_tree.c:1237! David Howells
2024-03-19 19:56 ` Liam R. Howlett [this message]
2024-03-19 19:59 ` And here's a GPF for you David Howells
2024-03-21 15:09 ` kernel BUG at lib/maple_tree.c:1237! David Howells

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=20240319195656.ziyj6yrnwyijgk5f@revolver \
    --to=liam.howlett@oracle.com \
    --cc=dhowells@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=maple-tree@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.