Bug 501412 - f11 kvm guest install exits after package install completes
f11 kvm guest install exits after package install completes
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: qemu (Show other bugs)
11
i386 Linux
high Severity high
: ---
: ---
Assigned To: Mark McLoughlin
Fedora Extras Quality Assurance
https://fedoraproject.org/wiki/Common...
: CommonBugs
: 499740 505577 505840 (view as bug list)
Depends On:
Blocks: F11VirtTarget
  Show dependency treegraph
 
Reported: 2009-05-18 22:26 EDT by Liam Li
Modified: 2009-09-02 05:48 EDT (History)
19 users (show)

See Also:
Fixed In Version: 0.10.5-2.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 503029 (view as bug list)
Environment:
Last Closed: 2009-06-15 22:28:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
virt-manager.log (535.90 KB, text/plain)
2009-05-26 00:53 EDT, Liam Li
no flags Details
f11 log (661.66 KB, text/plain)
2009-05-26 01:00 EDT, Liam Li
no flags Details
anaconda.log (17.54 KB, image/png)
2009-05-26 15:58 EDT, Bill Nottingham
no flags Details
storage.log (14.93 KB, image/jpeg)
2009-05-26 15:58 EDT, Bill Nottingham
no flags Details
program.log (14.20 KB, image/png)
2009-05-26 15:59 EDT, Bill Nottingham
no flags Details
qemu screenshot (8.14 KB, image/png)
2009-05-26 22:13 EDT, Chuck Ebbert
no flags Details
prevent-cdrom-media-eject-while-device-is-locked.patch (3.61 KB, patch)
2009-05-27 05:37 EDT, Mark McLoughlin
no flags Details | Diff

  None (edit)
Description Liam Li 2009-05-18 22:26:39 EDT
Description of problem:
f11 installation  hangs up after all packages installed  in kvm. when all packages are installed ,the installer should go next step to reboot the system.

Version-Release number of selected component (if applicable):
virt-manager-0.7.0-4.fc11.i586

How reproducible:
100%

Steps to Reproduce:
1. create a VM in kvm to install f11
2. All select default, after all packages install finished,the installation hung up there and system did not reboot automatically.
3.
  
Actual results:
when all packages are installed ,the installer should go next step to reboot the system.We need to force shut off the system and restart.We can start the system ,but mouse and keyboard do not work, it's another bug.

Expected results:


Additional info:
Comment 1 Mark McLoughlin 2009-05-25 10:31:06 EDT
What version of libvirt and qemu is this?

Please include ~/.virt-manager/virt-manager.log and the guest log from /var/log/libvirt/qemu/

What version of F11 is this? Beta?
Comment 2 Liam Li 2009-05-26 00:53:48 EDT
Created attachment 345387 [details]
virt-manager.log
Comment 3 Liam Li 2009-05-26 01:00:59 EDT
Created attachment 345388 [details]
f11 log
Comment 4 Liam Li 2009-05-26 01:02:23 EDT
[root@dhcp-66-70-91 iso]# rpm -qa |grep qemu
qemu-system-cris-0.10.4-5.fc11.i586
qemu-0.10.4-5.fc11.i586
qemu-common-0.10.4-5.fc11.i586
qemu-system-sparc-0.10.4-5.fc11.i586
qemu-system-x86-0.10.4-5.fc11.i586
qemu-system-mips-0.10.4-5.fc11.i586
qemu-kvm-0.10.4-5.fc11.i586
qemu-user-0.10.4-5.fc11.i586
qemu-system-arm-0.10.4-5.fc11.i586
qemu-system-ppc-0.10.4-5.fc11.i586
qemu-img-0.10.4-5.fc11.i586
qemu-debuginfo-0.10.4-5.fc11.i586
qemu-system-sh4-0.10.4-5.fc11.i586
qemu-kvm-tools-0.10.4-5.fc11.i586
qemu-system-m68k-0.10.4-5.fc11.i586

logs, please see attachments.
Thanks
Comment 5 Mark McLoughlin 2009-05-26 10:54:03 EDT
Okay, confirmed with rc0.1

To clarify a little further:

  - x86_64 KVM guest install from DVD ISO

  - When anaconda finishes installing packages, it doesn't wait at the
    install screen

  - The guest fails to reboot

Adding to F11VirtBlocker and re-assigning to anaconda
Comment 6 Bill Nottingham 2009-05-26 15:57:40 EDT
I don't think this is an anaconda bug, at least not directly.

A text mode install shows the following happening around the time of bootloader installation (on /dev/vda):

ata2.00: exception Emask 0x0 SACt 0x0 SErr 0x0 action 0x6
ata2.00: cmd a0/00:00:00:00:00:/00:00:00:00:00/a0 tag 0
         cdb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
         res 01/60:00:00:00:00:00:/00:00:00:00:00/a0 Emask 0x3 (HSM violation)
ata2.00: status: {ERR}
ata2: soft resetting link
ata2.01: NODEV after polling detection
ata2.00: configured for MWDMA2
ata2: EH complete
VFS: busy inodes on changed media or resized disk sr0
... <large amounts of VFS and squashfs errors follow>
Comment 7 Bill Nottingham 2009-05-26 15:58:26 EDT
Created attachment 345509 [details]
anaconda.log

