[lxc-users] Problem with lxc-info, lxc-stop
Haralds Ulmanis
haralds at evilezh.net
Fri Mar 14 20:23:55 UTC 2014
There is case:
I've some gradle script which launches lxc containers, manages them, etc.
(spins test machines)
Finally i wanted to wrap it with jenkins and there start some problems.
When I try to use lxc-info or lxc-kill commands they just stall.
There is some straces:
# strace -f lxc-info -n keymanagementservice-main
execve("/usr/bin/lxc-info", ["lxc-info", "-n",
"keymanagementservice-main"], [/* 37 vars */]) = 0
brk(0) = 0x87c000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fcb179ca000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=42597, ...}) = 0
mmap(NULL, 42597, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fcb179bf000
close(3) = 0
open("/usr/lib64/liblxc.so.1", O_RDONLY) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\311\0\0\0\0\0\0"..., 832)
= 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1237456, ...}) = 0
mmap(NULL, 2491720, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7fcb1775e000
mprotect(0x7fcb177bc000, 2097152, PROT_NONE) = 0
mmap(0x7fcb179bc000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5e000) = 0x7fcb179bc000
close(3) = 0
open("/lib64/librt.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@! X>\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=47064, ...}) = 0
mmap(0x3e58200000, 2128816, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x3e58200000
mprotect(0x3e58207000, 2093056, PROT_NONE) = 0
mmap(0x3e58406000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x3e58406000
close(3) = 0
open("/lib64/libutil.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\16
\3636\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=17520, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fcb1775d000
mmap(0x36f3200000, 2105600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x36f3200000
mprotect(0x36f3202000, 2093056, PROT_NONE) = 0
mmap(0x36f3401000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x36f3401000
close(3) = 0
open("/lib64/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340] U>\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=145896, ...}) = 0
mmap(0x3e55200000, 2212848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x3e55200000
mprotect(0x3e55217000, 2097152, PROT_NONE) = 0
mmap(0x3e55417000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x3e55417000
mmap(0x3e55419000, 13296, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3e55419000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY) = 3
read(3,
"\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\356\341\3606\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1926800, ...}) = 0
mmap(0x36f0e00000, 3750152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x36f0e00000
mprotect(0x36f0f8b000, 2093056, PROT_NONE) = 0
mmap(0x36f118a000, 20480, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18a000) = 0x36f118a000
mmap(0x36f118f000, 18696, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x36f118f000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fcb1775c000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fcb1775a000
arch_prctl(ARCH_SET_FS, 0x7fcb1775a760) = 0
mprotect(0x36f118a000, 16384, PROT_READ) = 0
mprotect(0x3e55417000, 4096, PROT_READ) = 0
mprotect(0x36f3401000, 4096, PROT_READ) = 0
mprotect(0x3e58406000, 4096, PROT_READ) = 0
mprotect(0x36f0c1f000, 4096, PROT_READ) = 0
munmap(0x7fcb179bf000, 42597) = 0
set_tid_address(0x7fcb1775aa30) = 13414
set_robust_list(0x7fcb1775aa40, 0x18) = 0
futex(0x7fff08ace71c, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7fff08ace71c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1,
NULL, 7fcb1775a760) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x3e55205c60, [], SA_RESTORER|SA_SIGINFO,
0x3e5520f710}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x3e55205cf0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO,
0x3e5520f710}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
geteuid() = 0
brk(0) = 0x87c000
brk(0x89d000) = 0x89d000
open("/etc/lxc/lxc.conf", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or
directory)
geteuid() = 0
mkdir("/", 0755) = -1 EEXIST (File exists)
mkdir("/run/", 0755) = -1 EEXIST (File exists)
mkdir("/run/lock/", 0755) = -1 EEXIST (File exists)
mkdir("/run/lock/lxc//", 0755) = -1 EEXIST (File exists)
mkdir("/run/lock/lxc//var/", 0755) = -1 EEXIST (File exists)
mkdir("/run/lock/lxc//var/lib/", 0755) = -1 EEXIST (File exists)
mkdir("/run/lock/lxc//var/lib/lxc", 0755) = -1 EEXIST (File exists)
stat("/var/lib/lxc/keymanagementservice-main/config",
{st_mode=S_IFREG|0644, st_size=1507, ...}) = 0
open("/run/lock/lxc//var/lib/lxc/keymanagementservice-main",
O_RDWR|O_CREAT, 0600) = 3
fcntl(3, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
access("/var/lib/lxc/keymanagementservice-main/config", R_OK) = 0
open("/var/lib/lxc/keymanagementservice-main/config", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=1507, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fcb179c9000
read(4, "lxc.network.type = veth\nlxc.netw"..., 4096) = 1507
read(4, "", 4096) = 0
close(4) = 0
munmap(0x7fcb179c9000, 4096) = 0
fcntl(3, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
close(3) = 0
stat("/var/lib/lxc/keymanagementservice-main/partial", 0x7fff08ace420) = -1
ENOENT (No such file or directory)
socket(PF_FILE, SOCK_STREAM, 0) = 3
connect(3, {sa_family=AF_FILE,
path=@"/var/lib/lxc/keymanagementservice-main/command"}, 49) = 0
getuid() = 0
getgid() = 0
sendmsg(3, {msg_name(0)=NULL,
msg_iov(1)=[{"\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16}], msg_controllen=32,
{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS{pid=13414,
uid=0, gid=0}}, msg_flags=0}, 0) = 16
recvmsg(3, ^C <unfinished ...>
and there i try to kill it:
[root at db07 custom_workspace1]# strace -f lxc-stop -n
keymanagementservice-main -k
execve("/usr/bin/lxc-stop", ["lxc-stop", "-n", "keymanagementservice-main",
"-k"], [/* 37 vars */]) = 0
brk(0) = 0xa1a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f0f2ca89000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=42597, ...}) = 0
mmap(NULL, 42597, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0f2ca7e000
close(3) = 0
open("/usr/lib64/liblxc.so.1", O_RDONLY) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\311\0\0\0\0\0\0"..., 832)
= 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1237456, ...}) = 0
mmap(NULL, 2491720, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f0f2c81d000
mprotect(0x7f0f2c87b000, 2097152, PROT_NONE) = 0
mmap(0x7f0f2ca7b000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5e000) = 0x7f0f2ca7b000
close(3) = 0
open("/lib64/librt.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@! X>\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=47064, ...}) = 0
mmap(0x3e58200000, 2128816, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x3e58200000
mprotect(0x3e58207000, 2093056, PROT_NONE) = 0
mmap(0x3e58406000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x3e58406000
close(3) = 0
open("/lib64/libutil.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\16
\3636\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=17520, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f0f2c81c000
mmap(0x36f3200000, 2105600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x36f3200000
mprotect(0x36f3202000, 2093056, PROT_NONE) = 0
mmap(0x36f3401000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x36f3401000
close(3) = 0
open("/lib64/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340] U>\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=145896, ...}) = 0
mmap(0x3e55200000, 2212848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x3e55200000
mprotect(0x3e55217000, 2097152, PROT_NONE) = 0
mmap(0x3e55417000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x3e55417000
mmap(0x3e55419000, 13296, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3e55419000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY) = 3
read(3,
"\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\356\341\3606\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1926800, ...}) = 0
mmap(0x36f0e00000, 3750152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x36f0e00000
mprotect(0x36f0f8b000, 2093056, PROT_NONE) = 0
mmap(0x36f118a000, 20480, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18a000) = 0x36f118a000
mmap(0x36f118f000, 18696, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x36f118f000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f0f2c81b000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f0f2c819000
arch_prctl(ARCH_SET_FS, 0x7f0f2c819760) = 0
mprotect(0x36f118a000, 16384, PROT_READ) = 0
mprotect(0x3e55417000, 4096, PROT_READ) = 0
mprotect(0x36f3401000, 4096, PROT_READ) = 0
mprotect(0x3e58406000, 4096, PROT_READ) = 0
mprotect(0x36f0c1f000, 4096, PROT_READ) = 0
munmap(0x7f0f2ca7e000, 42597) = 0
set_tid_address(0x7f0f2c819a30) = 19909
set_robust_list(0x7f0f2c819a40, 0x18) = 0
futex(0x7fff48064e0c, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7fff48064e0c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1,
NULL, 7f0f2c819760) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x3e55205c60, [], SA_RESTORER|SA_SIGINFO,
0x3e5520f710}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x3e55205cf0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO,
0x3e5520f710}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
geteuid() = 0
brk(0) = 0xa1a000
brk(0xa3b000) = 0xa3b000
open("/etc/lxc/lxc.conf", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or
directory)
geteuid() = 0
geteuid() = 0
access("/var", F_OK) = 0
access("/var/log", F_OK) = 0
access("/var/log/lxc", F_OK) = 0
open("/var/log/lxc/keymanagementservice-main.log",
O_WRONLY|O_CREAT|O_APPEND|O_CLOEXEC, 0666) = 3
geteuid() = 0
mkdir("/", 0755) = -1 EEXIST (File exists)
mkdir("/run/", 0755) = -1 EEXIST (File exists)
mkdir("/run/lock/", 0755) = -1 EEXIST (File exists)
mkdir("/run/lock/lxc//", 0755) = -1 EEXIST (File exists)
mkdir("/run/lock/lxc//var/", 0755) = -1 EEXIST (File exists)
mkdir("/run/lock/lxc//var/lib/", 0755) = -1 EEXIST (File exists)
mkdir("/run/lock/lxc//var/lib/lxc", 0755) = -1 EEXIST (File exists)
stat("/var/lib/lxc/keymanagementservice-main/config",
{st_mode=S_IFREG|0644, st_size=1507, ...}) = 0
open("/run/lock/lxc//var/lib/lxc/keymanagementservice-main",
O_RDWR|O_CREAT, 0600) = 4
fcntl(4, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
access("/var/lib/lxc/keymanagementservice-main/config", R_OK) = 0
open("/var/lib/lxc/keymanagementservice-main/config", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=1507, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f0f2ca88000
read(5, "lxc.network.type = veth\nlxc.netw"..., 4096) = 1507
read(5, "", 4096) = 0
close(5) = 0
munmap(0x7f0f2ca88000, 4096) = 0
fcntl(4, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
close(4) = 0
stat("/var/lib/lxc/keymanagementservice-main/partial", 0x7fff48064c00) = -1
ENOENT (No such file or directory)
socket(PF_FILE, SOCK_STREAM, 0) = 4
connect(4, {sa_family=AF_FILE,
path=@"/var/lib/lxc/keymanagementservice-main/command"}, 49) = 0
getuid() = 0
getgid() = 0
sendmsg(4, {msg_name(0)=NULL,
msg_iov(1)=[{"\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16}], msg_controllen=32,
{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS{pid=19909,
uid=0, gid=0}}, msg_flags=0}, 0) = 16
recvmsg(4, ^C <unfinished ...>
So, when i run from shell that gradle script - everything is fine and
perfect. When i run from jenkins - I can't stop/kill, get info from
containers.
LXC is version 1.0.0 with kernel 3.13.0
Any suggestions ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140314/2cd99c87/attachment.html>
More information about the lxc-users
mailing list