Locking fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qemu-kvm (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Precise |
Fix Released
|
Undecided
|
Unassigned | ||
Quantal |
Fix Released
|
Medium
|
Unassigned |
Bug Description
=======
SRU Justification:
1. Impact: two kvm processes can start (conflicting) with the same pidfile
2. Development fix: keep the pidfile locked for duration of qemu-kvm process
3. Stable fix: same as development fix (cherry-pick the patch)
4. Test case:
$ kvm -vnc :1 -pidfile abab &
$ kvm -vnc :2 -pidfile abab
With the patch, the second kvm will exit with the message:
Could not acquire pid file: Resource temporarily unavailable
Without the patch the second kvm will run, overwriting the pid of the first.
5. Regression potential: as mentioned in the patch description, coverity may
complain about the open fd being a leak.
=======
The version of qemu-kvm that's in Precise fails to lock the pidfile like it did in all previous versions, possibly leading to data corruption as it might run twice on the same disk images (depending on the configuration).
Upstream has already fixed this bug in http://
Please apply this patch to the Precise version. Thanks!
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: qemu-kvm 1.0+noroms-
ProcVersionSign
Uname: Linux 3.2.0-26-generic x86_64
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
Date: Tue Jul 10 22:49:05 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
KvmCmdLine: Error: command ['ps', '-C', 'kvm', '-F'] failed with exit code 1: UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
MachineType: Gigabyte Technology Co., Ltd. GA-880GMA-UD2H
ProcEnviron:
TERM=xterm
PATH=(custom, user)
LANG=nl_NL.UTF-8
SHELL=/bin/zsh
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: qemu-kvm
UpgradeStatus: Upgraded to precise on 2012-07-07 (3 days ago)
dmi.bios.date: 06/10/2010
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F3
dmi.board.name: GA-880GMA-UD2H
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSof
dmi.product.name: GA-880GMA-UD2H
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
description: | updated |
Changed in qemu-kvm (Ubuntu Quantal): | |
status: | Triaged → Fix Released |
tags: |
added: verification-done removed: verification-needed |
Thanks for submitting this bug and including the patch. It is fixed in quantal. I'll SRU the patch you attached for precise-updates.