Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 382329 - app-emulation/xen-4.1.1 crashes dom0 on HVM domU creation
Summary: app-emulation/xen-4.1.1 crashes dom0 on HVM domU creation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Xen Devs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-08 23:13 UTC by Matthias Bethke
Modified: 2011-09-18 12:31 UTC (History)
2 users (show)

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


Attachments
Patch #1 from Ubuntu (upstream-23044:d4ca456c0c25,1.54 KB, patch)
2011-09-08 23:14 UTC, Matthias Bethke
Details | Diff
Patch #2 from Ubuntu (upstream-23104:1976adbf2b80,26.22 KB, patch)
2011-09-08 23:15 UTC, Matthias Bethke
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Bethke 2011-09-08 23:13:02 UTC
I'm using xen-4.1.1 and xen-sources-2.6.38 on a Phenom-II-X6 1090T. Paravirtualized domUs work fine but creating a HVM domU causes an instant reboot of dom0. Here is an example config:

# cat /etc/xen/bsd.cfg 
kernel  = 'hvmloader'
builder = 'hvm'
memory  = 512
vcpus   = 1
name    = "bsd"
disk =  [
    'phy:/dev/raided/beast_root,sda1,w',
    'phy:/dev/raided/beast_swap,sda2,w',
    'file:/media/Share/Misc/FreeBSD-8.2-RELEASE-amd64-disc1.iso,hdc:cdrom,r',
    ]
boot="d"
vnc = 1
sdl = 0
vncconsole=0
vncdisplay=0
keymap="en-us"
device_model='qemu-dm'
stdvga=0
serial='pty'


The bug turned up on the xen-devel mailing list in this thread:
http://lists.xensource.com/archives/html/xen-devel/2011-07/msg00922.html
Apparently they put it down to a problem with gcc-4.6 but it manifests itself here with gcc-4.4.5 as well.

One of the Ubuntu guys backported the fixes that are supposed to be in xen-4.1.2:
https://launchpad.net/ubuntu/oneiric/+source/xen/4.1.1-2ubuntu2

