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 880919 - Libvirtd crashed while saving the guest to a nonexistent directory
Summary: Libvirtd crashed while saving the guest to a nonexistent directory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 893814 (view as bug list)
Depends On:
Blocks: 785929 886216
TreeView+ depends on / blocked
 
Reported: 2012-11-28 07:30 UTC by zhenfeng wang
Modified: 2013-02-21 07:27 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.10.2-11.el6
Doc Type: Bug Fix
Doc Text:
Cause: virFileWrapperFdCatchError was called with a NULL argument when the save file could not be opened. Consequence: Libvirtd would crash due to NULL pointer dereference. Fix: Only call virFileWrapperFdCatchError if the file was opened. Result: An error is reported instead of crashing.
Clone Of:
Environment:
Last Closed: 2013-02-21 07:27:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description zhenfeng wang 2012-11-28 07:30:46 UTC
Description of problem:
Libvirtd crashed while save the guest to an unexsited directory
Version-Release number of selected component (if applicable):
libvirt-0.10.2-10.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.335.el6.x86_64
kernel-2.6.32-330.el6.x86_6

How reproducible:
100%
1 Prepare a running guest
# virsh list
 Id    Name                           State
----------------------------------------------------
 1     rhelqcow2                      running

2 Save the guest to an unexsited derectory
# virsh save rhelqcow2 /unexsited/rhel.save
error: Failed to save domain rhelqcow2 to /unexsited/rhel.save
error: End of file while reading data: Input/output error
error: Failed to reconnect to the hypervisor

Actual results:
The libvirtd crashed

Expected results:
The guest will fail to save, however, the libvirtd should still run normally.

Comment 2 zhenfeng wang 2012-11-28 08:01:45 UTC
Since it works well in pkg libvirt-0.9.10-21.el6.x86_64 ,so mark it as a regression bug 

in pkg libvirt-0.9.10-21.el6.x86_64
# virsh save rhelqcow2 /unexsited/rhel.save
error: Failed to save domain testfull to /unexsited/rhel.save
error: Failed to create file '/unexsited/rhel.save': Operation not permitted

Comment 4 Ján Tomko 2012-11-28 08:15:10 UTC
Upstream patch proposed:
https://www.redhat.com/archives/libvir-list/2012-November/msg01241.html

Comment 5 Ján Tomko 2012-11-28 09:42:53 UTC
Fixed upstream:
commit 8927c0eab6681ee4ae014cb37fe60b42c225b8df
Author:     Ján Tomko <jtomko>
AuthorDate: 2012-11-28 09:08:52 +0100
Commit:     Martin Kletzander <mkletzan>
CommitDate: 2012-11-28 10:24:31 +0100

    qemu: fix a crash when save file can't be opened

Posted downstream:
http://post-office.corp.redhat.com/archives/rhvirt-patches/2012-November/msg00306.html

Comment 7 EricLee 2012-12-07 05:22:26 UTC
Verified with libvirt-0.10.2-11.el6.x86_64:

# virsh start r6u3
Domain r6u3 started

# virsh save r6u3 /unexsited/r6u3.save
error: Failed to save domain r6u3 to /unexsited/r6u3.save
error: Failed to create file '/unexsited/r6u3.save': Operation not permitted

And libvirtd does not crash:
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 3     r6u3                           running

# service libvirtd status
libvirtd (pid  11853) is running...

Get the expected result, so moving to VERIFIED.

Comment 8 Peter Krempa 2013-01-10 10:26:17 UTC
*** Bug 893814 has been marked as a duplicate of this bug. ***

Comment 9 errata-xmlrpc 2013-02-21 07:27:49 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.

http://rhn.redhat.com/errata/RHSA-2013-0276.html


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