Bug 808193 - g.launch() crashes on RHEL 5
Summary: g.launch() crashes on RHEL 5
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libguestfs
Version: 5.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 786604 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-29 19:09 UTC by Arun S A G
Modified: 2018-11-28 20:18 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-07 12:26:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Output from libguestfs-test-tool (18.22 KB, text/plain)
2012-03-29 20:22 UTC, Arun S A G
no flags Details

Description Arun S A G 2012-03-29 19:09:10 UTC
Description of problem:

Cannot open disk images, with libguestfs. 

[saga@gnubox-dr]$ sudo ./kvm-ok 
[sudo] password for saga: 
INFO: /dev/kvm exists
KVM acceleration can be used

[saga@gnubox-dr]$ file /var/cache/vm/vdisk/saga49-201203291426.qcow2
/var/cache/vm/vdisk/saga49-201203291426.qcow2: x86 boot sector; partition 1: ID=0x83, active, starthead 1, startsector 63, 530082 sectors; partition 2: ID=0x83, starthead 0, startsector 530145, 16241715 sectors, code offset 0x48



Version-Release number of selected component (if applicable):
[saga@gnubox-dr]$ rpm -q libvirt
libvirt-0.8.2-25.el5
[saga@gnubox-dr]$ rpm -q qemu
qemu-0.10.5-1.el5.2


How reproducible:
Always


Steps to Reproduce:
1. Python interpreter (sudo python)

2. Run the following commands 
import guestfs
g = guestfs.GuestFS() 
g.add_drive("/var/cache/vm/vdisk/saga49-201203291426.qcow2")
g.launch()

  
Actual results:
Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)

/var/cache/<ipython console> 

