RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1446205 - libvirtd crashes when migrate a transient domain created by 'virsh create' with --persistent option
Summary: libvirtd crashes when migrate a transient domain created by 'virsh create' wi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.4
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Yanqiu Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-27 12:45 UTC by Yanqiu Zhang
Modified: 2017-08-02 01:32 UTC (History)
10 users (show)

Fixed In Version: libvirt-3.2.0-4.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-02 00:08:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
bt.txt (6.38 KB, text/plain)
2017-04-27 12:45 UTC, Yanqiu Zhang
no flags Details
gdb.txt (37.71 KB, text/plain)
2017-04-27 12:47 UTC, Yanqiu Zhang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1846 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2017-08-01 18:02:50 UTC

Description Yanqiu Zhang 2017-04-27 12:45:08 UTC
Created attachment 1274626 [details]
bt.txt

Description of problem:
libvirtd crashes when migrate a transient domain created by 'virsh create' with --persistent option.
can't reproduce when define->start-> undefine a domain

Version-Release number of selected component (if applicable):
libvirt-3.2.0-3.el7.x86_64
qemu-kvm-rhev-2.9.0-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.create a transient domain by 'virsh create'
# virsh create V.xml
Domain V created from V.xml

2. try to migrate the transient domain with --persistent option
# virsh migrate V --live qemu+ssh://{target_ip}/system   --persistent
error: Disconnected from qemu:///system due to I/O error
error: End of file while reading data: Input/output error

3.check abrt
# abrt-cli list|head
id b455e7a03f1332f1bf4bcf4827d0ef5bbfff1b32
reason:         libvirtd killed by SIGSEGV
time:           Thu 27 Apr 2017 07:48:55 PM CST
cmdline:        /usr/sbin/libvirtd
package:        libvirt-daemon-3.2.0-3.virtcov.el7
uid:            0 (root)
Directory:      /var/spool/abrt/ccpp-2017-04-27-19:48:55-15299
Run 'abrt-cli report /var/spool/abrt/ccpp-2017-04-27-19:48:55-15299' for creating a case in Red Hat Customer Portal


Actual results:
libvirtd crashes when migrate a transient domain created by 'virsh create' with --persistent option.

Expected results:
libvirtd should not crash, and migration should succeed.


Additional info:
1.Not reproduces on rhel7.3 with:
libvirt-2.0.0-10.virtcov.el7_3.7.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.9.x86_64

2.For backtrace info, pls refer to attachment 'bt.txt'.

Comment 3 Yanqiu Zhang 2017-04-27 12:47:33 UTC
Created attachment 1274627 [details]
gdb.txt

Comment 4 Jaroslav Suchanek 2017-04-28 07:48:00 UTC
Strange that the crash points to libvirt-daemon-3.2.0-3.virtcov.el7 package.
Can you please double check which packages were installed? I guess libvirt
debug logs would help too. Anyway worth investigating...

Comment 5 Jiri Denemark 2017-05-02 16:36:14 UTC
Patch sent upstream for review: https://www.redhat.com/archives/libvir-list/2017-May/msg00040.html

Comment 6 Jiri Denemark 2017-05-02 16:55:01 UTC
This is now fixed upstream by

commit 59307fade86fb74db1f8f572433962233f7ac123
Refs: v3.3.0-rc1-4-g59307fade
Author:     Jiri Denemark <jdenemar>
AuthorDate: Tue May 2 18:01:04 2017 +0200
Commit:     Jiri Denemark <jdenemar>
CommitDate: Tue May 2 18:53:19 2017 +0200

    qemu: Fix persistent migration of transient domains

    While fixing a bug with incorrectly freed memory in commit
    v3.1.0-399-g5498aa29a, I accidentally broke persistent migration of
    transient domains. Before adding qemuDomainDefCopy in the path, the code
    just took NULL from vm->newDef and used it as the persistent def, which
    resulted in no persistent XML being sent in the migration cookie. This
    scenario is perfectly valid and the destination correctly handles it by
    using the incoming live definition and storing it as the persistent one.

    After the mentioned commit libvirtd would just segfault in the described
    scenario.

    https://bugzilla.redhat.com/show_bug.cgi?id=1446205

    Signed-off-by: Jiri Denemark <jdenemar>

Comment 9 Yanqiu Zhang 2017-05-11 10:59:17 UTC
Verified with libvirt-3.2.0-4.el7.x86_64

Steps:
1.# virsh create V.xml
Domain V created from V.xml

2.# virsh migrate V --live qemu+ssh://{target_ip}/system --persistent --verbose
Migration: [100 %]

And no libvirtd crash.

3.On target:
# virsh list --all --persistent
 Id    Name                           State
----------------------------------------------------
 12    V                              running

And target xml is almost same with step 1.

Since the result is as expected, mark this bug as verified.

Comment 10 errata-xmlrpc 2017-08-02 00:08:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:1846

Comment 11 errata-xmlrpc 2017-08-02 01:32:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:1846


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