Running a lot of lxc-execute processes concurrently causes defunct processes, hangs forever

Bug #1134923 reported by Travis Reeder
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Ubuntu version:

Description: Ubuntu 12.04.2 LTS
Release: 12.04

lxc version:

lxc:
  Installed: 0.7.5-3ubuntu66
  Candidate: 0.7.5-3ubuntu66
  Version table:
 *** 0.7.5-3ubuntu66 0
        500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/universe amd64 Packages
        100 /var/lib/dpkg/status
     0.7.5-3ubuntu52 0
        500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages

Expected:

Expected it to work as normal, not hang.

What happened instead:

This is pretty easy to reproduce by running a bunch of processes (5 is fine to reproduce) that continuously execute very short lxc-execute processes (less than a second).

Here is a log from the process calling lxc-execute:

Feb 27 12:54:30 Running now: lxc-execute -n vm16946 -f /mnt/vm16946/lxc.conf -- sh /task/.runtask
Feb 27 12:54:30 Command executed, starting to read streams
Feb 27 12:54:30 out: hello

That's it, never exits/finishes. The program running inside lxc is a ruby program that prints "hello", that's all it does.

ps -ef shows this:

root 16090 16946 0 20:54 ? 00:00:00 lxc-execute -n vm16946 -f /mnt/vm16946/lxc.conf -- sh /task/.runtask
root 16100 16090 0 20:54 ? 00:00:00 [lxc-init] <defunct>

This never goes away and the parent process of lxc-execute hangs forever too.

On a side note, this same thing running on Quantal with lxc 0.8 rc1 will make the entire machine completely unresponsive so it actually gets worse in 0.8.

Related branches

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for reporting this bug. Confirmed in raring.

I note that there is a blueprint item for Daniel Lezcano to improve the monitoring code to be more robust. I suspect that will solve this issue.

Changed in lxc (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 0.9.0~alpha3-0ubuntu3

---------------
lxc (0.9.0~alpha3-0ubuntu3) raring; urgency=low

  * 0001-fix-race-with-fast-init: Before starting lxc_mainloop, check whether
    lxc-init has already exited. If it has, return immediately to reap it.
    (LP: #1134923) (LP: #1144873)
 -- Serge Hallyn <email address hidden> Mon, 11 Mar 2013 10:14:39 -0500

Changed in lxc (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.