Bug 610341 - fork causes trouble for vcpu threads
fork causes trouble for vcpu threads
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.5
All Linux
high Severity medium
: rc
: ---
Assigned To: Virtualization Maintenance
Virtualization Bugs
: ZStream
Depends On: 606953
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-02 02:21 EDT by RHEL Product and Program Management
Modified: 2013-01-09 17:48 EST (History)
12 users (show)

See Also:
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 01:49:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description RHEL Product and Program Management 2010-07-02 02:21:56 EDT
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 06:01:12 EDT
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 14:53:59 EDT
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 11:41:12 EDT
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 01:49:42 EDT
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.