Re: apparent race condition in mttcg memory handling

2025-07-22 Thread Michael Tokarev
On 22.07.2025 23:11, Gustavo Romero wrote: ... The reproducer I was using - it was just booting kernel, no user- space is needed. Qemu crashes during kernel init, or it runs fine. I used regular kernel from debian sid:   http://deb.debian.org/debian/pool/main/l/linux-signed-amd64/linux- image-a

Re: apparent race condition in mttcg memory handling

2025-07-22 Thread Gustavo Romero
Hi Michael, On 5/30/25 16:20, Michael Tokarev wrote: Hi! For quite some time (almost whole day yesterday) I'm trying to find out what's going on with mmtcg in qemu.  There's apparently a race condition somewhere, like a use-after-free or something. It started as an incarnation of https://gitla

Re: apparent race condition in mttcg memory handling

2025-07-21 Thread Pierrick Bouvier
On 7/21/25 10:31 AM, Peter Maydell wrote: On Mon, 21 Jul 2025 at 18:26, Pierrick Bouvier wrote: On 7/21/25 10:14 AM, Michael Tokarev wrote: rr is the first thing I tried. Nope, it's absolutely hopeless. It tried to boot just the kernel for over 30 minutes, after which I just gave up. I

Re: apparent race condition in mttcg memory handling

2025-07-21 Thread Peter Maydell
On Mon, 21 Jul 2025 at 18:26, Pierrick Bouvier wrote: > > On 7/21/25 10:14 AM, Michael Tokarev wrote: > > rr is the first thing I tried. Nope, it's absolutely hopeless. It > > tried to boot just the kernel for over 30 minutes, after which I just > > gave up. > > > > I had a similar thing to deb

Re: apparent race condition in mttcg memory handling

2025-07-21 Thread Pierrick Bouvier
On 7/21/25 10:25 AM, Pierrick Bouvier wrote: On 7/21/25 10:14 AM, Michael Tokarev wrote: On 21.07.2025 19:29, Pierrick Bouvier wrote: On 7/21/25 9:23 AM, Pierrick Bouvier wrote: .. looks like a good target for TSAN, which might expose the race without really having to trigger it. https://www.

Re: apparent race condition in mttcg memory handling

2025-07-21 Thread Pierrick Bouvier
On 7/21/25 10:14 AM, Michael Tokarev wrote: On 21.07.2025 19:29, Pierrick Bouvier wrote: On 7/21/25 9:23 AM, Pierrick Bouvier wrote: .. looks like a good target for TSAN, which might expose the race without really having to trigger it. https://www.qemu.org/docs/master/devel/testing/main.html#b

Re: apparent race condition in mttcg memory handling

2025-07-21 Thread Michael Tokarev
On 21.07.2025 19:29, Pierrick Bouvier wrote: On 7/21/25 9:23 AM, Pierrick Bouvier wrote: .. looks like a good target for TSAN, which might expose the race without really having to trigger it. https://www.qemu.org/docs/master/devel/testing/main.html#building-and- testing-with-tsan I think I t

Re: apparent race condition in mttcg memory handling

2025-07-21 Thread Pierrick Bouvier
Hi Michael, On 7/21/25 4:47 AM, Philippe Mathieu-Daudé wrote: (Cc'ing few more developers) On 30/5/25 21:20, Michael Tokarev wrote: Hi! For quite some time (almost whole day yesterday) I'm trying to find out what's going on with mmtcg in qemu.  There's apparently a race condition somewhere, l

Re: apparent race condition in mttcg memory handling

2025-07-21 Thread Pierrick Bouvier
On 7/21/25 9:23 AM, Pierrick Bouvier wrote: Hi Michael, On 7/21/25 4:47 AM, Philippe Mathieu-Daudé wrote: (Cc'ing few more developers) On 30/5/25 21:20, Michael Tokarev wrote: Hi! For quite some time (almost whole day yesterday) I'm trying to find out what's going on with mmtcg in qemu.  The

Re: apparent race condition in mttcg memory handling

2025-07-21 Thread Philippe Mathieu-Daudé
(Cc'ing few more developers) On 30/5/25 21:20, Michael Tokarev wrote: Hi! For quite some time (almost whole day yesterday) I'm trying to find out what's going on with mmtcg in qemu.  There's apparently a race condition somewhere, like a use-after-free or something. It started as an incarnation

Re: apparent race condition in mttcg memory handling

2025-06-04 Thread Michael Tokarev
Here's a typical output with ASan enabled, fwiw: $ ./qemu-system-x86_64 -smp 16 -m 256 -vga none -display none -kernel /boot/vmlinuz-6.12.29-amd64 -append "console=ttyS0" -serial file:/dev/tty -monitor stdio -initrd ~/debvm/initrd ==368707==WARNING: ASan doesn't fully support makecontext/swapco