This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1276086 - [libvirt-lxc] process at bootup, which outputs to console, gets stuck
[libvirt-lxc] process at bootup, which outputs to console, gets stuck
Status: CLOSED DEFERRED
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Libvirt Maintainers
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-28 12:28 EDT by Bertrand NOEL
Modified: 2016-04-26 07:16 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-26 07:16:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bertrand NOEL 2015-10-28 12:28:23 EDT
Description of problem:
I am creating containers using libvirt-lxc. A process at bootup gets stuck at some point. My usecase is Puppet, but I can reproduce with a loop in bash.
I noticed it is stuck until I connect to the console of the container (virsh -c lxc:/// console id). Then after disconnecting the console, waiting some times, the process gets stuck again.
The more the process outputs to the console, the quicker it becomes stuck.


Version-Release number of selected component (if applicable):
Host and container are CentOS 7.1
Libvirt v1.2.8


How reproducible:
Always


Steps to Reproduce:
1. Create an LXC container. For example with the following libvirt.xml

<domain type="lxc">
  <uuid>9fbe3d43-e1b4-4244-8dab-b42995ab7403</uuid>
  <name>instance-000002f6</name>
  <memory>4194304</memory>
  <vcpu>2</vcpu>
  <os>
    <type>exe</type>
    <cmdline>console=tty0 console=ttyS0</cmdline>
    <init>/sbin/init</init>
  </os>
  <clock offset="utc"/>
  <devices>
    <filesystem type="mount">
      <source dir="/root/rootfs"/>
      <target dir="/"/>
    </filesystem>
    <interface type="bridge">
      <mac address="02:16:3E:00:F6:0E"/>
      <source bridge="virbr0"/>
    </interface>
    <console type="pty"/>
  </devices>
</domain>

2. Run a server that the container will contact. For example, I use Python simple http server

python -m SimpleHTTPServer

3. Create a task that will run on bootup. For example, 

echo "while true ; do date ; curl my-server:8000 ; sleep 1 ; done" >> rootfs/etc/rc.local
chmod +x rootfs/etc/rc.local
echo "StandardOutput=journal+console" >> rootfs/usr/lib/systemd/system/rc-local.service

4. Observe logs on server. They stop after 20-30 requests


Actual results:
Logs on server stop, meaning the process is stuck


Expected results:
Process not stuck


Additional info:
- If connecting to the console, the process gets unstuck for some time
- Services on container seem to work fine. For example I can ping and ssh the container

I would bet on software flow control, but don't know where to begin with that
Comment 1 Cole Robinson 2016-04-10 18:39:55 EDT
Are you still seeing this with centos 7.2 packages?
Comment 2 Bertrand NOEL 2016-04-26 05:57:14 EDT
I am not working on it anymore, so I don't have the setup and cannot test
Comment 3 Cole Robinson 2016-04-26 07:16:36 EDT
Closing then, if anyone else is still hitting this issue please feel free to reopen

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