Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 903092

Summary: error message occur in libvirtd.log when destroy the lxc container
Product: Red Hat Enterprise Linux 6 Reporter: EricLee <bili>
Component: libvirtAssignee: Daniel Berrangé <berrange>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: acathrow, berrange, cwei, dallan, dyuan, jdenemar, mjenner, mzhan, tzheng
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.10.2-22.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 08:41:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
full-scale libvirtd.log none

Description EricLee 2013-01-23 06:58:02 UTC
Description of problem:
error message occur in libvirtd.log when destroy the lxc container

Version-Release number of selected component (if applicable):
# rpm -qa libvirt qemu-kvm kernel
qemu-kvm-0.12.1.2-2.352.el6.x86_64
libvirt-0.10.2-16.el6.x86_64
kernel-2.6.32-355.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. cat toy.xml
<domain type='lxc'>
  <name>toy</name>
  <uuid>386f5b25-43ee-9d62-4ce2-62c3809e47c1</uuid>
  <memory unit='KiB'>500000</memory>
  <currentMemory unit='KiB'>412300</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='x86_64'>exe</type>
    <init>/bin/sh</init>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/libexec/libvirt_lxc</emulator>
    <console type='pty'>
      <target type='lxc' port='0'/>
    </console>
  </devices>
</domain>

2.define and start toy

3. then destroy it
# virsh -c lxc:/// destroy toy
Domain toy destroyed

# echo $?
0

4.# cat /var/log/libvirt/libvirtd.log
2013-01-22 06:33:45.721+0000: 17440: error : virNetSocketReadWire:1184 : End of file while reading data: Input/output error
2013-01-22 06:33:45.981+0000: 17440: error : virLXCProcessStop:687 : internal error Invalid PID -1 for container
2013-01-22 06:33:45.981+0000: 17440: error : virLXCProcessStop:687 : internal error Invalid PID -1 for container


Actual results:
as steps

Expected results:
should not get those errors in libvirtd.log.

Additional info:
Attachment is the full-scale libvirtd.log

Comment 1 EricLee 2013-01-23 06:59:02 UTC
Created attachment 685682 [details]
full-scale libvirtd.log

Comment 2 Daniel Berrangé 2013-08-06 16:09:02 UTC
Upstream the following change

commit 09f5e0123f38dac07a4259d9cea33bd1a293706b
Author: Daniel P. Berrange <berrange>
Date:   Mon Mar 4 20:47:37 2013 +0000

    Improve LXC startup error reporting

contained a small chunk which silenced this warning

diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index aaa81a7..a0c568e 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -690,6 +690,11 @@ int virLXCProcessStop(virLXCDriverPtr driver,
 
     VIR_DEBUG("Stopping VM name=%s pid=%d reason=%d",
               vm->def->name, (int)vm->pid, (int)reason);
+    if (!virDomainObjIsActive(vm)) {
+        VIR_DEBUG("VM '%s' not active", vm->def->name);
+        return 0;
+    }
+
     if (vm->pid <= 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("Invalid PID %d for container"), vm->pid);


We dont want to pull in that entire patch, so we should probably just take that one chunk.

Comment 3 Daniel Berrangé 2013-08-06 16:52:54 UTC
After further examination, it would be possible to backport the entire patch.

Comment 6 Huang Wenlong 2013-08-15 09:58:25 UTC
Verify this bug with 
libvirt-0.10.2-22.el6.x86_64
kernel-2.6.32-358.el6.x86_64



# virsh -c lxc:/// start toy
Domain toy started

[root@intel-q9400-4-1 ~]# virsh -c lxc:/// destroy toy
2013-08-15 09:55:33.179+0000: 8292: error : virNetSocketReadWire:1184 : End of file while reading data: Input/output error
Domain toy destroyed


Hi,DB
there is no error like comment0 ,but some error about virNetSocketReadWire 
is it another bug for that ? 

Wenlong

Comment 7 Daniel Berrangé 2013-08-15 10:01:03 UTC
That error message is separate issue & expected to occur - we're not trying to address that here.

Comment 8 Huang Wenlong 2013-08-16 02:27:37 UTC
Thanks DB , I close this bug  as comment 6 and 7

Comment 10 errata-xmlrpc 2013-11-21 08:41:09 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/RHBA-2013-1581.html