From: Hyeonggon Yoo <42.hyeyoo@gmail.com>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org,
Zi Yan <ziy@nvidia.com>, Yang Shi <shy828301@gmail.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Oscar Salvador <osalvador@suse.de>,
Matthew Wilcox <willy@infradead.org>,
Bharata B Rao <bharata@amd.com>,
Alistair Popple <apopple@nvidia.com>,
haoxin <xhao@linux.alibaba.com>, Minchan Kim <minchan@kernel.org>
Subject: Re: [BISECTED] first bad commit is c203c6d5b3f0597 ("migrate_pages: batch _unmap and _move")
Date: Fri, 3 Feb 2023 14:17:56 +0000 [thread overview]
Message-ID: <Y90XlHfmLbqdF/R1@localhost> (raw)
In-Reply-To: <87wn4zmzd1.fsf@yhuang6-desk2.ccr.corp.intel.com>
On Fri, Feb 03, 2023 at 07:17:14AM +0800, Huang, Ying wrote:
> "Huang, Ying" <ying.huang@intel.com> writes:
>
> > Hi, Hyeonggon,
> >
> > Hyeonggon Yoo <42.hyeyoo@gmail.com> writes:
> >
> >> On Wed, Feb 01, 2023 at 01:09:10AM +0900, Hyeonggon Yoo wrote:
> >>> I've observed random list_del corruption on mm-unstable,
> >>> where HEAD is commit d69862e693c069f4
> >>> ("mm/migrate: convert putback_movable_pages() to use folios").
> >>>
> >>> The issue can be easily reproduced by stressing MM multiple times:
> >>> stress-ng --bigheap 0 --timeout 300
> >>>
> >>> The compiler is gcc 12.2.1 and config, dmesg are included as attachment.
> >>> I will try to bisect but can't promise quick resolution :)
> >>
> >>
> >> The first bad commits appears to be:
> >> c203c6d5b3f0597 ("migrate_pages: batch _unmap and _move")
> >>
> >> the first bad commit _probably_ be earlier, but this is quite
> >> easy to reproduce so at this point I think above is the real bad commit.
> >
> > Thank you very much for reporting the bug. I'm in travel now but I will
> > try to find some time to reproduce and debug it.
>
> Still haven't reproduced the issue. But after reviewing the code, I
> found a bug in the code, which may cause list corruption. Can you try
> the debug patch below?
Unfortunately my home server seems to be broken again :(
That means I only have access to VMs and not a real machine now.
FYI it was not reproduced on KVM but reproduced on real machine.
Could you try checking on your machine with the config I attached? [1]
Sorry to bother your travel!
[1] https://marc.info/?l=linux-mm&m=167518135116956
Thanks,
Hyeonggon
> Best Regards,
> Huang, Ying
>
> -------------------------------8<-------------------------------------
> From a4eef847fe4f6e50b6c3f69651c1dfdeb4b23bc4 Mon Sep 17 00:00:00 2001
> From: Huang Ying <ying.huang@intel.com>
> Date: Fri, 3 Feb 2023 07:12:24 +0800
> Subject: [PATCH] dbg: fix list corruption for -EAGAIN
>
> ---
> mm/migrate.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/mm/migrate.c b/mm/migrate.c
> index 143d96775b4d..4205a0297ef8 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -1230,11 +1230,11 @@ static int __migrate_folio_move(struct folio *src, struct folio *dst,
>
> rc = move_to_new_folio(dst, src, mode);
>
> - if (rc != -EAGAIN)
> + if (rc != -EAGAIN) {
> list_del(&dst->lru);
> -
> - if (unlikely(!is_lru))
> - goto out_unlock_both;
> + if (unlikely(!is_lru))
> + goto out_unlock_both;
> + }
>
> /*
> * When successful, push dst to LRU immediately: so that if it
> --
> 2.35.1
>
next prev parent reply other threads:[~2023-02-03 14:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Y9k9Jl9wIaUFZS30@hyeyoo>
2023-01-31 17:35 ` [BISECTED] first bad commit is c203c6d5b3f0597 ("migrate_pages: batch _unmap and _move") Hyeonggon Yoo
2023-01-31 22:45 ` Andrew Morton
2023-02-01 23:28 ` Huang, Ying
2023-02-02 23:17 ` Huang, Ying
2023-02-03 14:17 ` Hyeonggon Yoo [this message]
2023-02-03 15:02 ` Huang, Ying
2023-02-05 14:38 ` Hyeonggon Yoo
2023-02-06 6:25 ` Huang, Ying
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=Y90XlHfmLbqdF/R1@localhost \
--to=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=bharata@amd.com \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=osalvador@suse.de \
--cc=shy828301@gmail.com \
--cc=willy@infradead.org \
--cc=xhao@linux.alibaba.com \
--cc=ying.huang@intel.com \
--cc=ziy@nvidia.com \
/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.