[lxc-users] container stuck until lxcfs restart
Fajar A. Nugraha
list at fajar.net
Wed Mar 25 05:56:33 UTC 2015
Forgot to add:
"restart lxcfs" "fix" the hang problem
Connected to tty 0
Type <Ctrl+a q> to exit the console, <Ctrl+a Ctrl+a> to enter Ctrl+a itself
lxc_container: console.c: lxc_console_cb_tty_master: 672 Input/output
error - failed to read
Wed Mar 25 12:17:20 WIB 2015 -- Try #30
Job for poweroff.target timed out.
Ubuntu 14.10
lxcfs 0.6-0ubuntu2~ubuntu14.10.1~ppa1
lxc 1.1.1-0ubuntu2~ubuntu14.10.1~ppa1
--
Fajar
On Wed, Mar 25, 2015 at 12:53 PM, Fajar A. Nugraha <list at fajar.net> wrote:
> I believe I have a reproducer script:
>
> - create a ubuntu vivid container, c1, with systemd
>
> # lxc-create -n c1 -- -d ubuntu -r vivid -a amd64
> # lxc-attach -n c1 apt-get update
> # lxc-attach -n c1 apt-get install systemd-sysv
>
> - run this script
>
> # n=0;while true;do n=$((n+1));echo "$(date) -- Try #$n";sleep
> 1;lxc-start -n c1 && sleep 10 && lxc-attach -n c1 -- poweroff &&
> lxc-console -n c1 -t console;done
>
> It's now stuck on try #30
>
> # lxc-ls -f c1
> NAME STATE IPV4 IPV6 GROUPS AUTOSTART
> -------------------------------------------------------
> c1 RUNNING 192.168.124.120 - - NO
>
> # lxc-attach -n c1 -> hangs
>
> # ps -ef | grep attach
> root 1026 19966 0 12:17 pts/14 00:00:00 lxc-attach -n c1 -- poweroff
> root 1633 25540 0 12:48 pts/29 00:00:00 lxc-attach -n c1
>
> The first lxc-atach is the one from the script
>
> # strace -f -p 1026
> Process 1026 attached
> wait4(1028,
>
> # ps -ef | grep 1028
> root 1028 1026 0 12:17 pts/14 00:00:00 poweroff
>
> # strace -f -p 1028
> Process 1028 attached
> ppoll([{fd=3, events=POLLIN}], 1, NULL, NULL, 8
>
>
> # ps -ef | grep lxcfs
> root 383 1 5 12:08 ? 00:02:26 /usr/bin/lxcfs -s -f
> -o allow_other /var/lib/lxcfs
> root 1312 383 0 12:17 ? 00:00:00 /usr/bin/lxcfs -s -f
> -o allow_other /var/lib/lxcfs
> root 1313 1312 0 12:17 ? 00:00:00 /usr/bin/lxcfs -s -f
> -o allow_other /var/lib/lxcfs
> root 1764 1654 0 12:50 pts/28 00:00:00 grep --color=auto lxcfs
>
> # strace -f -p 383
> Process 383 attached
> wait4(1312,
>
> # strace -f -p 1312
> Process 1312 attached
> wait4(1313,
>
> # strace -f -p 1313
> Process 1313 attached
> recvmsg(5,
>
>
> "poweroff" command hungs polling fd3 (lxcfs-related?) and lxcfs is
> stuck on recvmsg (waiting for something from the poweroff command?)
>
> --
> Fajar
More information about the lxc-users
mailing list