Stopping VE hangs [message #48971] |
Wed, 30 January 2013 08:02 |
claude4334
Messages: 1 Registered: January 2013 Location: Paris, France
|
Junior Member |
|
|
Dear all,
I am new to OpenVZ and I am experiencing an issue when trying to stop a VE. I have created the VE from an unmodified template with "vzctl create 668 --ostemplate ubuntu-10.04-x86" then "vzctl start 668 and everything works fine when the VE is running.
The problem comes when I try to stop it using "vzctl stop 668" ; the shutdown child process becomes defunct and vzctl hangs forever. However, when I interrupt it (Ctrl-Z bg), the process exits with a waitpid error. This does not work if I start vzctl detached though (vzctl stop 668 &). Running vzctl stop with strace works, even though waitpid fails (see trace below).
Shutting down the VE from within (vzctl enter 668 ; shutdown -h now) works fine.
My setup is a Ubuntu 12.04 host system with patched kernel 2.6.32 ; vzctl version 4.1.2-11.git.3b72d81. Same problem happened with a Ubuntu 10.04 quest (I upgraded hoping newer libs would solve the problem)
below is the strace result. Thank you for your help
Regards,
Claude
----------------------------
execve("/usr/local/sbin/vzctl", ["vzctl", "stop", "668"], [/* 20 vars */]) = 0
brk(0) = 0x82e9000
uname({sys="Linux", node="virconel", ...}) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7877000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=76900, ...}) = 0
mmap2(NULL, 76900, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7864000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libvzctl-4.1.2-11.git.3b72d81.so", O_RDONLY|O_CLOEXEC) = 3
read(3, " \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20d\0\0004\0 \0\0 "..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=692622, ...}) = 0
mmap2(NULL, 218716, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb782e000
mmap2(0xb7861000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x32) = 0xb7861000
mmap2(0xb7863000, 1628, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7863000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, " \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\n\0\0004\0\ 0\0 "..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=13940, ...}) = 0
mmap2(NULL, 16504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7829000
mmap2(0xb782c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb782c000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libutil.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \n\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9796, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7828000
mmap2(NULL, 12420, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7824000
mmap2(0xb7826000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7826000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, " \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\226\1\000 4\0\0\0 "..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1730024, ...}) = 0
mmap2(NULL, 1743580, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb767a000
mprotect(0xb781d000, 4096, PROT_NONE) = 0
mmap2(0xb781e000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a3) = 0xb781e000
mmap2(0xb7821000, 10972, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7821000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libxml2.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, " \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\271\1\0004\ 0\0\0 "..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1360484, ...}) = 0
mmap2(NULL, 1362932, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb752d000
mmap2(0xb7674000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x147) = 0xb7674000
mmap2(0xb7679000, 3060, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7679000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libcgroup.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, " \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300&\0\0 004\0\0\0 "..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=67432, ...}) = 0
mmap2(NULL, 2529680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb72c3000
mmap2(0xb72d3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf) = 0xb72d3000
mmap2(0xb72d5000, 2455952, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb72d5000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, " \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\27\0\0004\0 \0\0 "..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=83572, ...}) = 0
mmap2(NULL, 86288, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb72ad000
mmap2(0xb72c1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13) = 0xb72c1000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, " \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000D\0\0004\0 \0\0 "..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=173576, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb72ac000
mmap2(NULL, 176256, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7280000
mmap2(0xb72aa000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x29) = 0xb72aa000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, " \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p[\0\0004\0\0 \0 "..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=124663, ...}) = 0
mmap2(NULL, 107008, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7265000
mmap2(0xb727c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16) = 0xb727c000
mmap2(0xb727e000, 4608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb727e000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7264000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7263000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7263980, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb781e000, 8192, PROT_READ) = 0
mprotect(0xb727c000, 4096, PROT_READ) = 0
mprotect(0xb72aa000, 4096, PROT_READ) = 0
mprotect(0xb72c1000, 4096, PROT_READ) = 0
mprotect(0xb72d3000, 4096, PROT_READ) = 0
mprotect(0xb782c000, 4096, PROT_READ) = 0
mprotect(0xb7674000, 16384, PROT_READ) = 0
mprotect(0xb7826000, 4096, PROT_READ) = 0
mprotect(0xb7861000, 4096, PROT_READ) = 0
mprotect(0x8055000, 4096, PROT_READ) = 0
mprotect(0xb7899000, 4096, PROT_READ) = 0
munmap(0xb7864000, 76900) = 0
set_tid_address(0xb72639e8) = 5240
set_robust_list(0xb72639f0, 0xc) = 0
futex(0xbfd6e274, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, b7263980) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0xb726a570, [], SA_RESTORER|SA_SIGINFO, 0xb7273f30}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb726a5f0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0xb7273f30}, 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
uname({sys="Linux", node="virconel", ...}) = 0
brk(0) = 0x82e9000
brk(0x830a000) = 0x830a000
rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER, 0xb76a8288}, NULL, 8) = 0
openat(AT_FDCWD, "/usr/local/libexec/vzctl/modules", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
getdents64(3, /* 2 entries */, 32768) = 48
stat64("/usr/local/libexec/vzctl/modules/..", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/local/libexec/vzctl/modules/.", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents64(3, /* 0 entries */, 32768) = 0
close(3) = 0
open("/etc/vz/vz.conf", O_RDONLY|O_LARGEFILE) = 3
stat64("/etc/vz/vz.conf", {st_mode=S_IFREG|0644, st_size=1404, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=1404, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7876000
read(3, "## Global parameters\nVIRTUOZZO=y"..., 4096) = 1404
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb7876000, 4096) = 0
open("/var/log/vzctl.log", O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, 0666) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=17940, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7876000
fstat64(3, {st_mode=S_IFREG|0644, st_size=17940, ...}) = 0
_llseek(3, 17940, [17940], SEEK_SET) = 0
stat64("/etc/vz/conf/668.conf", {st_mode=S_IFREG|0644, st_size=1608, ...}) = 0
open("/etc/vz/conf/668.conf", O_RDONLY|O_LARGEFILE) = 4
stat64("/etc/vz/conf/668.conf", {st_mode=S_IFREG|0644, st_size=1608, ...}) = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=1608, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7875000
read(4, "# Copyright (C) 2000-2011, Para"..., 4096) = 1608
read(4, "", 4096) = 0
close(4) = 0
munmap(0xb7875000, 4096) = 0
fcntl64(0, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(1, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(2, F_GETFL) = 0x2 (flags O_RDWR)
stat64("/proc/vz", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/dev/vzctl", O_RDWR|O_LARGEFILE) = 4
ioctl(4, 0x400c2e05, 0xbfd6cd14) = 0
stat64("/vz/lock", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
gettimeofday({1359532812, 158032}, NULL) = 0
open("/vz/lock/668.lckow6HTx", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = 5
write(5, "5240\n\n", 6) = 6
close(5) = 0
link("/vz/lock/668.lckow6HTx", "/vz/lock/668.lck") = 0
unlink("/vz/lock/668.lckow6HTx") = 0
rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0xb76a8288}, NULL, 8) = 0
ioctl(4, 0x400c2e05, 0xbfd6cc94) = 0
stat64("/etc/vz/conf/668.stop", 0xbfd6cc90) = -1 ENOENT (No such file or directory)
open("/proc/vz/veinfo", O_RDONLY|O_LARGEFILE) = 5
fstat64(5, {st_mode=S_IFREG|0400, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7875000
read(5, " 668 0 8\n "..., 1024) = 46
close(5) = 0
munmap(0xb7875000, 4096) = 0
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7875000
write(1, "Stopping container ...\n", 23Stopping container ...
) = 23
time(NULL) = 1359532812
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=2945, ...}) = 0
fstat64(5, {st_mode=S_IFREG|0644, st_size=2945, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7874000
read(5, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\f\0\0\0\f\0\0\0\0 "..., 4096) = 2945
_llseek(5, -28, [2917], SEEK_CUR) = 0
read(5, "\nCET-1CEST,M3.5.0,M10.5.0/3\n", 4096) = 28
close(5) = 0
munmap(0xb7874000, 4096) = 0
write(3, "2013-01-30T09:00:12+0100 vzctl :"..., 65) = 65
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb72639e8) = 5241
waitpid(5241, 0xbfd6ccac, 0) = -1 ECHILD (No child processes)
--- SIGCHLD (Child exited) @ 0 (0) ---
write(2, "Error in waitpid(5241)", 22Error in waitpid(5241)) = 22
write(2, ": No child processes", 20: No child processes) = 20
write(2, "\n", 1
) = 1
time(NULL) = 1359532812
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2945, ...}) = 0
write(3, "2013-01-30T09:00:12+0100 vzctl :"..., 85) = 85
write(1, "Killing container ...\n", 22Killing container ...
) = 22
time(NULL) = 1359532812
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2945, ...}) = 0
write(3, "2013-01-30T09:00:12+0100 vzctl :"..., 64) = 64
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb72639e8) = 5244
waitpid(5244, 0xbfd6ccac, 0) = -1 ECHILD (No child processes)
--- SIGCHLD (Child exited) @ 0 (0) ---
write(2, "Error in waitpid(5244)", 22Error in waitpid(5244)) = 22
write(2, ": No child processes", 20: No child processes) = 20
write(2, "\n", 1
) = 1
time(NULL) = 1359532812
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2945, ...}) = 0
write(3, "2013-01-30T09:00:12+0100 vzctl :"..., 85) = 85
write(2, "Unable to stop container", 24Unable to stop container) = 24
write(2, "\n", 1
) = 1
time(NULL) = 1359532812
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2945, ...}) = 0
write(3, "2013-01-30T09:00:12+0100 vzctl :"..., 67) = 67
unlink("/vz/lock/668.lck") = 0
close(4) = 0
close(3) = 0
munmap(0xb7876000, 4096) = 0
exit_group(3) = ?
|
|
|