-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ephemeral Container Memory Leak (re: tmpfs) #24
Comments
Thanks, I believe this is due to the following bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1098378 |
@hallyn Thanks, that seems to be the issue, or at the very least is related to. Thanks again! I'll leave it to you to close this out or leave it open if you want to keep this visible for others to see. |
We have contribution guidelines? AFAIK so long as you send the patch with a valid Signed-off-by we can |
https://github.com/lxc/lxc/blob/staging/CONTRIBUTING Seemed like more was required; but I hastily read that originally. From what the bug you linked above seemed to indicate, the issue was not with LXC; so it did not seem there was a fix for me to submit in retrospect. When I get some free time (about to move from apartment to house next week; so prolly not until after that), I take a close look at this issue again and re-evaluate. |
Closing the issue as my understanding is that this was caused by a kernel bug which has now been fixed. |
Please excuse this if the issue is already known, but I was unable to find others who had encountered this issue.
When using ephemeral containers, under raring (i.e. LXC 0.9.0) with standard filesystem based storage, the
post-stop
script does notumount
the tmpfs or unionfs; it simply runsrm -Rf
against the containers directory.I have been able to reproduce the memory leak by repeatedly starting an ephemeral container, run a set of commands against said container (apt-get installs, chef runs, etc), stopping said container; then rinse and repeat. After many cycles (in my case around 10 or more) the host running the ephemeral containers will run out of memory and oom killer swings into action in full force.
When I use the ephemeral containers with the
--keep-data
flag, memory usage behaves as expected and the issue disappears.At this point I do not have any direct evidence to show; but I can say for certain that taking tmpfs out of the picture fixed this issue. This has led me to believe that in the
post-stop
script LXC should be callingumount
against the unionfs and tmpfs mount points thepre-mount
script created.My theory is that since it is not calling
umount
the memory used by ephemeral tmpfs mounts seems to stay allocated and becomes orphaned.I would happily submit a patch for this; but I do not currently meet your contribution guidelines, so I wanted to go ahead and bring this to your attention.
The text was updated successfully, but these errors were encountered: