Assertion failure (or segmentation fault) running 32-bit x86 Linux guest on 64-bit PowerPC host

Bug #1790018 reported by A. Wilcox on 2018-08-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Qemu 2.12.1 (also tried 2.12.0)
Linux gwyn 4.14.48-mc8-easy #1 SMP Sat Jun 30 23:29:01 CDT 2018 ppc64 GNU/Linux
gcc (Adelie 6.4.0-r9) 6.4.0
GNU assembler (GNU Binutils) 2.30
musl libc (powerpc64) Version 1.1.19

64-bit, 64-thread (16-core) POWER9 server in Big endian mode:
processor : 0
cpu : POWER9, altivec supported
clock : 3000.000000MHz
revision : 2.2 (pvr 004e 1202)


Attempting to install Adélie Linux 32-bit x86 guest on 64-bit PowerPC host using qemu-system-i386.

Command line:

/usr/bin/qemu-system-i386 -cdrom adelie-live-pmmx-1.0-beta1-20180807.iso -hda /dev/gwyn/x86 -m 512 -cpu pentium3

Environment reproduction:

CD image can be obtained at
/dev/gwyn/x86 is an LVM2 logical volume, 4 GB in size, on NVMe storage
Qemu was built from sources on this machine, with some distribution patches applied for musl support (does not affect tcg/ppc/* code); patches and build recipe (which was modified: for recipe patch) can be found at:

Without --enable-debug-tcg:

Thread 5 "qemu-system-i38" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 14090]
0x39fb04787f63db78 in ?? ()
(gdb) bt
#0 0x39fb04787f63db78 in ()
#1 0x00003ffff1cdb160 in code_gen_buffer ()
#2 0x0000000100362048 in cpu_tb_exec (itb=<optimized out>, cpu=<optimized out>) at /usr/src/packages/user/qemu/src/qemu-2.12.1/accel/tcg/cpu-exec.c:169
#3 0x0000000100362048 in cpu_loop_exec_tb (tb_exit=<synthetic pointer>, last_tb=<synthetic pointer>, tb=<optimized out>, cpu=<optimized out>) at /usr/src/packages/user/qemu/src/qemu-2.12.1/accel/tcg/cpu-exec.c:626
#4 0x0000000100362048 in cpu_exec (cpu=<optimized out>) at /usr/src/packages/user/qemu/src/qemu-2.12.1/accel/tcg/cpu-exec.c:734
#5 0x00000001003211b4 in tcg_cpu_exec (cpu=<optimized out>) at /usr/src/packages/user/qemu/src/qemu-2.12.1/cpus.c:1362
#6 0x00000001003211b4 in qemu_tcg_rr_cpu_thread_fn (arg=<optimized out>) at /usr/src/packages/user/qemu/src/qemu-2.12.1/cpus.c:1461
#7 0x00003ffff7fa275c in start (p=0x3fffedb6a810) at src/thread/pthread_create.c:147
#8 0x00003ffff7fae4c8 in __clone () at src/thread/powerpc64/clone.s:43

With --enable-debug-tcg:

Assertion failed: disp == (int16_t) disp (/usr/src/packages/user/qemu/src/qemu-2.12.1/tcg/ppc/ reloc_pc14_val: 204)
zsh: abort qemu-system-i386

A. Wilcox (awilfox) wrote :

This appears to be fixed by 9f754620651d3432114f4bb89c7f12cbea814b3e and present in 3.0.0. Closing.

Changed in qemu:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers