qemu-img convert hangs on Ubuntu Server 16.04 with 100% cpu

Bug #1603902 reported by Igor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned
qemu-kvm (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

When i try to convert raw image to qcow2 format with command:

qemu-img convert -O qcow2 base-image.img base-image.qcow2

i have several problems:

1. qemu-img process never stops by itself and i can not kill it with kill -9
2. qemu-img process utilizes 100% of one cpu core

Additional information:

1. I use supermicro server with 28 cpu cores and host Ubuntu Server 16.04
2. Filesystem is ext4
3. Original VM raw image (with installed guest Ubuntu Server 16.04) works without any problem. When i am trying to convert formats this VM is powered off.

4. uname -r
    4.4.0-28-generic

    dpkg -s qemu-kvm | grep Version
    Version: 1:2.5+dfsg-5ubuntu10.2

    dpkg -s qemu-utils | grep Version
    Version: 1:2.5+dfsg-5ubuntu10.2

    strace qemu-img convert -O qcow2 base-image.img base-image.qcow2
    ...
    lseek(10, 1361051648, SEEK_DATA) = 1386217472
    lseek(10, 1386217472, SEEK_DATA) = 1386217472
    lseek(10, 1386217472, SEEK_HOLE) = 1403359232
    lseek(10, 1403359232, SEEK_DATA) = 1403387904
    lseek(10, 1403387904, SEEK_DATA) = 1403387904
    lseek(10, 1403387904, SEEK_HOLE) = 1419091968
    lseek(10, 1419091968, SEEK_DATA

What can cause such strange behavior, and how can i convert raw image to qcow2 format?

UPDATED: I have installed 4.6.0 linux kernel, and everything works fine right now. But the question still exists: is there any other way to fix this bug for qemu-img and Ubuntu 16.04?
---
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
DistroRelease: Ubuntu 16.04
InstallationDate: Installed on 2016-07-11 (6 days ago)
InstallationMedia: Ubuntu-Server 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.3)
Package: qemu-kvm 1:2.5+dfsg-5ubuntu10.2
PackageArchitecture: amd64
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
Tags: xenial
Uname: Linux 4.6.0-040600-generic x86_64
UnreportableReason: The running kernel is not an Ubuntu kernel
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

_MarkForUpload: True

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for the info.

If updating kernels fixes it, then it's possible, but unlikely, that it can be fixed in userspace. Marking this as affecting the kernel.

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1603902

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Igor (respectre) wrote : Dependencies.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Igor (respectre) wrote : JournalErrors.txt

apport information

Revision history for this message
Igor (igor-ba) wrote :

Appriciate your help!
I have attached apport-collect information, will it be sufficient for now?
I run apport-collect AFTER changed kernel from 4.4.0-28-generic to Linux 4.6.0-040600-generic, becouse i can not shutdown server right now. If it is required i cat try to reproduce bug on another machine.

Revision history for this message
Matt (matt-weeks-4) wrote :

We had something similar happen. It burned CPU for a very long time doing the same lseek stuff, but it eventually succeeded in writing the output file.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks Matt, yeah we actually had no similar report in all the time.
It is unclear to me if there still is something needed in the kernel, but it is unclear which (if any) qemu change needs to be done as there is no external reproducer.
It is good to hear that in your case after working heavily it just resolved itself.

Changed in qemu-kvm (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for qemu-kvm (Ubuntu) because there has been no activity for 60 days.]

Changed in qemu-kvm (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.