1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<think>
Okay, so I'm trying to classify this bug report from QEMU. The user provided the problem, steps to reproduce, output, and a GDB backtrace. Let me go through each part carefully.
First, the issue is that running `grep` inside an x86_64 chroot on an arm64 host using QEMU causes a segmentation fault. The error message mentions "QEMU internal SIGSEGV {code=MAPERR, addr=0x20}". From what I know, SIGSEGV is a segmentation fault, which usually indicates an invalid memory access.
Looking at the GDB backtrace, the first frame points to `open_self_maps_2` in syscall.c. The function name suggests it's dealing with self-maps, probably related to process memory mappings. The next frames go through various functions in user-exec.c and syscall.c, which are parts of QEMU's user-mode emulation.
The problem occurs on arm64 but when running x86_64 code under QEMU. Since the user is using KVM (as suggested by the mention of 7.x.x working without the issue), this is a hypervisor-related environment. The fact that it's happening in QEMU's internal functions during system call handling points towards an issue within the emulation layer.
The backtrace shows calls to `do_guest_openat` and other syscall handling functions, which are part of how QEMU emulates syscalls for the guest OS. Segfaults here often mean a problem with memory management or incorrect translations of system calls from the host architecture (arm64) to the target (x86_64).
The categories given include 'hypervisor', 'kernel', and others. Since this is related to QEMU's internal handling when running as a hypervisor, 'hypervisor' seems like the most fitting category. It's not a translation issue because that would fall under 'mistranslation', but here it's more about how QEMU itself handles certain operations during emulation.
Also, considering that the bug occurs in newer versions (8.x.x) but not in older ones (7.x.x), it might be related to changes in how QEMU handles syscalls or memory management in those versions. The fact that the backtrace shows functions specific to user-mode execution aligns with hypervisor-related issues.
So, putting it all together, the bug is within QEMU's hypervisor functionality when running guest code under KVM.
</think>
hypervisor
|