Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 407675 - app-emulation/qemu-kvm USE=curl - ISO image URLs never finish loading
Summary: app-emulation/qemu-kvm USE=curl - ISO image URLs never finish loading
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-03-10 13:10 UTC by Markus Hauschild
Modified: 2013-02-10 17:39 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 Markus Hauschild 2012-03-10 13:10:55 UTC
qemu-kvm hangs when using an http iso image as cdrom which should work with qemu-kvm and the curl use-flag enabled

Reproducible: Always

Steps to Reproduce:
1. USE="curl" emerge qemu-kvm
2. qemu-kvm -m 1024 -cdrom http://distfiles.gentoo.org/releases/amd64/current-iso/install-amd64-minimal-20120223.iso
Actual Results:  
qemu-kvm uses ~100% CPU, no SDL window ever comes up (does not matter if root or not)

Expected Results:  
qemu-kvm boots as if the iso came from a local filesystem or at least gives some meaningful error

# emerge --info qemu-kvm
Portage 2.1.10.44 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.13-r4, 3.2.0-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.2.0-gentoo-x86_64-AMD_Phenom-tm-_II_X4_940_Processor-with-gentoo-2.0.3
Timestamp of tree: Sat, 10 Mar 2012 11:15:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2, 4.6.2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.2-r1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo gamerlay-stable x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
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"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/distfiles"
EMERGE_DEFAULT_OPTS="-j2"
FEATURES="assume-digests binpkg-logs buildpkg distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://de-mirror.org/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/local/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/gamerlay /usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib acl acpi alsa amd64 bash-completion bazaar bzip2 cairo cdda cdr cli consolekit cracklib crypt cxx dbus dri dts dvd dvdr dvdread encode faac faad fakevim ffmpeg flac fontconfig gif git gtk iconv iproute2 ipv6 jabber java java6 jpeg kde kpathsea lastfm latex libnotify lvm mad matroska mercurial mmx mmxext modules mp3 mp4 mpeg msn mudflap multilib ncurses nfs nls nptl nptlonly nsplugin nvidia ogg openal opengl openmp oscar pam pcre pdf perl png policykit pppd python qemu qt3support qt4 rdp readline samba sdl session smp sse sse2 sse3 sse4a ssl startup-notification subversion svg sysfs tcpd threads tiff truetype udev unicode vdpau vnc vorbis x264 xcb xinerama xorg xv xvid xvmc 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="ptp2" 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="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="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, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

app-emulation/qemu-kvm-1.0-r3 was built with the following:
USE="aio alsa curl (multilib) ncurses opengl sdl threads vhost-net -bluetooth -brltty -debug (-esd) -fdt -pulseaudio -qemu-ifup (-rbd) -sasl -smartcard -spice -static -test -tls -usbredir -vde -xattr -xen" QEMU_SOFTMMU_TARGETS="x86_64 (-arm) -cris -i386 (-m68k) -microblaze (-mips) -mips64 -mips64el -mipsel (-ppc) (-ppc64) -ppcemb -sh4 -sh4eb (-sparc) -sparc64" QEMU_USER_TARGETS="(-alpha) (-arm) -armeb -cris -i386 (-m68k) -microblaze (-mips) -mipsel (-ppc) (-ppc64) -ppc64abi32 -sh4 -sh4eb (-sparc) -sparc32plus -sparc64 -x86_64"
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2012-07-08 20:47:01 UTC
I can't duplicate this at all with the same command line (updating the ISO file to current one). For me it starts up on VNC by default however. But this worked fine. The only USE flag difference for us is SPICE but that shouldn't matter here. It took a little bit with 60% CPU usage while the ISO was downloaded before VNC was active however.

Try attaching gdb to the process and see what's going on and reopen with some gdb traces.
Comment 2 Markus Hauschild 2012-09-13 22:21:56 UTC
How would I do that? Simply rebuilding qemu-kvm with USE="debug" is not enough it seems (at least with ctrl+c and bt I only see addresses and ??).

Strace shows some HTTP/1.1 200 OK and it seems a few KiB are going over the network but that's it. Still looks like a deadlock (close to 100% CPU usage).

SDL/VNC/curses - makes no difference.
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2012-12-05 21:27:05 UTC
(In reply to comment #2)
> How would I do that? Simply rebuilding qemu-kvm with USE="debug" is not
> enough it seems (at least with ctrl+c and bt I only see addresses and ??).
> 
> Strace shows some HTTP/1.1 200 OK and it seems a few KiB are going over the
> network but that's it. Still looks like a deadlock (close to 100% CPU usage).
> 
> SDL/VNC/curses - makes no difference.

Look at the backtrace guide. You'll likely have to rebuild qemu and curl.

http://www.gentoo.org/proj/en/qa/backtraces.xml
Comment 4 Markus Hauschild 2012-12-22 02:42:34 UTC
I have a problem debugging qemu.
I added "-ggdb" to my CFLAGS and "nosplit" to FEATURES.
I also set USE="debug" for emerge curl qemu.

It seems qemu uses PIE when linking which leads to the following problem with gdb:

# gdb /usr/bin/qemu-system-x86_64
GNU gdb (Gentoo 7.5 p1) 7.5 [...]
Reading symbols from /usr/bin/qemu-system-x86_64...done.
(gdb) start -m 1024 -curses -cdrom http://distfiles.gentoo.org/releases/amd64/current-iso/install-amd64-minimal-20121210.iso
Temporary breakpoint 1 at 0x73900: file /var/tmp/portage/app-emulation/qemu-1.2.1/work/qemu-kvm-1.2.0/vl.c, line 2346.
Starting program: /usr/bin/qemu-system-x86_64 
Warning:
Cannot insert breakpoint -1.
Error accessing memory address 0x2cab70: Input/output error.


However I also can not emerge qemu with LDFLAGS="-nopie" (fails in congfigure phase)

How would I proced??
Comment 5 Doug Goldstein (RETIRED) gentoo-dev 2013-01-12 03:57:48 UTC
What version did this happen on? I'm willing to bet it was something with curl and you've got a newer version now and its fixed.
Comment 6 Doug Goldstein (RETIRED) gentoo-dev 2013-02-10 17:39:30 UTC
Retest with the latest stable version. I know there's a newer verison of curl and qemu.