Bug 880919 - Libvirtd crashed while saving the guest to a nonexistent directory
Libvirtd crashed while saving the guest to a nonexistent directory
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.4
x86_64 Linux
high Severity high
: rc
: ---
Assigned To: Ján Tomko
Virtualization Bugs
: Regression
: 893814 (view as bug list)
Depends On:
Blocks: 785929 886216
  Show dependency treegraph
 
Reported: 2012-11-28 02:30 EST by zhenfeng wang
Modified: 2013-02-21 02:27 EST (History)
10 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:27:49 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description zhenfeng wang 2012-11-28 02:30:46 EST
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 03:01:45 EST
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 03:15:10 EST
Upstream patch proposed:
https://www.redhat.com/archives/libvir-list/2012-November/msg01241.html
Comment 5 Ján Tomko 2012-11-28 04:42:53 EST
Fixed upstream:
commit 8927c0eab6681ee4ae014cb37fe60b42c225b8df
Author:     Ján Tomko <jtomko@redhat.com>
AuthorDate: 2012-11-28 09:08:52 +0100
Commit:     Martin Kletzander <mkletzan@redhat.com>
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 00:22:26 EST
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 05:26:17 EST
*** Bug 893814 has been marked as a duplicate of this bug. ***
Comment 9 errata-xmlrpc 2013-02-21 02:27:49 EST
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.