Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 431444 - app-emulation/qemu-kvm-1.1.1-r3 causes kernel panic in guest-vm
Summary: app-emulation/qemu-kvm-1.1.1-r3 causes kernel panic in guest-vm
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo QEMU Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-14 22:40 UTC by Philipp Periventas
Modified: 2013-01-27 06:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Periventas 2012-08-14 22:40:34 UTC
The qemu-kvm-1.1.1-r3 build causes a kernel panic in the guest vm while booting, when the parameter "-cpu host" is used for qemu-kvm. The message for the kernel panic while booting the guest vm is: "Kernel panic - not syncing: Boot APIC ID in local APIC unexpected (-1 vs 0)"

I tried out to boot two different guest OS: 
- Debian Squeeze Installer Image (shows only a blank screen after the bootloader)
- Sysresccd Live CD, using the 64 bit kernel. It showed the "Boot-APIC" error from above.

These are the parameters I used to launch the vm:

qemu-kvm \
        -cpu host \
        -smp 2 \
        -m 1G \
        -drive file=/dev/vg/test,cache=none,aio=native,if=virtio \
        -vnc 127.0.0.1:2 -k de \
        -monitor stdio

If the "-cpu host" parameter is omitted, the guest linux boots normally. 

I downgraded to qemu-kvm-1.1.1-r1, which works fine, including the "-cpu host" parameter.

Reproducible: Always

Steps to Reproduce:
1. emerge qemu-kvm-1.1.1-r3
2. launch a guest linux with "-cpu host" parameter
Actual Results:  
The kernel of the guest linux should trigger a kernel panic.

Expected Results:  
It should boot the kernel.

# emerge --info
Portage 2.1.11.9 (default/linux/amd64/10.0, gcc-4.6.3, glibc-2.15-r2, 3.3.8-gentoo x86_64)
=================================================================
System uname: Linux-3.3.8-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.1
Timestamp of tree: Tue, 14 Aug 2012 19:30:01 +0000
app-shells/bash:          4.2_p20
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.27
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cups cxx device-mapper dri fortran gdbm gpm iconv ipv6 lvm mmx modules mudflap multilib ncurses nls nptl openmp pam pcre pppd qemu readline session sse sse2 ssl tcpd unicode zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="lvm mdraid" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2012-08-16 20:38:35 UTC
As I mentioned it to the users that have e-mailed me about this bug. I am unfortunately unable to reproduce the issue. There's a total of 8 patches in -r3 and 2 of the 8 are in -r1. Anyone who can duplicate this issue, please bisect the changes to identify the exact patch that's causing a problem.

Most likely its related to enablement on specific hardware. I notice in the bug report that you're using an Core i7 Ivy Bridge. None of the users that have e-mailed me have responded with the hardware that they are using but my money is on Sandy Bridge or Ivy Bridge hardware.
Comment 2 Philipp Periventas 2012-08-16 22:16:33 UTC
It seems that the evil patch is 0003-qemu-kvm-Fix-default-machine-options, I've tested it and after applying that patch, the kernel panic in the guest occurs. The other patches don't seem to produce that error. Thanks to hasufell on the Freenode #gentoo irc channel for helping me on how to test this.
Comment 3 Stefan Briesenick (RETIRED) gentoo-dev 2012-09-06 11:52:27 UTC
(In reply to comment #1)
> Most likely its related to enablement on specific hardware. I notice in the
> bug report that you're using an Core i7 Ivy Bridge. None of the users that
> have e-mailed me have responded with the hardware that they are using but my
> money is on Sandy Bridge or Ivy Bridge hardware.

I saw this problem also with Sandy/Ivy-Bridge. Both have "avx". But as soon as you disable "avx" support within the VM, it works. All other flags seems to be fine... So try to filter "avx" and see if it works for you.
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2012-10-29 06:52:11 UTC
Please try a newer version. I honestly can't remember if something has been backported for the APIC.
Comment 5 Philipp Periventas 2012-11-01 13:32:15 UTC
It still occurs on qemu-1.1.2-r2. I tried to boot sysresccd-3.0.0 as well as a Ubuntu Server 12.04, however Ubuntu just shows a blank screen.
Comment 6 Denis Kaganovich 2012-11-11 08:13:24 UTC
(In reply to comment #3)
> I saw this problem also with Sandy/Ivy-Bridge. Both have "avx". But as soon
> as you disable "avx" support within the VM, it works. All other flags seems
> to be fine... So try to filter "avx" and see if it works for you.
HMM. Filtering "avx" for qemu CPU don't help to me. I trying various CPUs - black screen under windows. May be filtering "avx" need for qemu build? I not try it - this single avx machine need in work with windows vm's and not directly in my department... If I once try - I say.
Comment 7 Doug Goldstein (RETIRED) gentoo-dev 2013-01-27 06:26:20 UTC
Please retest with 1.2.2-r2.