qemu-aarch64-static "Illegal instruction" with debootstrap
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Richard Henderson |
Bug Description
This is reproducible against QEMU master. I apologize for the long reproduction steps, I tried to distill it down as much as possible.
System info:
# qemu-aarch64-static --version
qemu-aarch64 version 5.2.91 (v6.0.0-
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_
ID=debian
HOME_URL="https:/
SUPPORT_URL="https:/
BUG_REPORT_URL="https:/
# head -n 26 /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz
stepping : 7
microcode : 0x5002f01
cpu MHz : 1000.716
cache size : 22528 KB
physical id : 0
siblings : 32
core id : 0
cpu cores : 16
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke avx512_vnni md_clear flush_l1d arch_capabilities
bugs : spectre_v1 spectre_v2 spec_store_bypass swapgs taa itlb_multihit
bogomips : 4600.00
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
My reproduction steps:
# apt-get install --no-install-
build-essential \
ca-certificates \
debootstrap \
git \
libglib2.0-dev \
libpixman-1-dev \
ninja-build \
pkg-config \
python3 \
zstd
# git clone https:/
# mkdir qemu/build
# cd qemu/build
# ../configure \
--enable-debug \
--enable-
--disable-
--disable-
--disable-
--disable-tools \
--disable-docs \
--disable-gtk \
--disable-
--disable-
--disable-
--disable-
--disable-
--disable-
--disable-vnc \
--disable-kvm \
--disable-
--disable-
--disable-vde \
--disable-sdl \
--disable-
--disable-xen \
--disable-fdt \
--disable-
--disable-
--disable-
--disable-
--disable-
--disable-tpm \
--disable-
--disable-
--disable-zstd \
--disable-
--static \
--target-
# ninja qemu-aarch64
# install -Dm755 qemu-aarch64 /usr/local/
# cat <<'EOF' >/proc/
:qemu-aarch64:
EOF
# debootstrap --arch arm64 --foreign buster debian-rootfs
# chroot debian-rootfs /debootstrap/
Illegal instruction
This prevents me from building an arm64 Debian image on x86_64. If I am doing something wrong, please let me know. The binary has been uploaded for your convenience.
tags: | added: linux-user |
Changed in qemu: | |
status: | Fix Committed → Fix Released |
This won't be the cause of the crash, but: don't run ninja directly. The build instructions (documented in README.rst) haven't changed: run configure, and then run make. The makefile still does some things and is not a pure does-absolutely -nothing wrapper around ninja in all cases.