[Lxc-users] init keeps files opened

Papp Tamas tompos at martos.bme.hu
Wed Mar 28 12:25:26 UTC 2012


On 03/28/2012 11:26 AM, Papp Tamas wrote:
> hi!
>
> I have a container, which init process uses 100% CPU.
>
> If I create a strace dump from it:
>
> open("/dev/ptmx", O_RDWR|O_NOCTTY)      = -1 EMFILE (Too many open files)
> close(1022)                             = 0
> close(1023)                             = 0
> pipe([1022, 1023])                      = 0
>
>
> I saw it before. However other container works fine beside it.
> Is this a bug, or I did something wrong?
>
> I created the container with the command 'lxc-create -n log0 -t ubuntu 
> -- -r precise' .
>
> fs.file-nr = 3328    0    805183
>
>
> In the container there is a realy minimalized installation, with a 
> mysql instance, apache etc, nothing in production and not in use.
>
>     1 ?        Rs   7165:40 /sbin/init
>   121 ?        S      0:00 upstart-udev-bridge --daemon
>   126 ?        S      0:00 upstart-socket-bridge --daemon
>   127 ?        Ss     0:00 /sbin/udevd --daemon
> 20464 ?        S      0:00  \_ /sbin/udevd --daemon
> 20465 ?        S      0:00  \_ /sbin/udevd --daemon
>   134 ?        Sl     0:01 rsyslogd -c5
>   170 ?        Ss     0:00 /usr/sbin/sshd -D
> 20862 ?        Ss     0:00  \_ sshd: tompos [priv]
> 20874 ?        S      0:00      \_ sshd: tompos at pts/1
> 20875 pts/1    Ss     0:00          \_ -bash
> 20885 pts/1    S      0:00              \_ sudo -i
> 20886 pts/1    S      0:00                  \_ -bash
> 20898 pts/1    R+     0:00                      \_ ps axf
>   198 lxc/tty4 Ss+    0:00 /sbin/getty -8 38400 tty4
>   201 lxc/tty2 Ss+    0:00 /sbin/getty -8 38400 tty2
>   203 lxc/tty3 Ss+    0:00 /sbin/getty -8 38400 tty3
>   215 ?        Ss     0:00 cron
>   268 ?        Ss     0:16 /usr/sbin/apache2 -k start
> 19118 ?        S      0:00  \_ /usr/sbin/apache2 -k start
> 19119 ?        S      0:00  \_ /usr/sbin/apache2 -k start
> 19120 ?        S      0:00  \_ /usr/sbin/apache2 -k start
> 19121 ?        S      0:00  \_ /usr/sbin/apache2 -k start
> 19122 ?        S      0:00  \_ /usr/sbin/apache2 -k start
>   283 lxc/console Ss+   0:00 /sbin/getty -8 38400 console
>   285 lxc/tty1 Ss+    0:00 /sbin/getty -8 38400 tty1
> 17930 ?        Zs     0:00 [mysqld] <defunct>
> 20859 ?        Z      0:00 [sshd] <defunct>
> 20861 ?        Z      0:00 [sshd] <defunct>
>

It looks, first time I didn't send this mail properly.

tamas




More information about the lxc-users mailing list