Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 994374 - boot up guest failed, hung in "booting from hard disk"
boot up guest failed, hung in "booting from hard disk"
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.5
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Fam Zheng
Virtualization Bugs
: Regression, TestBlocker
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-07 03:03 EDT by mazhang
Modified: 2015-03-16 05:11 EDT (History)
16 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.386.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 02:07:29 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:1553 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2013-11-20 16:40:29 EST

  None (edit)
Comment 3 Laszlo Ersek 2013-08-07 05:57:02 EDT
I'm proposing

diff --git a/blockdev.c b/blockdev.c
index e4db09f..e99af4a 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -347,7 +347,7 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)
     const char *devaddr;
     DriveInfo *dinfo;
     int is_extboot = 0;
-    BlockIOLimit io_limits;
+    BlockIOLimit io_limits = { 0 };
     int snapshot = 0;
     bool copy_on_read;
Comment 5 Laszlo Ersek 2013-08-07 06:19:32 EDT
cc1: warnings being treated as errors
/builddir/build/BUILD/qemu-kvm-0.12.1.2/blockdev.c: In function 'drive_init':
/builddir/build/BUILD/qemu-kvm-0.12.1.2/blockdev.c:350: error: missing braces around initializer
/builddir/build/BUILD/qemu-kvm-0.12.1.2/blockdev.c:350: error: (near initialization for 'io_limits.bps')

I don't know how much more RETARDED our build configuration can get.

x = { 0 } is a PERFECTLY VALID AND UNIVERSAL initializer, for EVERYTHING.
Comment 6 Fam Zheng 2013-08-07 06:35:17 EDT
Laszlo,

I think this is as simple to have:

diff --git a/blockdev.c b/blockdev.c
index a4c6c37..3af695f 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -618,8 +618,10 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)

     bdrv_set_on_error(dinfo->bdrv, on_read_error, on_write_error);

+#if CONFIG_BLOCK_IO_THROTTLING
     /* disk I/O throttling */
     bdrv_set_io_limits(dinfo->bdrv, &io_limits);
+#endif

     switch(type) {
     case IF_IDE:
Comment 7 Laszlo Ersek 2013-08-07 06:53:40 EDT
Are you sure the BlockDriverState fields "io_limits" and "io_limits_enabled" will default to the same values as bdrv_set_io_limits() would set, for an all-zero io_limits?

The RHEV code would be better matched by

--- a/blockdev.c
+++ b/blockdev.c
@@ -506,6 +506,8 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)
                      "cannot be used at the same time");
         return NULL;
     }
+#else
+    memset(&io_limits, '\0', sizeof io_limits);
 #endif
 
     on_write_error = BLOCK_ERR_STOP_ENOSPC;

In any case, please feel free to take the bug (if we get confirmation that the bug is caused by RHEL-6 commit 6b1eb15c, anyway). I just wanted to give QE a quick Brew build so they can confirm.
Comment 9 Fam Zheng 2013-08-07 07:04:56 EDT
(In reply to Laszlo Ersek from comment #7)
> Are you sure the BlockDriverState fields "io_limits" and "io_limits_enabled"
> will default to the same values as bdrv_set_io_limits() would set, for an
> all-zero io_limits?
> 
> The RHEV code would be better matched by
> 
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -506,6 +506,8 @@ DriveInfo *drive_init(QemuOpts *opts, int
> default_to_scsi)
>                       "cannot be used at the same time");
>          return NULL;
>      }
> +#else
> +    memset(&io_limits, '\0', sizeof io_limits);
>  #endif
>  
>      on_write_error = BLOCK_ERR_STOP_ENOSPC;
> 
> In any case, please feel free to take the bug (if we get confirmation that
> the bug is caused by RHEL-6 commit 6b1eb15c, anyway). I just wanted to give
> QE a quick Brew build so they can confirm.

OK, thanks. I'm taking it.

mazhang, would you please test Laszlo's above build? If it works, I can post the patch to rhvirt-patches.
Comment 10 mazhang 2013-08-07 21:57:09 EDT
OK,I'll test it asap
Comment 11 mazhang 2013-08-07 22:09:54 EDT
Just do a quick test with comment 8 provide build, all interface of virtio-blk virtio-scsi ide works well, boot up guest successfully.
Comment 12 Fam Zheng 2013-08-07 22:47:29 EDT
(In reply to mazhang from comment #11)
> Just do a quick test with comment 8 provide build, all interface of
> virtio-blk virtio-scsi ide works well, boot up guest successfully.

Good, thanks for quick response.
Comment 19 mazhang 2013-08-21 05:42:20 EDT
1.Reproduce this bug on qemu-kvm-0.12.1.2-2.384.el6.x86_64.

steps please refer comment #c0.

Actual results:
guest hung in "Booting from Hard Disk... "

Expected results:
boot up guest


2.Verify this bug on qemu-kvm-0.12.1.2-2.394.el6.x86_64.

steps please refer comment #c0.

Actual results:
boot guest successfully, all kinds of disk interface works well.
Comment 21 errata-xmlrpc 2013-11-21 02:07:29 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-1553.html

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