Bug 434978 - Block device address range checking regression
Summary: Block device address range checking regression
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kvm
Version: 8
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
Assignee: Daniel Berrangé
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: CVE-2008-0928
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-02-26 17:31 UTC by Jan Kratochvil
Modified: 2008-02-28 21:40 UTC (History)
5 users (show)

Fixed In Version: 60-3.fc8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-02-28 21:40:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Forever-restarting Fedora 8 screenshot. (10.37 KB, image/png)
2008-02-26 17:31 UTC, Jan Kratochvil
no flags Details
Finally updated Fedora 8 screenshot on kvm-60-1.fc8.x86_64. (9.40 KB, image/png)
2008-02-26 17:33 UTC, Jan Kratochvil
no flags Details
A revised block range checking patch (7.72 KB, patch)
2008-02-27 00:05 UTC, Daniel Berrangé
no flags Details | Diff

Description Jan Kratochvil 2008-02-26 17:31:49 UTC
Description of problem:
After the recent upgrade my Fedora 8 image could no longer boot.

Version-Release number of selected component (if applicable):
kvm-60-2.fc8.x86_64 (broken)
kvm-60-1.fc8.x86_64 (OK)

How reproducible:
Tried once.  (I no longer have the appropriate image now.)

Steps to Reproduce:
1. Install F8 GA into kvm-60-1.fc8.
2. `yum update kernel' in this F8 GA.
3. Shutdown kvm.
4. Upgrade kvm to: kvm-60-2.fc8
5. Start kvm.

Actual results:
/1 primary superblock features different from backup, check forced.
Restarting system.
---> KVM restart
/1 primary superblock features different from backup, check forced.
Restarting system.
---> ad infinitum

Expected results:
/1 primary superblock features different from backup, check forced.
Restarting system.
---> KVM restart
/1: clean, ...

Additional info:
Downgrade to kvm-60-1.fc8.x86_64 really fixed the problem.

Expecting an off-by-one bug in the fix of the Bug 433560:
* Sat Feb 23 2008 Daniel P. Berrange <berrange> - 60-2.fc8
- Fix block device extents check (rhbz #433560)

The message:
  /1 primary superblock features different from backup, check forced.
is right as it happened during the recent F8 kernel update.
But it should happen only once.
Expecting some ext3 superblock backup near the end of the media got ignored.

Used disk image layout:
The partition is aligned to the physical end of the media but it does not exceed it!
in KVM:
/dev/sda:
 geometry      = 509/255/63, sectors = 8192000, start = 0

Disk /dev/sda: 4194 MB, 4194304000 bytes
255 heads, 63 sectors/track, 509 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000d71ca

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         509     4088511   83  Linux

Disk /dev/sda: 255 heads, 63 sectors, 509 cylinders

Nr AF  Hd Sec  Cyl  Hd Sec  Cyl     Start      Size ID
 1 80   1   1    0 254  63  508         63    8177022 83
 2 00   0   0    0   0   0    0          0          0 00
 3 00   0   0    0   0   0    0          0          0 00
 4 00   0   0    0   0   0    0          0          0 00

qemu-img:
file format: qcow2
virtual size: 3.9G (4194304000 bytes)


Expecting this Bug should get cloned across all the Fs/RHELs and for QEMU.

Comment 1 Jan Kratochvil 2008-02-26 17:31:49 UTC
Created attachment 295958 [details]
Forever-restarting Fedora 8 screenshot.

Comment 2 Jan Kratochvil 2008-02-26 17:33:31 UTC
Created attachment 295960 [details]
Finally updated Fedora 8 screenshot on kvm-60-1.fc8.x86_64.

Comment 3 Daniel Berrangé 2008-02-26 18:01:32 UTC
Hmm, I think this could be related to use of QCow files instead of raw.

Can you convert your disk image to raw format using 'qemu-img' and see if the
problem still occurrs.


Comment 4 Daniel Berrangé 2008-02-26 19:31:59 UTC
Ok, I have reproduced this problem. It impacts  QCow2 disks at least - probably
impacts the other Cow related formats too. Raw is not impacted.

In my tests it causes complete & unrecoverable data loss on the guest disk in
question :-(

Comment 5 Jan Kratochvil 2008-02-26 19:38:05 UTC
Thanks for reproducing it (->no NEEDINFO).


Comment 6 Daniel Berrangé 2008-02-27 00:05:40 UTC
Created attachment 296004 [details]
A revised block range checking patch

Comment 7 Fedora Update System 2008-02-28 01:03:30 UTC
kvm-60-3.fc8 has been submitted as an update for Fedora 8

Comment 8 Fedora Update System 2008-02-28 21:40:21 UTC
kvm-60-3.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.


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