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 790745 - [Regression]libvirtd dead when create a guest with "--channel pty,target_type=virtio" by virt-install.
Summary: [Regression]libvirtd dead when create a guest with "--channel pty,target_type...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Alex Jia
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-15 10:10 UTC by Daisy Wu
Modified: 2012-06-20 06:48 UTC (History)
8 users (show)

Fixed In Version: libvirt-0.9.10-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 06:48:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
debug info (9.18 KB, text/plain)
2012-02-15 10:11 UTC, Daisy Wu
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 19:31:38 UTC

Description Daisy Wu 2012-02-15 10:10:02 UTC
Description of problem:
When create a guest with "--channel pty,target_type=virtio" option, the service libvirtd dead.

Version-Release number of selected component (if applicable):
virt-manager-0.9.0-10.el6
libvirt-0.9.10-1.el6.x86_64
python-virtinst-0.600.0-7.el6.noarch
qemu-kvm-0.12.1.2-2.222.el6.x86_64

# uname -a
Linux localhost.localdomain 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:
always

Steps to Reproduce:
1). Create a guest by virt-install:
# virt-install -n demo1 -r 1024 --disk path=/var/lib/libvirt/images/demo1.img,size=5 --channel pty,target_type=virtio -l http://fileshare.englab.nay.redhat.com/pub/redhat/rhel/rel-eng/RHEL-6.2/RHEL6.2-20111117.0/x86_64/os/ --debug

Actual results:
Wed, 15 Feb 2012 02:42:09 ERROR    End of file while reading data: Input/output error
Wed, 15 Feb 2012 02:42:09 DEBUG    Traceback (most recent call last):
  File "/usr/sbin/virt-install", line 629, in start_install
    noboot=options.noreboot)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1223, in start_install
    noboot)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1291, in _create_guest
    dom = self.conn.createLinustart_xml or final_xml, 0)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2413, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinu) failed', conn=self)
libvirtError: End of file while reading data: Input/output error
Wed, 15 Feb 2012 02:42:09 DEBUG    Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start demo1
otherwise, please restart your installation.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start demo1
otherwise, please restart your installation.

Check the libvirtd status:
# service libvirtd status
libvirtd dead but pid file exists


Expected results:
Guest should be installed successfully and service libvirtd is normal.

Additional info:
This issue can not be reproduced on libvirt-0.9.9-2.el6.x86_64, so mark it as regression.
Workaround: if add the "name" option, all work well.
--channel pty,target_type=virtio,name=redhat

Comment 1 Daisy Wu 2012-02-15 10:11:19 UTC
Created attachment 562181 [details]
debug info

Comment 3 Alex Jia 2012-02-15 10:20:34 UTC
Patch for upstream:
https://www.redhat.com/archives/libvir-list/2012-February/msg00676.html

Comment 5 Alex Jia 2012-02-16 03:07:42 UTC
v2 patch for upstream:
https://www.redhat.com/archives/libvir-list/2012-February/msg00729.html

Comment 6 Alex Jia 2012-02-16 15:25:28 UTC
In POST:
commit 18942b9bea8a5a8a4d52c0cdde253ae91be338a6
Author: Alex Jia <ajia>
Date:   Thu Feb 16 10:32:03 2012 +0800

    qemu: Prevent crash of libvirtd without guest agent
    
    * src/qemu/qemu_process.c (qemuFindAgentConfig): avoid crash libvirtd due to
    deref a NULL pointer.
    
    * How to reproduce?
    1. virsh edit the following xml into guest configuration:
        <channel type='pty'>
          <target type='virtio'/>
        </channel>
    2. virsh start <domain>
    
    or
    % virt-install -n foo -r 1024 --disk path=/var/lib/libvirt/images/foo.img,size=1 \
    --channel pty,target_type=virtio -l <installation tree>
    
    Signed-off-by: Alex Jia <ajia>

Comment 8 Huang Wenlong 2012-02-22 07:10:03 UTC
Verify this bug with 
libvirt-0.9.10-2.el6.x86_64

# virt-install -n demo7 -r 1024 --disk path=/var/lib/libvirt/images/demo7.img,size=5 --channel pty,target_type=virtio -l http://fileshare.englab.nay.redhat.com/pub/redhat/rhel/rel-eng/RHEL-6.2/RHEL6.2-20111117.0/x86_64/os/ 

Starting install...
Retrieving file vmlinuz...                                                                                  | 7.5 MB     00:00 ... 
Retrieving file initrd.img...                                                                               |  56 MB     00:00 ... 
Allocating 'demo7.img'                                                                                      | 5.0 GB     00:00     
Creating domain...               


-------------------
guest's xml 
...
  <channel type='pty'>
      <source path='/dev/pts/3'/>
      <target type='virtio'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
...

Wenlong

Comment 10 errata-xmlrpc 2012-06-20 06:48: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.

http://rhn.redhat.com/errata/RHSA-2012-0748.html


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