/usr/lib/python2.4/site-packages/guestfs.pyc in launch(self)
    149         adding drives) but before performing any actions.
    150         """
--> 151         return libguestfsmod.launch (self._o)
    152 
    153     def wait_ready (self):

RuntimeError: child process died unexpectedly

Expected results:
g.launch() works without crash

Additional info:

Comment 1 Richard W.M. Jones 2012-03-29 19:34:23 UTC
Please can you run:

libguestfs-test-tool

and attach the complete, unedited output to this bug.

Comment 2 Arun S A G 2012-03-29 20:22:11 UTC
Created attachment 573784 [details]
Output from libguestfs-test-tool

Comment 3 Richard W.M. Jones 2012-03-29 21:04:21 UTC
What version of libguestfs, and where did you get it from?

The error is:

guestfsd: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory

This shouldn't happen.  Have you updated any packages with
ones that aren't in RHEL 6, or removed any files by hand?

You could also try the RHEL 6.3 preview packages here:

http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/

Comment 4 Richard W.M. Jones 2012-03-29 21:04:50 UTC
(In reply to comment #3)
> What version of libguestfs, and where did you get it from?
> 
> The error is:
> 
> guestfsd: error while loading shared libraries: libxml2.so.2: cannot open
> shared object file: No such file or directory
> 
> This shouldn't happen.  Have you updated any packages with
> ones that aren't in RHEL 6, or removed any files by hand?
> 
> You could also try the RHEL 6.3 preview packages here:
> 
> http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/

Right, sorry, RHEL _5_, ignore all that.

Comment 5 Richard W.M. Jones 2012-03-29 21:05:39 UTC
If this is the EPEL package, the problem is that it needs
rebuilding.  What version of libguestfs are you trying and
where is it from?

Comment 6 Arun S A G 2012-03-30 04:15:18 UTC
[saga@gnubox-dr]$ rpm  -qfi /usr/bin/libguestfs-test-tool 
Name        : libguestfs                   Relocations: (not relocatable)
Version     : 1.2.14                            Vendor: Fedora Project
Release     : 7.el5                         Build Date: Tue 25 Oct 2011 12:19:34 AM IST
Install Date: Tue 27 Mar 2012 06:11:57 PM IST      Build Host: x86-02.phx2.fedoraproject.org
Group       : Development/Libraries         Source RPM: libguestfs-1.2.14-7.el5.src.rpm
Size        : 4993847                          License: LGPLv2+
Signature   : DSA/SHA1, Thu 27 Oct 2011 08:36:55 PM IST, Key ID 119cc036217521f6
Packager    : Fedora Project
URL         : http://libguestfs.org/
Summary     : Access and modify virtual machine disk images
Description :


Looks like it is from EPEL

Comment 7 Richard W.M. Jones 2012-03-30 08:04:56 UTC
Looks like Augeas has been updated to 0.10 in EPEL 5.
This new version requires libxml2, and the (ancient)
version of libguestfs doesn't know this.

Really EPEL 5 should be using a new version of libguestfs,
not an ancient one with known security issues.

Comment 8 Arun S A G 2012-03-30 09:49:44 UTC
(In reply to comment #7)
> Looks like Augeas has been updated to 0.10 in EPEL 5.
> This new version requires libxml2, and the (ancient)
> version of libguestfs doesn't know this.
> 
> Really EPEL 5 should be using a new version of libguestfs,
> not an ancient one with known security issues.

Will there be an update available?

Comment 9 Richard W.M. Jones 2012-03-30 10:42:25 UTC
Unfortunately this is much more complicated than
you think.  RHEL 5 doesn't have support for virtio-serial
which is required for modern libguestfs.

It's going to be simpler if you can update to RHEL 6
where we have proper, modern, fully supported libguestfs
and virt tools packages.

Comment 10 Arun S A G 2012-03-31 05:42:15 UTC
(In reply to comment #9)
> Unfortunately this is much more complicated than
> you think.  RHEL 5 doesn't have support for virtio-serial
> which is required for modern libguestfs.
> 
> It's going to be simpler if you can update to RHEL 6
> where we have proper, modern, fully supported libguestfs
> and virt tools packages.

We have both RHEL 5 and RHEL 6 boxes, I am trying to make my app that uses libguestfs to work on RHEL 5. Lot of our production machines are RHEL 5, unfortunately people will take their own time to move to RHEL 6.

Comment 11 Richard W.M. Jones 2012-04-01 19:43:16 UTC
*** Bug 786604 has been marked as a duplicate of this bug. ***

Comment 12 Arun S A G 2012-06-15 05:44:07 UTC
Any chance this will be fixed? Like backporting virtio-serial to RHEL 5 kvm?

Comment 13 Richard W.M. Jones 2012-06-15 07:36:30 UTC
No, there is zero chance that virtio-serial will be backported
to RHEL 5.  In fact since CVE-2012-2690 came up we have considered
blocking the EPEL 5 libguestfs package entirely.

Comment 15 Richard W.M. Jones 2012-06-25 17:02:43 UTC
If you want to follow progress on this bug, please watch:

libguestfs in EPEL 5 repository:
http://pkgs.fedoraproject.org/gitweb/?p=libguestfs.git;a=shortlog;h=refs/heads/el5

libguestfs builds (only ones matching *.el5):
http://koji.fedoraproject.org/koji/packageinfo?packageID=8391

Upstream branch:
https://github.com/libguestfs/libguestfs/commits/oldlinux

Comment 16 Arun S A G 2012-06-26 06:55:58 UTC
Sure. Thanks Richard.

Comment 17 Richard W.M. Jones 2012-06-27 21:49:04 UTC
I have done a libguestfs build for EPEL 5.  This is modern libguestfs,
along the development branch (1.19.13) but it should be fully backwards
compatible with the old libguestfs.

Please read the release notes!  This is very important:

http://pkgs.fedoraproject.org/gitweb/?p=libguestfs.git;a=blob;f=README.EPEL-5;hb=refs/heads/el5

To give you an idea of the amount of work done (it took about
2 weeks in all), there are 20 EPEL-specific patches, and around
20 more patches upstream.  The system by which the library and
the appliance communicate was completely rewritten to avoid
virtio-serial, and many other changes were made and bugs fixed.

Comment 18 Richard W.M. Jones 2012-06-27 21:54:52 UTC
http://koji.fedoraproject.org/koji/buildinfo?buildID=327975

Comment 19 Arun S A G 2012-06-28 08:32:48 UTC
This is awesome. Thanks for all the hard work! I will test this package this weekend.

Comment 20 Arun S A G 2012-07-05 09:23:46 UTC
Tested the package,

sudo yum install libguestfs.x86_64 python-libguestfs --enablerepo=epel-testing

It works fine.

Comment 21 Richard W.M. Jones 2013-03-07 12:26:38 UTC
Closing based on comment 20.


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