Comment 7 for bug 2051965

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote : Re: [Bug 2051965] Re: QEmu with TCG acceleration (without KVM) causes kernel panics with kernels >=6.3

On Wednesday, February 07 2024, Matthieu Baerts wrote:

> Hi Sergio,
>
> Thank you for your reply!

Thank you for providing the requested details, Matthieu!

>> Since you were bisecting the problem, it seems to me that you have the
> reproducer pretty much nailed already, right? Would you be able to tell
> me so that I can try reproducing the bug locally as well?
>
> I have a reproducer. But that's not a "simple" one. Here is what can be
> done:
>
> # Download the Linux kernel source from kernel.org or git, at least Linux 6.3, ideally a recent one, e.g. v6.7.4
> cd [linux kernel source code]
>
> # modify a test to stop after what triggers the kernel panic (ping)
> sed -i '/ping tests"/a exit $ret' tools/testing/selftests/net/mptcp/mptcp_connect.sh
>
> # to run the ping test max 250 in the next step
> echo 'run_loop_n 250 run_selftest_one mptcp_connect.sh' > .virtme-exec-run
>
> # use a Docker image based on Ubuntu 23.10 including QEmu 8.0.4 with the bug + tools
> # this will build the kernel and dependences, then run 'mptcp_connect.sh' test 250 times
> # docker is used without "--privileged", so KVM will not be used (on purpose)
> docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --rm -it -e INPUT_BUILD_SKIP_PERF=1 \
> --pull always mptcp/mptcp-upstream-virtme-docker:latest \
> auto-normal

That's pretty good :-). It doesn't need to be really simple; it just
needs to be described clearly, which you did perfectly.

Unfortunately I haven't had the time to test the steps you outlined
today, but I will find some time to do it tomorrow and let you know how
it goes.

> I don't have a simple C program to reproduce this concurrency bug. Is it
> an issue?

Nope, it's not an issue at all. If I succeed in reproducing the bug by
following the steps above, then we're fine and I can start writing the
SRU text right away.

>> Meanwhile, I'll see about checking the commits you mentioned and start
> backporting them.
>
> Thanks! Do not hesitate to look at commits from https://gitlab.com/matttbe/qemu/-/commits/lp-2051965/
> But that's the first time I'm looking at QEmu code, I hope I fixed the conflicts properly.

I'll certainly look at your commits. Thanks for the initial backporting
work, btw. It will be helpful when comparing my results.

Again, thanks a lot for the excellent bug report. I'll look into it
more carefully tomorrow, but I wanted to give you a "sign of life" just
in case.

Cheers,

--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14