The patches apply cleanly here and appears to fix the problem (I've only tested it for half an hour now but the domU definitely starts w/o problems):
https://launchpad.net/ubuntu/oneiric/+source/xen/4.1.1-2ubuntu2/+files/xen_4.1.1-2ubuntu2.debian.tar.gz


Reproducible: Always

Steps to Reproduce:
1. xl create /etc/xen/bsd.conf # (see above for config file)
2.
3.
Actual Results:  
Machine reboots

Expected Results:  
HVM domU running

# emerge --info
Portage 2.1.10.11 (default/linux/amd64/10.0/desktop, gcc-4.4.5, glibc-2.12.2-r0, 2.6.38-xen x86_64)
=================================================================
System uname: Linux-2.6.38-xen-x86_64-AMD_Phenom-tm-_II_X6_1090T_Processor-with-gentoo-2.0.3
Timestamp of tree: Tue, 06 Sep 2011 03:30:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r1, 3.1.3-r1
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.4.5
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo sunrise perl-experimental matsuu Falco ltsp xen local
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-Os -march=amdfam10 -pipe -fomit-frame-pointer -fno-ident -fforce-addr"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/init.d /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /usr/share/X11/xkb"
CXXFLAGS="-Os -march=amdfam10 -pipe -fomit-frame-pointer -fno-ident -fforce-addr"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/mnt/portage/usr-portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/perl-experimental /var/lib/layman/matsuu /var/lib/layman/falco /var/lib/layman/ltsp /var/lib/layman/xen /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage/"
USE="16bit 3dnow 3dnowext 64bit X a52 aac acl acpi aften alsa amd64 amr amrnb amrwb animgif apng audiofile bash-completion bcmath berkdb bluetooth branding bs2b bzip2 cairo caps cdda cddb cdio cdparanoia cdr cgi cli consolekit cracklib crypt cscope css ctype cups curl curlwrappers cxx dbm dbus dbx dga dirac divx djvu doc dri dts dv dvd dvdnav dvdr dvdread dvi ecc emboss enca encode exif extra-algorithms faac faad fam fastcgi fbcon ffmpeg fftw firefox flac flatfile fontconfig ftp gcj gdbm gdu geoip gif gimp gimpprint glsa glut gmp gnome gnome-keyring gnutls gpg gpgme gphoto2 gpm gps graphics gsl gsm gstreamer gtk gtkhtml hardened helpers httpd humanities hunspell hyperwave-api iconv icq id3tag idea idn imagemagick imap imlib innodb iproute2 iptc ipv6 jabber jack javascript jbig jikes jpeg jpeg2k keyring kpathsea lame latex lcms ldap libgda libnotify libsamplerate libwww lm_sensors lua lvm lzo mad maildir matroska mbox memlimit mikmod mime mmap mmx mmxext mng modplug modules mozilla mp2 mp3 mp4 mpeg mpi mplayer mudflap multilib multitarget musepack musicbrainz mysql mysqli ncurses nls nodrm nptl nptlonly nsplugin ntfs ntp nvtv nxclient offensive ogg openal opencore-amr openexr opengl openmp pam pango pcap pch pcntl pcre pdf perl pie plotutils png pnm policykit posix postgres postproc postscript ppds pppd prelude pstricks python qt3support qt4 quicktime rar readline recode rss rtsp ruby samba scanner schroedinger sdl sdl-sound session sharedmem shout sid slp smime smp sndfile sockets socks5 speex spell sqlite sqlite3 srt sse sse2 ssl ssse3 startup-notification subtitles svg sysfs syslog sysvipc szip t1lib taglib tcpd theora threads tidy tiff truetype udev unicode usb v4l v4l2 vcd vdpau vhosts vim vim-syntax vim-with-x vorbis vpx wavpack wifi wxwindows x264 xattr xcb xcomposite xen xine xinerama xml xmlrpc xmp xorg xosd xpm xprint xrandr xsl xulrunner xv xvid xvmc zip 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 stage tables krita karbon braindump" CAMERAS="canon directory template" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa fbdev nv nvidia" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Matthias Bethke 2011-09-08 23:14:25 UTC
Created attachment 285897 [details, diff]
Patch #1 from Ubuntu
Comment 2 Matthias Bethke 2011-09-08 23:15:37 UTC
Created attachment 285899 [details, diff]
Patch #2 from Ubuntu
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2011-09-09 14:07:54 UTC
please list your use flags for xen-tools && xen
Comment 4 Ian Delaney (RETIRED) gentoo-dev 2011-09-09 14:45:33 UTC
what occurs utilising xm?
Comment 5 Matthias Bethke 2011-09-14 02:05:31 UTC
Here are my USE flags:
app-emulation/xen-4.1.1         -acm -custom-cflags -debug -flask -pae -xsm
app-emulation/xen-tools4.1.1-r1 api doc hvm ioemu pygrub screen -custom-cflags -debug -flask

The effect was the same when using xm.
Now I've been testing the above FreeBSD VM a bit and it seems to run fine if abnormally slow. Raising the number of VCPUs causes kernel panics in FreeBSD but I put that down to FreeBSD's XEN support being crap. Gonna test Windoze for a comparison when I have time.
Comment 6 Ian Delaney (RETIRED) gentoo-dev 2011-09-14 11:39:51 UTC
Matthias;
you're very frugal with your xen flags.  Would suggest to add xsm or flask to xen-4.1.1., and xen-tools flask too, but don't expect that to solve.

Now I've been testing the above FreeBSD VM a bit and it seems to run fine if
abnormally slow.  So the patch has essentially fixed the crash of hvm.
What should dissuade from tying this off resolved?
Comment 7 Alexey Shvetsov archtester gentoo-dev 2011-09-18 12:31:03 UTC
Fixed in -r5