summary refs log tree commit diff stats
path: root/gitlab/issues/target_riscv/host_x86
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/issues/target_riscv/host_x86')
-rw-r--r--gitlab/issues/target_riscv/host_x86/accel_missing/1911.toml48
1 files changed, 48 insertions, 0 deletions
diff --git a/gitlab/issues/target_riscv/host_x86/accel_missing/1911.toml b/gitlab/issues/target_riscv/host_x86/accel_missing/1911.toml
new file mode 100644
index 00000000..2543070d
--- /dev/null
+++ b/gitlab/issues/target_riscv/host_x86/accel_missing/1911.toml
@@ -0,0 +1,48 @@
+id = 1911
+title = "abnormal segfaults inside qemu-system-riscv64"
+state = "closed"
+created_at = "2023-09-28T09:37:54.957Z"
+closed_at = "2023-10-04T16:19:27.769Z"
+labels = ["Closed::Invalid", "host: x86", "target: riscv"]
+url = "https://gitlab.com/qemu-project/qemu/-/issues/1911"
+host-os = "Arch Linux"
+host-arch = "x86"
+qemu-version = "8.1.1"
+guest-os = "Arch Linux riscv64"
+guest-arch = "riscv64"
+description = """3 tests of Cockatrice segfaults in qemu-system-riscv64 emulator. This is similar to a regression of qemu-riscv64-static I reported: #1908.
+But for qemu-system-riscv64, it doesn't looks like a recent regression because qemu 7.2.1 also fails."""
+reproduce = """To save the time on reproducing this bug, [I uploaded the zstd compressed qcow2 image to google drive](https://drive.google.com/file/d/1-2Wtmq4MlGvTLjmQ7P5vAvNlWg8--jjT/view?usp=sharing). It contains the whole environment, cockatrice source code and built tests.
+
+The password of the root user is `archriscv`.
+
+1. Setup Arch Linux riscv environment: https://github.com/CoelacanthusHex/archriscv-scriptlet https://github.com/felixonmars/archriscv-packages/wiki/Setup-Arch-Linux-RISC-V-using-qemu-system
+2. Start it(with the commandline above, in the boot menu, choose `2:      Linux linux (fallback initramfs)`) and building cockatrice with tests in it. 
+3. Run tests (/root/Cockatrice/build/tests/loading_from_clipboard/loading_from_clipboard_test, /root/Cockatrice/build/tests/carddatabase/filter_string_test, /root/Cockatrice/build/tests/carddatabase/carddatabase_test)
+4. The tests segfault, which is unexpected."""
+additional = """The tests segfault at exactly the same instruction as in #1908:
+
+```
+┌──────────────────────────────────────────────────────────────────────────────┐
+│  > 0x7ffff2cba928  lhu     a2,1248(a2)                                       │
+│    0x7ffff2cba92c  and     a0,a0,127                                         │
+│    0x7ffff2cba930  sll     a2,a2,0x7                                         │
+│    0x7ffff2cba934  add     a0,a0,a2                                          │
+│    0x7ffff2cba938  lui     t2,0xf8000                                        │
+│    0x7ffff2cba93c  lui     a2,0xf5de2                                        │
+│    0x7ffff2cba940  add     a2,a2,-1824                                       │
+│    0x7ffff2cba944  sll     t2,t2,0x14                                        │
+│    0x7ffff2cba948  xor     a2,a2,t2                                          │
+│    0x7ffff2cba94c  sll     t2,a0,0x1                                         │
+│    0x7ffff2cba950  add     a2,a2,t2                                          │
+│    0x7ffff2cba954  lhu     a2,0(a2)                                          │
+│    0x7ffff2cba958  sll     a0,a2,0x3                                         │
+└──────────────────────────────────────────────────────────────────────────────┘
+multi-thre Thread 0x7ffff2cbe0 In:                     L??   PC: 0x7ffff2cba928
+(gdb) bt
+#0  0x00007ffff2cba928 in  ()
+```
+
+It might suggest that 2d708164e0475064e0e2167bd73e8570e22df1e0 is not the true cause of #1908 and this bug shares the same underlying cause with #1908.
+
+Commit 2d708164e0475064e0e2167bd73e8570e22df1e0 LGTM, although it seems that it is copied from the loongarch one and the author forgot to update [the file header](https://gitlab.com/qemu-project/qemu/-/blob/2d708164e0475064e0e2167bd73e8570e22df1e0/linux-user/riscv/target_mman.h#L1-6)."""