blob: d1a201b5dd72ac6051b4e59a949332ca3885ef4d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
id = 1659
title = "x86 vm fails to stop on Darwin aarch64 when qemu compiled with -O1/-O2"
state = "closed"
created_at = "2023-05-17T18:19:05.804Z"
closed_at = "2023-06-25T08:25:34.498Z"
labels = ["accel: TCG", "host: arm", "hostos: macOS", "target: i386"]
url = "https://gitlab.com/qemu-project/qemu/-/issues/1659"
host-os = "MacOS Ventura 13.3.1 (a)"
host-arch = "ARM64"
qemu-version = "8.0.0"
guest-os = "Ubuntu 20.04"
guest-arch = "x86"
description = """When compiled with `-O2` or `-O1` qemu process hangs on full VM stopping on macOS aarch64 host if `shutdown -P now` initiated from guest system."""
reproduce = """1. Compile latest qemu version with -O2 (default value) or -O1 passed
2. Run qemu-system-x86_64 with ubuntu image, e.g. https://cloud-images.ubuntu.com/focal/20230215/focal-server-cloudimg-amd64.img and custom cloud-init (for user/password authentication)
3. Wait until image is loaded, connect via vnc or provide login/password in stdio
4. Initiate shutdown with `sudo shutdown -P now`
5. See that VM indefinitely shutdowns
6. Kill VM from host system with kill -9 <qemu-system-x86_64-process-pid>
7. Recompile qemu with -O0
8. Repeat steps 2-4
9. See that vm successfully stopped, and qemu process exited with code 0"""
additional = """I've created thread dump from activity monitor with threads which qemu hanging on, attached below
[sample-qemu-system-x86_64.txt](/uploads/119b89b7f55f4374acb9ae1f9dc2e517/sample-qemu-system-x86_64.txt)
Probably there is some compiler optimisation which prevents qemu threads from receive shutdown signal or appropriate notification from another threads.
The compiler version with which qemu is built:
```bash
% cc --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
```"""
|