Bug 610341 - fork causes trouble for vcpu threads
Summary: fork causes trouble for vcpu threads
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm   
(Show other bugs)
Version: 5.5
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Keywords: ZStream
Depends On: 606953
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-02 06:21 UTC by RHEL Product and Program Management
Modified: 2013-01-09 22:48 UTC (History)
12 users (show)

Fixed In Version: kvm-83-164.el5_5.14
Doc Type: Bug Fix
Doc Text:
In the kvm kernel module, some internal KVM memory slots were incorrectly being handled by copy-on-write after a fork() function call, which caused issues when qemu-kvm ran child processes. This update fixes the handling of internal KVM memory slots on fork() to avoid those issues.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-29 05:49:42 UTC
Type: ---
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 RHBA-2010:0536 normal SHIPPED_LIVE kvm bug fix update 2010-07-29 05:49:39 UTC

Description RHEL Product and Program Management 2010-07-02 06:21:56 UTC
This bug has been copied from bug #606953 and has been proposed
to be backported to 5.5 z-stream (EUS).

Comment 6 Cao, Chen 2010-07-06 10:01:12 UTC
using migrate with protocol exec

reproduced on:
# cat /sys/module/kvm/version
kvm-83-164.el5_5.13


verified on:
# cat /sys/module/kvm/version
kvm-83-164.el5_5.14


source vm command:
qemu-kvm -name 'vm1' -monitor stdio -drive file=./RHEL-Server-6.0-64.qcow2,if=ide,cache=none -m 2048 -smp 1  -redir tcp:5000::22 -vnc :1  -usbdevice tablet -rtc-td-hack -cpu qemu64,+sse2 -no-kvm-pit-reinjection -serial unix:/tmp/serial-20100621-154308-EK1X,server,nowait -no-hpet

dst vm command:
qemu-kvm -name 'vm1' -monitor stdio -drive file=./RHEL-Server-6.0-64.qcow2,if=ide,cache=none -m 2048 -smp 1  -redir tcp:5000::22 -vnc :1  -usbdevice tablet -rtc-td-hack -cpu qemu64,+sse2 -no-kvm-pit-reinjection -serial unix:/tmp/serial-20100621-154308-EK1X,server,nowait -no-hpet -incoming "exec: gzip -c -d STATEFILE.gz"


migrating command:
migrate "exec:gzip -c > STATEFILE.gz"

Comment 10 Eduardo Habkost 2010-07-23 18:53:59 UTC
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.

New Contents:
Cause: On the KVM kernel module, if a process with a memory slot is COWed, the page will change its address
(despite having an elevated reference count).  This breaks internal memory
slots which have their physical addresses loaded into vmcs registers (see
the APIC access memory slot)

Consequence: Guest stops running when qemu receives a SIGCHLD signal. This happens when, for example, a netdev setup script returns.

Fix: Prevent internal KVM slot pages from being moved by fork()/COW.

Result: KVM guests don't hang anymore when a qemu-kvm child process exits.

Comment 11 Douglas Silas 2010-07-28 15:41:12 UTC
Technical note updated. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.

Diffed Contents:
@@ -1,10 +1 @@
-Cause: On the KVM kernel module, if a process with a memory slot is COWed, the page will change its address
+In the kvm kernel module, some internal KVM memory slots were incorrectly being handled by copy-on-write after a fork() function call, which caused issues when qemu-kvm ran child processes. This update fixes the handling of internal KVM memory slots on fork() to avoid those issues.-(despite having an elevated reference count).  This breaks internal memory
-slots which have their physical addresses loaded into vmcs registers (see
-the APIC access memory slot)
-
-Consequence: Guest stops running when qemu receives a SIGCHLD signal. This happens when, for example, a netdev setup script returns.
-
-Fix: Prevent internal KVM slot pages from being moved by fork()/COW.
-
-Result: KVM guests don't hang anymore when a qemu-kvm child process exits.

Comment 12 errata-xmlrpc 2010-07-29 05:49:42 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0536.html


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