Bug 553689 - qemu-kvm goes into infinite loop at start up
qemu-kvm goes into infinite loop at start up
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: qemu (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Glauber Costa
Fedora Extras Quality Assurance
:
: 553138 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-08 12:01 EST by Richard W.M. Jones
Modified: 2010-01-12 10:15 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-01-12 10:15:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
strace output (1.42 MB, text/plain)
2010-01-08 12:05 EST, Richard W.M. Jones
no flags Details

  None (edit)
Description Richard W.M. Jones 2010-01-08 12:01:51 EST
Description of problem:

libguestfs starts qemu like this:

/usr/bin/qemu-kvm \
    -drive file=test1.img,cache=off,if=virtio \
    -drive file=test2.img,cache=off,if=virtio \
    -drive file=test3.img,cache=off,if=virtio \
    -drive file=../images/test.iso,snapshot=on,if=virtio \
    -nodefaults \
    -nographic \
    -serial stdio \
    -m 500 \
    -no-reboot \
    -no-hpet \
    -net user,vlan=0,net=10.0.2.0/8 \
    -net nic,model=ne2k_pci,vlan=0 \
    -kernel /tmp/kernel \
    -initrd /tmp/initrd \
    -append 'panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_vmchannel=tcp:10.0.2.2:50411 guestfs_verbose=1 '

qemu-kvm goes into an infinite loop (strace coming up).

Version-Release number of selected component (if applicable):

qemu-0.12.1.2-2.fc13

How reproducible:

Always.

Steps to Reproduce:
1. Install libguestfs 1.0.80
2. Run libguestfs-test-tool
or:
1. Build libguestfs from upstream sources
2. 'LIBGUESTFS_DEBUG=1 make check'
  
Actual results:

qemu goes into an infinite loop, does not proceed.

Expected results:

Works.

Additional info:

This happens *both* where hardware virt is available, and when I
run it in a virtual machine (no hardware virt available).
Comment 1 Richard W.M. Jones 2010-01-08 12:05:58 EST
Created attachment 382500 [details]
strace output

'strace' showing where it gets stuck.

Note the SIGTERM is where I killed qemu in the end.  It's the
repeated group of system calls above that which is where it is
looping:

1262969525.801686 select(17, [0 5 8 14 16], [], [], {1, 0}) = 1 (in [16], left {0, 999937})
1262969525.801784 read(16, "\16\0\0\0\0\0\0\0\376\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 128) = 128
1262969525.801815 rt_sigaction(SIGALRM, NULL, {0x40bc60, ~[KILL STOP RTMIN RT_1], SA_RESTORER, 0x7fba1993e0f0}, 8) = 0
1262969525.801850 write(6, "\0", 1)     = 1
1262969525.801875 write(15, "\1\0\0\0\0\0\0\0", 8) = 81262969525.801900 read(16, 0x7fff8f550160, 128) = -1 EAGAIN (Resource temporarily unavailable)1262969525.801923 timer_gettime(0, {it_interval={0, 0}, it_value={0, 0}}) = 0
1262969525.801950 timer_settime(0, 0, {it_interval={0, 0}, it_value={0, 30000000
}}, NULL) = 0
1262969525.801979 select(17, [0 5 8 14 16], [], [], {1, 0}) = 2 (in [5 14], left {0, 999997})
1262969525.802015 read(14, "\1\0\0\0\0\0\0\0", 4096) = 8
1262969525.802040 read(14, 0x7fff8f54f1f0, 4096) = -1 EAGAIN (Resource temporarily unavailable)
1262969525.802063 read(5, "\0", 512)    = 1
1262969525.802088 read(5, 0x7fff8f54fff0, 512) = -1 EAGAIN (Resource temporarily unavailable)
Comment 2 Richard W.M. Jones 2010-01-08 12:06:49 EST
File descriptors during loop:

lrwx------ 1 rjones rjones 64 2010-01-08 16:45 0 -> /dev/pts/0
lrwx------ 1 rjones rjones 64 2010-01-08 16:45 1 -> /dev/pts/0
lrwx------ 1 rjones rjones 64 2010-01-08 16:45 10 -> /home/rjones/d/libguestfs/capitests/test3.img
lrwx------ 1 rjones rjones 64 2010-01-08 16:45 11 -> /tmp/vl.dDlwzh (deleted)
lrwx------ 1 rjones rjones 64 2010-01-08 16:45 12 -> /home/rjones/d/libguestfs/images/test.iso
lrwx------ 1 rjones rjones 64 2010-01-08 16:45 13 -> anon_inode:kvm-vcpu
lrwx------ 1 rjones rjones 64 2010-01-08 16:45 14 -> anon_inode:[eventfd]
lrwx------ 1 rjones rjones 64 2010-01-08 16:45 15 -> anon_inode:[eventfd]
lrwx------ 1 rjones rjones 64 2010-01-08 16:45 16 -> anon_inode:[signalfd]
lrwx------ 1 rjones rjones 64 2010-01-08 16:44 2 -> /dev/pts/0
lrwx------ 1 rjones rjones 64 2010-01-08 16:45 3 -> /dev/kvm
lrwx------ 1 rjones rjones 64 2010-01-08 16:45 4 -> anon_inode:kvm-vm
lr-x------ 1 rjones rjones 64 2010-01-08 16:45 5 -> pipe:[101128]
l-wx------ 1 rjones rjones 64 2010-01-08 16:45 6 -> pipe:[101128]
lrwx------ 1 rjones rjones 64 2010-01-08 16:45 7 -> /home/rjones/d/libguestfs/capitests/test1.img
lrwx------ 1 rjones rjones 64 2010-01-08 16:45 8 -> anon_inode:[signalfd]
lrwx------ 1 rjones rjones 64 2010-01-08 16:45 9 -> /home/rjones/d/libguestfs/capitests/test2.img
Comment 3 Richard W.M. Jones 2010-01-08 12:20:41 EST
The smallest reproducer for this is just:

/usr/bin/qemu-kvm

(as non-root, no other parameters).

strace that process to observe the problem.
Comment 4 Richard W.M. Jones 2010-01-08 12:23:24 EST
*** Bug 553138 has been marked as a duplicate of this bug. ***
Comment 5 Justin M. Forbes 2010-01-12 10:15:39 EST
This is a problem with qemu 0.12 trying to use the bochs bios when it expects seabios.  Seabios has made it through the package review process, and has now been built for rawhide and virt-preview.  Qemu was changed to require and point to seabios.

Note You need to log in before you can comment on or make changes to this bug.