Bug 434978 - Block device address range checking regression
Block device address range checking regression
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kvm (Show other bugs)
8
x86_64 Linux
high Severity high
: ---
: ---
Assigned To: Daniel Berrange
Fedora Extras Quality Assurance
: Regression
Depends On: CVE-2008-0928
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-26 12:31 EST by Jan Kratochvil
Modified: 2008-02-28 16:40 EST (History)
5 users (show)

See Also:
Fixed In Version: 60-3.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-28 16:40:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Forever-restarting Fedora 8 screenshot. (10.37 KB, image/png)
2008-02-26 12:31 EST, 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 12:33 EST, Jan Kratochvil
no flags Details
A revised block range checking patch (7.72 KB, patch)
2008-02-26 19:05 EST, Daniel Berrange
no flags Details | Diff

  None (edit)
Description Jan Kratochvil 2008-02-26 12:31:49 EST
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@redhat.com> - 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 12:31:49 EST
Created attachment 295958 [details]
Forever-restarting Fedora 8 screenshot.
Comment 2 Jan Kratochvil 2008-02-26 12:33:31 EST
Created attachment 295960 [details]
Finally updated Fedora 8 screenshot on kvm-60-1.fc8.x86_64.
Comment 3 Daniel Berrange 2008-02-26 13:01:32 EST
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 Berrange 2008-02-26 14:31:59 EST
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 14:38:05 EST
Thanks for reproducing it (->no NEEDINFO).
Comment 6 Daniel Berrange 2008-02-26 19:05:40 EST
Created attachment 296004 [details]
A revised block range checking patch
Comment 7 Fedora Update System 2008-02-27 20:03:30 EST
kvm-60-3.fc8 has been submitted as an update for Fedora 8
Comment 8 Fedora Update System 2008-02-28 16:40:21 EST
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.