linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: "Naresh Kamboju" <naresh.kamboju@linaro.org>,
	qemu-devel@nongnu.org, "open list" <linux-kernel@vger.kernel.org>,
	"Linux Regressions" <regressions@lists.linux.dev>,
	linux-ext4 <linux-ext4@vger.kernel.org>,
	lkft-triage@lists.linaro.org, linux-mm <linux-mm@kvack.org>,
	"Linux btrfs" <linux-btrfs@vger.kernel.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Anders Roxell" <anders.roxell@linaro.org>,
	"Arnd Bergmann" <arnd@arndb.de>, "Qu Wenruo" <wqu@suse.com>,
	"David Sterba" <dsterba@suse.com>
Subject: Re: qemu-arm64: CONFIG_ARM64_64K_PAGES=y kernel crash on qemu-arm64 with Linux next-20241210 and above
Date: Fri, 20 Dec 2024 09:50:44 +1030	[thread overview]
Message-ID: <4ae3fd71-c22e-48b6-bc86-fa494a1841a6@gmx.com> (raw)
In-Reply-To: <a3406049-7ab5-45b9-80bf-46f73ef73a4f@stanley.mountain>



在 2024/12/20 01:40, Dan Carpenter 写道:
> On Thu, Dec 19, 2024 at 10:44:12AM +1030, Qu Wenruo wrote:
>>
>>
>> 在 2024/12/19 06:37, Qu Wenruo 写道:
>>>
>>>
>>> 在 2024/12/19 02:22, Naresh Kamboju 写道:
>>>> On Wed, 18 Dec 2024 at 17:33, Naresh Kamboju
>>>> <naresh.kamboju@linaro.org> wrote:
>>>>>
>>>>> The following kernel crash noticed on qemu-arm64 while running the
>>>>> Linux next-20241210 tag (to next-20241218) kernel built with
>>>>>    - CONFIG_ARM64_64K_PAGES=y
>>>>>    - CONFIG_ARM64_16K_PAGES=y
>>>>> and running LTP smoke tests.
>>>>>
>>>>> First seen on Linux next-20241210.
>>>>>     Good: next-20241209
>>>>>     Bad:  next-20241210 and next-20241218
>>>>>
>>>>> qemu-arm64: 9.1.2
>>>>>
>>>>> Anyone noticed this ?
>>>>>
>>>>
>>>> Anders bisected this reported regression and found,
>>>> # first bad commit:
>>>>     [9c1d66793b6faa00106ae4c866359578bfc012d2]
>>>>     btrfs: validate system chunk array at btrfs_validate_super()
>>>
>>> Weird, I run daily fstests with 64K page sized aarch64 VM.
>>>
>>> But never hit a crash on this.
>>>
>>> And the original crash call trace only points back to ext4, not btrfs.
>>>
>
> Yeah.  But it's in the memory allocator so it looks like memory
> corruption.  After the ext4 crash then random other stuff starts
> crashing as well when it allocates memory.
>
>>> Mind to test it with KASAN enabled?
>>
>
> Anders is going to try that later and report back.
>
>> Another thing is, how do you enable both 16K and 64K page size at the
>> same time?
>>
>> The Kconfig should only select one page size IIRC.
>
> Right.  We tested 4k, 16k and 64k.  4k pages worked.
>
>>
>> And for the bisection, does it focus on the test failure or the crash?
>>
>
> The crash.

For the failure part, I got the reason, it's indeed the patch, where we
call btrfs_check_chunk_valid() but fs_info->sectorsize is still in the
default value (4096), not the real one from the superblock.

Thus it will always report false alerts if the on-disk super block is
not using 4K sectorsize.

I'll fix it soon.

But sorry I didn't see why the false alert is related to the crash, the
only new memory allocation done in that patch is for a dummy extent
buffer, which should always be freed.

Anyway in the next version I'll get rid of the memory allocation completely.

Thanks,
Qu
>
> regards,
> dan carpenter
>
>



      parent reply	other threads:[~2024-12-19 23:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18 12:03 Naresh Kamboju
2024-12-18 15:52 ` Naresh Kamboju
2024-12-18 17:57   ` David Sterba
2024-12-18 20:07   ` Qu Wenruo
2024-12-19  0:14     ` Qu Wenruo
2024-12-19 15:10       ` Dan Carpenter
2024-12-19 15:37         ` Dan Carpenter
2024-12-19 23:33           ` Qu Wenruo
2024-12-19 23:20         ` Qu Wenruo [this message]

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=4ae3fd71-c22e-48b6-bc86-fa494a1841a6@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=alex.bennee@linaro.org \
    --cc=anders.roxell@linaro.org \
    --cc=arnd@arndb.de \
    --cc=dan.carpenter@linaro.org \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=regressions@lists.linux.dev \
    --cc=wqu@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox