Running a lot of lxc-execute processes concurrently causes defunct processes, hangs forever
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://
100 /var/lib/
0.
500 http://
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/
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/
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.
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.