tail of anaconda.log. Can't actually get it off the box due to no CD filesystem.
Comment 8 Bill Nottingham 2009-05-26 15:58:50 EDT
Created attachment 345510 [details]
storage.log
Comment 9 Bill Nottingham 2009-05-26 15:59:11 EDT
Created attachment 345511 [details]
program.log
Comment 10 Bill Nottingham 2009-05-26 16:11:03 EDT
In text mode, you still get the reboot button (which may happen to work, due to the paged-in-ness of the installer).

In GUI mode, you'll see the hang because the install exits abnormally when X SIGBUSes after the CD error.
Comment 11 Bill Nottingham 2009-05-26 16:12:18 EDT
Bouncing back to KVM for now. Could also be kernel.
Comment 12 Bill Nottingham 2009-05-26 16:22:50 EDT
Of note, in the host dmesg:

kvm: 2788: cpu0 unhandled wrmsr: 0xc0010117 data 0
kvm: 2788: cpu0 unhandled rdmsr: 0xc0010117
kvm: 2788: cpu0 unhandled rdmsr: 0xc0010117
Comment 13 Bill Nottingham 2009-05-26 17:04:36 EDT
While it occurs about the time the bootloader is installed, it's reproducible on installs where 'no bootloader' is selected.
Comment 14 Bill Nottingham 2009-05-26 17:09:36 EDT
Looking at the anaconda log, bad things happen around/near step 'methodcomplete':

def doMethodComplete(anaconda):
    def _ejectDevice():
        # Ejecting the CD/DVD for kickstart is handled only after %post scripts
        # have been run.
        if anaconda.isKickstart:
            return None

        if anaconda.mediaDevice:
            return anaconda.id.storage.devicetree.getDeviceByName(anaconda.mediaDevice)

        # If we booted off the boot.iso instead of disc 1, eject that as well.
        if anaconda.stage2 and anaconda.stage2.startswith("cdrom://"):
            dev = anaconda.stage2[8:].split(':')[0]
            return anaconda.id.storage.devicetree.getDeviceByName(dev)

    anaconda.backend.complete(anaconda)
    dev = _ejectDevice()
    if dev:
        dev.eject()

So, somewhere in the kernel, or the virtual CD emulation, we're not returning -EBUSY on eject?
Comment 15 Bill Nottingham 2009-05-26 17:11:10 EDT
Confirmed - just running 'eject /dev/sr0' from tty2 triggers it.
Comment 16 Bill Nottingham 2009-05-26 17:49:35 EDT
On a 'normal' DVD based install, the ioctl to eject returns EIO.

On a virt DVD based install, it succeeds and 'ejects' the device, causing mayhem. So it does appear qemu/kvm is at fault somehow.
Comment 17 Bill Nottingham 2009-05-26 17:56:39 EDT
Given that this also occurs when installing on a F10 host, this looks to be a longstanding qemu/kvm issue. Removing from the blocker list.
Comment 18 Chuck Ebbert 2009-05-26 22:13:03 EDT
Created attachment 345550 [details]
qemu screenshot

I played around with an F10 netinst image I had around and was able to go to the shell during install and eject the CD. Attached screenshot shows the block device info from the qemu console before and after running the eject command.
Comment 19 Daniel Berrange 2009-05-27 05:14:24 EDT
Wonder if this is a result of interactions in QEMU's IDE CDROM emulation for eject/tray locking. QEMU appears to support the IDE commands for 'eject' and 'lock tray', but the implementation of the 'eject' method doesn't appear to check if the tray is marked as locked. Perhaps anaconda is relying on the eject command failing if the tray is locked ?
Comment 20 Mark McLoughlin 2009-05-27 05:37:05 EDT
Created attachment 345586 [details]
prevent-cdrom-media-eject-while-device-is-locked.patch

Thanks for tracking this down Bill

danpb: yeah, that's it - I've already posted a patch to qemu-devel and it fixes the problem
Comment 22 Bill Nottingham 2009-05-28 23:51:44 EDT
*** Bug 499740 has been marked as a duplicate of this bug. ***
Comment 23 Mark McLoughlin 2009-06-03 11:06:55 EDT
No response from upstream yet, going ahead and build this with the fix:

* Wed Jun  3 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10.5-2
- Prevent locked cdrom eject - fixes hang at end of anaconda installs (#501412)
- Fix crash with '-net socket,listen=...' (#501264)
- Avoid harmless 'unhandled wrmsr' warnings (#499712)
Comment 24 Fedora Update System 2009-06-03 12:21:02 EDT
qemu-0.10.5-2.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/qemu-0.10.5-2.fc11
Comment 25 Bug Zapper 2009-06-09 12:05:18 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 26 Bill Nottingham 2009-06-12 16:11:51 EDT
*** Bug 505577 has been marked as a duplicate of this bug. ***
Comment 27 Fedora Update System 2009-06-15 22:27:59 EDT
qemu-0.10.5-2.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 28 Mark McLoughlin 2009-06-19 06:48:13 EDT
For reference, this patch did get applied upstream:

http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=commitdiff;h=aea2a33c73
Comment 29 Mark McLoughlin 2009-06-19 06:59:58 EDT
*** Bug 505840 has been marked as a duplicate of this bug. ***
Comment 30 Leo Carreon 2009-09-02 05:48:05 EDT
I am experiencing the same problem installing Fedora 11 64-bit onto VMware Workstation 6.5.  I am using Fedora 11 obtained using Fedora-11-x86_64-DVD.torrent dated 2009-06-09.  Does this version have the fix or is another version going to be released?  When will the fixed version be available?

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