From: Minchan Kim <minchan@kernel.org>
To: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: open list <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>,
linux-block <linux-block@vger.kernel.org>,
regressions@lists.linux.dev, Jens Axboe <axboe@kernel.dk>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Nitin Gupta <ngupta@vflare.org>
Subject: Re: qemu-arm: zram: mkfs.ext4 : Unable to handle kernel NULL pointer dereference at virtual address 00000140
Date: Tue, 7 Jun 2022 16:52:04 -0700 [thread overview]
Message-ID: <Yp/kpPA7GdbArXDo@google.com> (raw)
In-Reply-To: <CA+G9fYsjn0zySHU4YYNJWAgkABuJuKtHty7ELHmN-+30VYgCDA@mail.gmail.com>
On Tue, Jun 07, 2022 at 06:51:27AM +0530, Naresh Kamboju wrote:
> On Mon, 6 Jun 2022 at 23:06, Minchan Kim <minchan@kernel.org> wrote:
> >
> > On Thu, Jun 02, 2022 at 02:19:34PM +0530, Naresh Kamboju wrote:
> > > The following kernel crash reported while running selftests: zram: zram.sh
> > > test case on qemu-arm with Linux mainline v5.18.0 kernel version.
> > >
> > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> > >
> > > Started noticing from kernel crash from
> > > BAD: git_sha: cdeffe87f790dfd1baa193020411ce9a538446d7
> > > GOOD: git_sha: babf0bb978e3c9fce6c4eba6b744c8754fd43d8e
> > >
> > > # git log --oneline
> > > babf0bb978e3c9fce6c4eba6b744c8754fd43d8e..cdeffe87f790dfd1baa193020411ce9a538446d7
> > > -- drivers/block/
> > > 98931dd95fd4 Merge tag 'mm-stable-2022-05-25' of
> > > git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
> > > 6140ae41effe zram: fix Kconfig dependency warning
> > > b3fbd58fcbb1 mm: Kconfig: simplify zswap configuration
> > > e7be8d1dd983 zram: remove double compression logic
> > > a2ad63daa88b VFS: add FMODE_CAN_ODIRECT file flag
> > > 30226b69f876 zram: add a huge_idle writeback mode
> >
> > Hi Nalesh,
> >
> > Thanks for the reporting the bug!
> >
> > I locally ran the test in my x86 KVM machine but couldn't reproduce it.
> > How is it easy to reproduce? Could you help to bisect it?
>
> It works on qemu_x86-64
> It is always reproducible in qemu arm32 environment.
>
> steps to reproduce:
> # Please download and use this rootfs and kernel zImage
>
> rootfs: https://oebuilds.tuxbuild.com/29zhlbEc3EWq2wod9Uy964Bp27q/images/am57xx-evm/rpb-console-image-lkft-am57xx-evm-20220601222434.rootfs.ext4.gz
> kernel: https://builds.tuxbuild.com/29zhqJJizU2Y7Ka7ArhryUOrNDC/zImage
>
> Boot command,
> /usr/bin/qemu-system-aarch64 -cpu host,aarch64=off -machine
> virt-2.10,accel=kvm -nographic -net
> nic,model=virtio,maaacaddr=BA:DD:AD:CC:09:04 -net tap -m 2048 -monitor
> none -kernel kernel/zImage --append "console=ttyAMA0 root=/dev/vda rw"
> -hda rootfs/rpb-console-image-lkft-am57xx-evm-20220601222434.rootfs.ext4
> -m 4096 -smp 2
>
> # cd /opt/kselftests/default-in-kernel/zram
> # ./zram.sh
>
> Allow me sometime I will try to bisect this problem.
Thanks for sharing the info.
I managed to work your rootfs with my local arm build
based on the problematic git tip.
However, I couldn't suceed to reproduce it.
I needed to build zsmalloc/zram built-in instead of modules
Is it related? Hmm,
Yeah, It would be very helpful if you could help to bisect it.
Thanks!
=== &< ====
create '1' zram device(s)
zram modules already loaded, kernel supports zram-control interface
[ 936.188541] zram: Added device: zram1
all zram devices (/dev/zram1~1 successfully created
set max_comp_streams to zram device(s)
The device attribute max_comp_streams was deprecated in 4.7
set disk size to zram device(s)
/sys/block/zram1/disksize = '1048576'
zram set disksizes: OK
set memory limit to zram device(s)
[ 936.214438] zram1: detected capacity change from 0 to 2048
/sys/block/zram1/mem_limit = '1M'
zram set memory limit: OK
make swap with zram device(s)
[ 936.608854] Adding 1020k swap on /dev/zram1. Priority:-2 extents:1 across:1020k SS
done with /dev/zram1
zram making zram mkswap and swapon: OK
zram swapoff: OK
zram cleanup
[ 937.063416] zram1: detected capacity change from 2048 to 0
[ 937.189223] zram: Removed device: zram1
zram02 : [PASS]
root@am57xx-evm:/opt/kselftests/default-in-kernel/zram# uname -r
5.18.0-11934-g54eb8462f21f
next prev parent reply other threads:[~2022-06-08 0:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 8:49 qemu-arm: zram: mkfs.ext4 : Unable to handle kernel NULL pointer dereference at virtual address 00000140 Naresh Kamboju
2022-06-06 17:36 ` Minchan Kim
2022-06-07 1:21 ` Naresh Kamboju
2022-06-07 23:52 ` Minchan Kim [this message]
2022-06-08 2:39 ` Sergey Senozhatsky
2022-06-08 2:42 ` Sergey Senozhatsky
2022-06-08 2:45 ` Sergey Senozhatsky
2022-06-08 7:36 ` Sergey Senozhatsky
2022-06-12 15:26 ` Naresh Kamboju
2022-06-13 7:54 ` Sergey Senozhatsky
2022-06-13 16:49 ` Minchan Kim
2022-06-14 3:19 ` Sergey Senozhatsky
2022-06-15 16:47 ` Minchan Kim
2022-06-08 20:45 ` Minchan Kim
2022-06-09 11:02 ` Sergey Senozhatsky
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=Yp/kpPA7GdbArXDo@google.com \
--to=minchan@kernel.org \
--cc=axboe@kernel.dk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=naresh.kamboju@linaro.org \
--cc=ngupta@vflare.org \
--cc=regressions@lists.linux.dev \
--cc=senozhatsky@chromium.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